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

Unified Diff: cc/layers/picture_image_layer.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/layers/picture_image_layer.h ('k') | cc/layers/picture_image_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_image_layer.cc
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index f6b360dd6bb867779dcb50b9dd062bf0abb03059..cde9ccdc78c0dfcee62e48c12437c24ac912e2ce 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -54,7 +54,6 @@ gfx::Rect PictureImageLayer::PaintableRegion() {
}
scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
- const gfx::Rect& clip,
ContentLayerClient::PaintingControlSetting painting_control) {
DCHECK(image_);
DCHECK_GT(image_->width(), 0);
@@ -65,10 +64,11 @@ scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
DisplayItemListSettings settings;
settings.use_cached_picture = true;
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(clip, settings);
+ DisplayItemList::Create(PaintableRegion(), settings);
SkPictureRecorder recorder;
- SkCanvas* canvas = recorder.beginRecording(gfx::RectToSkRect(clip));
+ SkCanvas* canvas =
+ recorder.beginRecording(gfx::RectToSkRect(PaintableRegion()));
SkScalar content_to_layer_scale_x =
SkFloatToScalar(static_cast<float>(bounds().width()) / image_->width());
@@ -83,7 +83,8 @@ scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
skia::RefPtr<SkPicture> picture =
skia::AdoptRef(recorder.endRecordingAsPicture());
- auto* item = display_list->CreateAndAppendItem<DrawingDisplayItem>(clip);
+ auto* item =
+ display_list->CreateAndAppendItem<DrawingDisplayItem>(PaintableRegion());
item->SetNew(std::move(picture));
display_list->Finalize();
« no previous file with comments | « cc/layers/picture_image_layer.h ('k') | cc/layers/picture_image_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698