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

Unified Diff: cc/playback/display_item_list.cc

Issue 1158553004: cc: Cull DrawingDisplayItems outside of the raster playback rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cull: . Created 5 years, 7 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/playback/display_item_list.h ('k') | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/display_item_list.cc
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
index 5ee754ba7605a8b96bd9dd72f266a7b05940ea72..2f1577aca4ca89a8cf6340cf1d1f851ef992488c 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -94,13 +94,14 @@ DisplayItemList::~DisplayItemList() {
void DisplayItemList::Raster(SkCanvas* canvas,
SkPicture::AbortCallback* callback,
+ const gfx::Rect& canvas_target_playback_rect,
float contents_scale) const {
DCHECK(ProcessAppendedItemsCalled());
if (!use_cached_picture_) {
canvas->save();
canvas->scale(contents_scale, contents_scale);
for (auto* item : items_)
- item->Raster(canvas, callback);
+ item->Raster(canvas, canvas_target_playback_rect, callback);
canvas->restore();
} else {
DCHECK(picture_);
@@ -145,7 +146,7 @@ void DisplayItemList::ProcessAppendedItems() {
if (use_cached_picture_) {
DCHECK(canvas_);
- item->Raster(canvas_.get(), NULL);
+ item->Raster(canvas_.get(), gfx::Rect(), NULL);
}
if (retain_individual_display_items_) {
@@ -218,7 +219,7 @@ DisplayItemList::AsValue() const {
recorder.beginRecording(layer_rect_.width(), layer_rect_.height());
canvas->translate(-layer_rect_.x(), -layer_rect_.y());
canvas->clipRect(gfx::RectToSkRect(layer_rect_));
- Raster(canvas, NULL, 1.f);
+ Raster(canvas, NULL, gfx::Rect(), 1.f);
skia::RefPtr<SkPicture> picture =
skia::AdoptRef(recorder.endRecordingAsPicture());
« no previous file with comments | « cc/playback/display_item_list.h ('k') | cc/playback/display_list_raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698