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

Unified Diff: third_party/WebKit/Source/core/paint/VideoPainter.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/VideoPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/VideoPainter.cpp b/third_party/WebKit/Source/core/paint/VideoPainter.cpp
index a19f3797dfcc61ecbb1dea9851ef718e8e67ffa3..2f9d1c4a20f624a42e70c9425c7453fb05f81fee 100644
--- a/third_party/WebKit/Source/core/paint/VideoPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/VideoPainter.cpp
@@ -29,26 +29,26 @@ void VideoPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint&
return;
rect.moveBy(paintOffset);
- GraphicsContext* context = paintInfo.context;
+ GraphicsContext& context = paintInfo.context;
LayoutRect contentRect = m_layoutVideo.contentBoxRect();
contentRect.moveBy(paintOffset);
Optional<ClipRecorder> clipRecorder;
if (!contentRect.contains(rect)) {
- clipRecorder.emplace(*context, m_layoutVideo, paintInfo.displayItemTypeForClipping(), contentRect);
+ clipRecorder.emplace(context, m_layoutVideo, paintInfo.displayItemTypeForClipping(), contentRect);
}
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, m_layoutVideo, paintInfo.phase, paintOffset))
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, m_layoutVideo, paintInfo.phase, paintOffset))
return;
- LayoutObjectDrawingRecorder drawingRecorder(*context, m_layoutVideo, paintInfo.phase, contentRect, paintOffset);
+ LayoutObjectDrawingRecorder drawingRecorder(context, m_layoutVideo, paintInfo.phase, contentRect, paintOffset);
if (displayingPoster) {
ImagePainter(m_layoutVideo).paintIntoRect(context, rect);
} else if ((paintInfo.globalPaintFlags() & GlobalPaintFlattenCompositingLayers) || !m_layoutVideo.acceleratedRenderingInUse()) {
- SkPaint videoPaint = context->fillPaint();
+ SkPaint videoPaint = context.fillPaint();
videoPaint.setColor(SK_ColorBLACK);
- m_layoutVideo.videoElement()->paintCurrentFrame(context->canvas(), pixelSnappedIntRect(rect), &videoPaint);
+ m_layoutVideo.videoElement()->paintCurrentFrame(context.canvas(), pixelSnappedIntRect(rect), &videoPaint);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterMac.mm ('k') | third_party/WebKit/Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698