Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.cc

Issue 1409713002: cc: Remove cc::ContentLayerClient::PaintContents(SkCanvas*, ...). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restore comment Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_masks.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index ce9dde54c4da4132719381d13d0d80a3d52c9bd2..929d8c01b380d8520dde700dd119bd99c3dfa630 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -32,16 +32,6 @@ class MaskContentLayerClient : public ContentLayerClient {
bool FillsBoundsCompletely() const override { return false; }
size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
- // TODO(pdr): Remove PaintContents as all calls should go through
- // PaintContentsToDisplayList.
- void PaintContents(SkCanvas* canvas,
- const gfx::Rect& rect,
- PaintingControlSetting picture_control) override {
- scoped_refptr<DisplayItemList> contents =
- PaintContentsToDisplayList(rect, picture_control);
- contents->Raster(canvas, nullptr, rect, 1.0f);
- }
-
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
const gfx::Rect& clip,
PaintingControlSetting picture_control) override {
@@ -119,8 +109,10 @@ TEST_P(LayerTreeHostMasksPixelTest, ImageMaskOfLayer) {
SkCanvas* canvas = surface->getCanvas();
canvas->scale(SkIntToScalar(4), SkIntToScalar(4));
MaskContentLayerClient client(mask_bounds);
- client.PaintContents(canvas, gfx::Rect(mask_bounds),
- ContentLayerClient::PAINTING_BEHAVIOR_NORMAL);
+ scoped_refptr<DisplayItemList> mask_display_list =
+ client.PaintContentsToDisplayList(
+ gfx::Rect(mask_bounds), ContentLayerClient::PAINTING_BEHAVIOR_NORMAL);
+ mask_display_list->Raster(canvas, nullptr, gfx::Rect(mask_bounds), 1.0f);
skia::RefPtr<const SkImage> image =
skia::AdoptRef(surface->newImageSnapshot());
mask->SetImage(image.Pass());
@@ -319,15 +311,6 @@ class CheckerContentLayerClient : public ContentLayerClient {
~CheckerContentLayerClient() override {}
bool FillsBoundsCompletely() const override { return false; }
size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
- // TODO(pdr): Remove PaintContents as all calls should go through
- // PaintContentsToDisplayList.
- void PaintContents(SkCanvas* canvas,
- const gfx::Rect& rect,
- PaintingControlSetting picture_control) override {
- scoped_refptr<DisplayItemList> contents =
- PaintContentsToDisplayList(rect, picture_control);
- contents->Raster(canvas, nullptr, rect, 1.0f);
- }
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
const gfx::Rect& clip,
PaintingControlSetting picture_control) override {
@@ -375,15 +358,6 @@ class CircleContentLayerClient : public ContentLayerClient {
~CircleContentLayerClient() override {}
bool FillsBoundsCompletely() const override { return false; }
size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
- // TODO(pdr): Remove PaintContents as all calls should go through
- // PaintContentsToDisplayList.
- void PaintContents(SkCanvas* canvas,
- const gfx::Rect& rect,
- PaintingControlSetting picture_control) override {
- scoped_refptr<DisplayItemList> contents =
- PaintContentsToDisplayList(rect, picture_control);
- contents->Raster(canvas, nullptr, rect, 1.0f);
- }
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
const gfx::Rect& clip,
PaintingControlSetting picture_control) override {
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_tiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698