Index: third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp |
index 97833182efd7f8765c46f839df98e4485d362960..351681624e5cdfdecfd198236ce1c1fc3a8103fd 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp |
@@ -29,7 +29,8 @@ DrawingRecorder::DrawingRecorder(GraphicsContext& context, |
if (context.getPaintController().displayItemConstructionIsDisabled()) |
return; |
- // Must check DrawingRecorder::useCachedDrawingIfPossible before creating the DrawingRecorder. |
+ // Must check DrawingRecorder::useCachedDrawingIfPossible before creating the |
+ // DrawingRecorder. |
DCHECK(RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled() || |
!useCachedDrawingIfPossible(m_context, m_displayItemClient, |
m_displayItemType)); |
@@ -40,21 +41,25 @@ DrawingRecorder::DrawingRecorder(GraphicsContext& context, |
context.setInDrawingRecorder(true); |
#endif |
- // Use the enclosing int rect, since pixel-snapping may be applied to the bounds of the object during painting. Potentially expanding |
- // the cull rect by a pixel or two also does not affect correctness, and is very unlikely to matter for performance. |
+ // Use the enclosing int rect, since pixel-snapping may be applied to the |
+ // bounds of the object during painting. Potentially expanding the cull rect |
+ // by a pixel or two also does not affect correctness, and is very unlikely to |
+ // matter for performance. |
IntRect cullRect = enclosingIntRect(floatCullRect); |
context.beginRecording(cullRect); |
#if DCHECK_IS_ON() |
if (RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled()) { |
- // Skia depends on the cull rect containing all of the display item commands. When strict |
- // cull rect clipping is enabled, make this explicit. This allows us to identify potential |
- // incorrect cull rects that might otherwise be masked due to Skia internal optimizations. |
+ // Skia depends on the cull rect containing all of the display item |
+ // commands. When strict cull rect clipping is enabled, make this explicit. |
+ // This allows us to identify potential incorrect cull rects that might |
+ // otherwise be masked due to Skia internal optimizations. |
context.save(); |
- // Expand the verification clip by one pixel to account for Skia's SkCanvas::getClipBounds() |
- // expansion, used in testing cull rects. |
- // TODO(schenney) This is not the best place to do this. Ideally, we would expand by one pixel |
- // in device (pixel) space, but to do that we would need to add the verification mode to Skia. |
+ // Expand the verification clip by one pixel to account for Skia's |
+ // SkCanvas::getClipBounds() expansion, used in testing cull rects. |
+ // TODO(schenney) This is not the best place to do this. Ideally, we would |
+ // expand by one pixel in device (pixel) space, but to do that we would need |
+ // to add the verification mode to Skia. |
cullRect.inflate(1); |
context.clipRect(cullRect, NotAntiAliased, SkRegion::kIntersect_Op); |
} |