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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp

Issue 2889653002: Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: movecullrect2 rebase-once-and-for-all 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/paint/PaintArtifact.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
index 119f912fc2ea589732da496d6ce7430194103a33..ec6345e49310ecb348b6f597d87528b18534af19 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp
@@ -28,16 +28,14 @@ void ComputeChunkBoundsAndOpaqueness(const DisplayItemList& display_items,
if (!item.IsDrawing())
continue;
const auto& drawing = static_cast<const DrawingDisplayItem&>(item);
- if (const PaintRecord* record = drawing.GetPaintRecord().get()) {
- if (drawing.KnownToBeOpaque()) {
- // TODO(pdr): It may be too conservative to round in to the
- // enclosedIntRect.
- SkIRect conservative_rounded_rect;
- const SkRect& cull_rect = record->cullRect();
- cull_rect.roundIn(&conservative_rounded_rect);
- known_to_be_opaque_region.op(conservative_rounded_rect,
- SkRegion::kUnion_Op);
- }
+ if (drawing.GetPaintRecord() && drawing.KnownToBeOpaque()) {
+ // TODO(pdr): It may be too conservative to round in to the
+ // EnclosedIntRect.
+ SkIRect conservative_rounded_rect;
+ const SkRect& record_bounds = drawing.GetPaintRecordBounds();
+ record_bounds.roundIn(&conservative_rounded_rect);
+ known_to_be_opaque_region.op(conservative_rounded_rect,
+ SkRegion::kUnion_Op);
}
}
chunk.bounds = bounds;

Powered by Google App Engine
This is Rietveld 408576698