summaryrefslogtreecommitdiffstats
path: root/cc/resources/drawing_display_item.h
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2015-04-25 10:53:17 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-25 17:53:12 +0000
commit93f5730af51af283713ad19dd5e08c3b3ea34eaa (patch)
tree38e1eb1974410d8503476bb9d0d25218f3ec17c9 /cc/resources/drawing_display_item.h
parentba5b67e27dc64c3c6793be8f9c991066c956c33f (diff)
downloadchromium_src-93f5730af51af283713ad19dd5e08c3b3ea34eaa.zip
chromium_src-93f5730af51af283713ad19dd5e08c3b3ea34eaa.tar.gz
chromium_src-93f5730af51af283713ad19dd5e08c3b3ea34eaa.tar.bz2
ui: Cache the output of View::OnPaint when the View isn't invalid.
Store the output of View::OnPaint as a PaintCache object, and when the view has not been invalidated, use that cache output instead of doing work to build a recording. Performance data as follows when the loading spinner is going: Before impl-side (TOT): 0.13ms / paint With impl-side (no slimming paint): 0.22ms / paint With impl-side and slimming paint (this patch): 0.17ms / paint So this gets us some of the way there. I need to investigate why it's not doing more. R=piman@chromium.org, sky BUG=466426 Committed: https://crrev.com/7f686cdcff81d6779b962e98e529a7360be2809c Cr-Commit-Position: refs/heads/master@{#326592} Review URL: https://codereview.chromium.org/1101783002 Cr-Commit-Position: refs/heads/master@{#326976}
Diffstat (limited to 'cc/resources/drawing_display_item.h')
-rw-r--r--cc/resources/drawing_display_item.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/resources/drawing_display_item.h b/cc/resources/drawing_display_item.h
index a3eef77..da302d8 100644
--- a/cc/resources/drawing_display_item.h
+++ b/cc/resources/drawing_display_item.h
@@ -33,6 +33,8 @@ class CC_EXPORT DrawingDisplayItem : public DisplayItem {
size_t PictureMemoryUsage() const override;
void AsValueInto(base::trace_event::TracedValue* array) const override;
+ scoped_ptr<DrawingDisplayItem> Clone();
+
protected:
explicit DrawingDisplayItem(skia::RefPtr<SkPicture> picture);