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; |