diff options
author | ajuma <ajuma@chromium.org> | 2015-04-15 13:21:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-15 20:21:47 +0000 |
commit | ec7c07e57bc5f91e3ba0bdeba8b6f534978615b0 (patch) | |
tree | edae4d59dd7a1fa2449552afc70927442fbfbfa4 /cc/trees | |
parent | 8eeb3bf4a02be612cacb3cdbb5c223d909939527 (diff) | |
download | chromium_src-ec7c07e57bc5f91e3ba0bdeba8b6f534978615b0.zip chromium_src-ec7c07e57bc5f91e3ba0bdeba8b6f534978615b0.tar.gz chromium_src-ec7c07e57bc5f91e3ba0bdeba8b6f534978615b0.tar.bz2 |
cc: Make DisplayItemList::Append replay into an SkPicture
This makes DisplayItemList no longer retain individual display
items when caching into a picture is enabled, except when
tracing is also enabled (so that per-item trace output can
still be produced). Instead, only an SkPicture representation
is retained. This avoids the memory cost of storing both the
SkPicture representation (which is needed for raster performance)
as well as the individual display items.
BUG=476073
Review URL: https://codereview.chromium.org/1077033004
Cr-Commit-Position: refs/heads/master@{#325292}
Diffstat (limited to 'cc/trees')
-rw-r--r-- | cc/trees/layer_tree_host_common_unittest.cc | 4 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_pixeltest_masks.cc | 12 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_unittest.cc | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc index 439d920..0046b1a 100644 --- a/cc/trees/layer_tree_host_common_unittest.cc +++ b/cc/trees/layer_tree_host_common_unittest.cc @@ -60,11 +60,11 @@ class MockContentLayerClient : public ContentLayerClient { void PaintContents(SkCanvas* canvas, const gfx::Rect& clip, PaintingControlSetting picture_control) override {} - scoped_refptr<DisplayItemList> PaintContentsToDisplayList( + void PaintContentsToDisplayList( + DisplayItemList* display_list, const gfx::Rect& clip, PaintingControlSetting picture_control) override { NOTIMPLEMENTED(); - return DisplayItemList::Create(); } bool FillsBoundsCompletely() const override { return false; } }; diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc index 97765bd..0cb6aea 100644 --- a/cc/trees/layer_tree_host_pixeltest_masks.cc +++ b/cc/trees/layer_tree_host_pixeltest_masks.cc @@ -46,11 +46,11 @@ class MaskContentLayerClient : public ContentLayerClient { } } - scoped_refptr<DisplayItemList> PaintContentsToDisplayList( + void PaintContentsToDisplayList( + DisplayItemList* display_list, const gfx::Rect& clip, PaintingControlSetting picture_control) override { NOTIMPLEMENTED(); - return DisplayItemList::Create(); } private: @@ -303,11 +303,11 @@ class CheckerContentLayerClient : public ContentLayerClient { } } } - scoped_refptr<DisplayItemList> PaintContentsToDisplayList( + void PaintContentsToDisplayList( + DisplayItemList* display_list, const gfx::Rect& clip, PaintingControlSetting picture_control) override { NOTIMPLEMENTED(); - return DisplayItemList::Create(); } private: @@ -334,11 +334,11 @@ class CircleContentLayerClient : public ContentLayerClient { bounds_.width() / 4, paint); } - scoped_refptr<DisplayItemList> PaintContentsToDisplayList( + void PaintContentsToDisplayList( + DisplayItemList* display_list, const gfx::Rect& clip, PaintingControlSetting picture_control) override { NOTIMPLEMENTED(); - return DisplayItemList::Create(); } private: diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index db7bb9c..ff8c5e8 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc @@ -1326,11 +1326,11 @@ class TestOpacityChangeLayerDelegate : public ContentLayerClient { if (test_layer_) test_layer_->SetOpacity(0.f); } - scoped_refptr<DisplayItemList> PaintContentsToDisplayList( + void PaintContentsToDisplayList( + DisplayItemList* display_list, const gfx::Rect& clip, PaintingControlSetting picture_control) override { NOTIMPLEMENTED(); - return DisplayItemList::Create(); } bool FillsBoundsCompletely() const override { return false; } @@ -2791,11 +2791,11 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents layer_->SetBounds(gfx::Size(2, 2)); } - scoped_refptr<DisplayItemList> PaintContentsToDisplayList( + void PaintContentsToDisplayList( + DisplayItemList* display_list, const gfx::Rect& clip, PaintingControlSetting picture_control) override { NOTIMPLEMENTED(); - return DisplayItemList::Create(); } bool FillsBoundsCompletely() const override { return false; } |