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

Unified Diff: third_party/WebKit/Source/web/WebFontImpl.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/web/WebFontImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFontImpl.cpp b/third_party/WebKit/Source/web/WebFontImpl.cpp
index 3486dd1cc676846fffb1539787858ed82870eb84..ac7a0b861db22e7ad9009b34ae0a2335fda769c0 100644
--- a/third_party/WebKit/Source/web/WebFontImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFontImpl.cpp
@@ -97,16 +97,16 @@ void WebFontImpl::drawText(WebCanvas* canvas, const WebTextRun& run, const WebFl
IntRect intRect(clip);
SkPictureBuilder pictureBuilder(intRect);
- GraphicsContext* context = &pictureBuilder.context();
+ GraphicsContext& context = pictureBuilder.context();
- ASSERT(!DrawingRecorder::useCachedDrawingIfPossible(*context, *this, DisplayItem::WebFont));
+ ASSERT(!DrawingRecorder::useCachedDrawingIfPossible(context, *this, DisplayItem::WebFont));
{
- DrawingRecorder drawingRecorder(*context, *this, DisplayItem::WebFont, intRect);
- context->save();
- context->setFillColor(color);
- context->clip(textClipRect);
- context->drawText(m_font, runInfo, leftBaseline);
- context->restore();
+ DrawingRecorder drawingRecorder(context, *this, DisplayItem::WebFont, intRect);
+ context.save();
+ context.setFillColor(color);
+ context.clip(textClipRect);
+ context.drawText(m_font, runInfo, leftBaseline);
+ context.restore();
}
pictureBuilder.endRecording()->playback(canvas);

Powered by Google App Engine
This is Rietveld 408576698