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

Unified Diff: Source/web/WebFontImpl.cpp

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix some !'s and &&'s. De Morgan would be proud. Created 5 years, 6 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: Source/web/WebFontImpl.cpp
diff --git a/Source/web/WebFontImpl.cpp b/Source/web/WebFontImpl.cpp
index 6411355fe47dc1591c2a559bf9a12d0d873ccac9..662930ecdbcf34c97166d3752a4f43f920415fcf 100644
--- a/Source/web/WebFontImpl.cpp
+++ b/Source/web/WebFontImpl.cpp
@@ -99,9 +99,8 @@ void WebFontImpl::drawText(WebCanvas* canvas, const WebTextRun& run, const WebFl
SkPictureBuilder pictureBuilder(intRect);
GraphicsContext* context = &pictureBuilder.context();
- {
+ if (!DrawingRecorder::useCachedDrawingIfPossible(*context, *this, DisplayItem::WebFont)) {
Xianzhu 2015/07/03 01:24:42 Nit: Another similar place still uses ASSERT. Bett
pdr. 2015/07/03 02:38:05 Good catch. Fixed.
DrawingRecorder drawingRecorder(*context, *this, DisplayItem::WebFont, intRect);
- ASSERT(!drawingRecorder.canUseCachedDrawing());
context->save();
context->setFillColor(color);
context->clip(textClipRect);

Powered by Google App Engine
This is Rietveld 408576698