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

Unified Diff: cc/layers/picture_image_layer.cc

Issue 1452353002: Turn off computation of the interest rect in cc in synchronized paint mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: cc/layers/picture_image_layer.cc
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index f2caeaf199d58086eb5756533efefaadaad13566..91498612933ab81e08dbafde8b16b840c86d4527 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -50,8 +50,8 @@ void PictureImageLayer::SetImage(skia::RefPtr<const SkImage> image) {
}
scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
- const gfx::Rect& clip,
- ContentLayerClient::PaintingControlSetting painting_control) {
+ ContentLayerClient::PaintingControlSetting painting_control,
+ gfx::Rect* recording_viewport) {
DCHECK(image_);
DCHECK_GT(image_->width(), 0);
DCHECK_GT(image_->height(), 0);
@@ -61,10 +61,11 @@ scoped_refptr<DisplayItemList> PictureImageLayer::PaintContentsToDisplayList(
DisplayItemListSettings settings;
settings.use_cached_picture = true;
scoped_refptr<DisplayItemList> display_list =
- DisplayItemList::Create(clip, settings);
+ DisplayItemList::Create(*recording_viewport, settings);
SkPictureRecorder recorder;
- SkCanvas* canvas = recorder.beginRecording(gfx::RectToSkRect(clip));
+ SkCanvas* canvas =
+ recorder.beginRecording(gfx::RectToSkRect(*recording_viewport));
SkScalar content_to_layer_scale_x =
SkFloatToScalar(static_cast<float>(bounds().width()) / image_->width());

Powered by Google App Engine
This is Rietveld 408576698