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

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

Issue 2385123003: Rewrap comments to 80 columns in Source/platform/graphics/paint/. (Closed)
Patch Set: Resync Created 4 years, 2 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/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);
}

Powered by Google App Engine
This is Rietveld 408576698