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

Unified Diff: third_party/WebKit/Source/core/paint/PartPainter.cpp

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 years 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/core/paint/PartPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PartPainter.cpp b/third_party/WebKit/Source/core/paint/PartPainter.cpp
index 0305aea4cbe7e57220ef2d8709577ddb8feddd8f..c98cae2691d5b91a90ed978c68cbdd503ed9148b 100644
--- a/third_party/WebKit/Source/core/paint/PartPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PartPainter.cpp
@@ -83,16 +83,16 @@ void PartPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs
}
// Paint a partially transparent wash over selected widgets.
- if (isSelected() && !paintInfo.isPrinting() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutPart, paintInfo.phase, adjustedPaintOffset)) {
+ if (isSelected() && !paintInfo.isPrinting() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutPart, paintInfo.phase, adjustedPaintOffset)) {
LayoutRect rect = m_layoutPart.localSelectionRect();
rect.moveBy(adjustedPaintOffset);
IntRect selectionRect = pixelSnappedIntRect(rect);
- LayoutObjectDrawingRecorder drawingRecorder(*paintInfo.context, m_layoutPart, paintInfo.phase, selectionRect, adjustedPaintOffset);
- paintInfo.context->fillRect(selectionRect, m_layoutPart.selectionBackgroundColor());
+ LayoutObjectDrawingRecorder drawingRecorder(paintInfo.context, m_layoutPart, paintInfo.phase, selectionRect, adjustedPaintOffset);
+ paintInfo.context.fillRect(selectionRect, m_layoutPart.selectionBackgroundColor());
}
if (m_layoutPart.canResize())
- ScrollableAreaPainter(*m_layoutPart.layer()->scrollableArea()).paintResizer(*paintInfo.context, roundedIntPoint(adjustedPaintOffset), paintInfo.cullRect());
+ ScrollableAreaPainter(*m_layoutPart.layer()->scrollableArea()).paintResizer(paintInfo.context, roundedIntPoint(adjustedPaintOffset), paintInfo.cullRect());
}
void PartPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
@@ -111,11 +111,11 @@ void PartPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint& p
IntSize widgetPaintOffset = paintLocation - widgetLocation;
// When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer,
// not the root. In this case, shift the CTM and adjust the CullRect to be root-relative to fix plugin drawing.
- TransformRecorder transform(*paintInfo.context, m_layoutPart,
+ TransformRecorder transform(paintInfo.context, m_layoutPart,
AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffset.height()));
CullRect adjustedCullRect(paintInfo.cullRect(), -widgetPaintOffset);
- widget->paint(*paintInfo.context, adjustedCullRect);
+ widget->paint(paintInfo.context, adjustedCullRect);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698