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

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.cc

Issue 1489713004: Remove the clip parameter from ContentLayerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clipremoval
Patch Set: Created 5 years 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 5068c71639c9d2972173d5b4373c090a2f18e235..c8b587587e81261c5de610946c076c700cc72a3b 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -35,7 +35,6 @@ class MaskContentLayerClient : public ContentLayerClient {
gfx::Rect PaintableRegion() override { return gfx::Rect(bounds_); }
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
- const gfx::Rect& clip,
PaintingControlSetting picture_control) override {
SkPictureRecorder recorder;
skia::RefPtr<SkCanvas> canvas = skia::SharePtr(
@@ -58,8 +57,9 @@ class MaskContentLayerClient : public ContentLayerClient {
}
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(clip, DisplayItemListSettings());
- auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(clip);
+ DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings());
+ auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ PaintableRegion());
skia::RefPtr<SkPicture> picture =
skia::AdoptRef(recorder.endRecordingAsPicture());
@@ -113,7 +113,7 @@ TEST_P(LayerTreeHostMasksPixelTest, ImageMaskOfLayer) {
MaskContentLayerClient client(mask_bounds);
scoped_refptr<DisplayItemList> mask_display_list =
client.PaintContentsToDisplayList(
- gfx::Rect(mask_bounds), ContentLayerClient::PAINTING_BEHAVIOR_NORMAL);
+ 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());
@@ -315,7 +315,6 @@ class CheckerContentLayerClient : public ContentLayerClient {
size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
gfx::Rect PaintableRegion() override { return gfx::Rect(bounds_); }
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
- const gfx::Rect& clip,
PaintingControlSetting picture_control) override {
SkPictureRecorder recorder;
skia::RefPtr<SkCanvas> canvas = skia::SharePtr(
@@ -337,8 +336,9 @@ class CheckerContentLayerClient : public ContentLayerClient {
}
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(clip, DisplayItemListSettings());
- auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(clip);
+ DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings());
+ auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ PaintableRegion());
skia::RefPtr<SkPicture> picture =
skia::AdoptRef(recorder.endRecordingAsPicture());
@@ -363,7 +363,6 @@ class CircleContentLayerClient : public ContentLayerClient {
size_t GetApproximateUnsharedMemoryUsage() const override { return 0; }
gfx::Rect PaintableRegion() override { return gfx::Rect(bounds_); }
scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
- const gfx::Rect& clip,
PaintingControlSetting picture_control) override {
SkPictureRecorder recorder;
skia::RefPtr<SkCanvas> canvas = skia::SharePtr(
@@ -379,8 +378,9 @@ class CircleContentLayerClient : public ContentLayerClient {
paint);
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(clip, DisplayItemListSettings());
- auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(clip);
+ DisplayItemList::Create(PaintableRegion(), DisplayItemListSettings());
+ auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(
+ PaintableRegion());
skia::RefPtr<SkPicture> picture =
skia::AdoptRef(recorder.endRecordingAsPicture());
item->SetNew(std::move(picture));
« 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