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

Unified Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp

Issue 2894843002: Revert of Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: rebase TestExpectations Created 3 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
Index: third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
index bd39881c3dc20e68b800a29b83d5da065816b36d..dbb451738b5ba52b1d4eba71d02837e22f38e405 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
@@ -183,20 +183,18 @@ static void AppendDisplayItemToCcDisplayItemList(
cc::DisplayItemList* list) {
DCHECK(DisplayItem::IsDrawingType(display_item.GetType()));
if (DisplayItem::IsDrawingType(display_item.GetType())) {
- const auto& drawing_display_item =
- static_cast<const DrawingDisplayItem&>(display_item);
- sk_sp<const PaintRecord> record = drawing_display_item.GetPaintRecord();
+ sk_sp<const PaintRecord> record =
+ static_cast<const DrawingDisplayItem&>(display_item).GetPaintRecord();
if (!record)
return;
- SkRect record_bounds = drawing_display_item.GetPaintRecordBounds();
// In theory we would pass the bounds of the record, previously done as:
// gfx::Rect bounds = gfx::SkIRectToRect(record->cullRect().roundOut());
// or use the visual rect directly. However, clip content layers attempt
// to raster in a different space than that of the visual rects. We'll be
// reworking visual rects further for SPv2, so for now we just pass a
// visual rect large enough to make sure items raster.
- list->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>(
- g_large_rect, std::move(record), record_bounds);
+ list->CreateAndAppendDrawingItem<cc::DrawingDisplayItem>(g_large_rect,
+ std::move(record));
}
}

Powered by Google App Engine
This is Rietveld 408576698