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

Unified Diff: third_party/WebKit/Source/platform/exported/WebFont.cpp

Issue 1931133002: Let SkPictureBuilder be DisplayItemClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/exported/WebFont.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebFont.cpp b/third_party/WebKit/Source/platform/exported/WebFont.cpp
index 2c8c9b181dcd95732340b695d3d92e53f5e04294..f230648967ed22fdbf0b688b7d2f20e2560b664b 100644
--- a/third_party/WebKit/Source/platform/exported/WebFont.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebFont.cpp
@@ -8,7 +8,6 @@
#include "platform/fonts/FontCache.h"
#include "platform/fonts/FontDescription.h"
#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/paint/DisplayItemClient.h"
#include "platform/graphics/paint/DrawingRecorder.h"
#include "platform/graphics/paint/SkPictureBuilder.h"
#include "platform/text/TextRun.h"
@@ -25,7 +24,7 @@ WebFont* WebFont::create(const WebFontDescription& description)
return new WebFont(description);
}
-class WebFont::Impl final : public DisplayItemClient {
+class WebFont::Impl final {
public:
explicit Impl(const WebFontDescription& description)
: m_font(description)
@@ -34,12 +33,6 @@ public:
}
const Font& getFont() const { return m_font; }
- String debugName() const final { return "WebFont::Impl"; }
- LayoutRect visualRect() const final
- {
- // TODO(chrishtr): fix this.
- return LayoutRect();
- }
private:
Font m_font;
@@ -98,9 +91,8 @@ void WebFont::drawText(WebCanvas* canvas, const WebTextRun& run,
SkPictureBuilder pictureBuilder(intRect);
GraphicsContext& context = pictureBuilder.context();
- ASSERT(!DrawingRecorder::useCachedDrawingIfPossible(context, *m_private, DisplayItem::WebFont));
{
- DrawingRecorder drawingRecorder(context, *m_private, DisplayItem::WebFont, intRect);
+ DrawingRecorder drawingRecorder(context, pictureBuilder, DisplayItem::WebFont, intRect);
context.save();
context.setFillColor(color);
context.clip(textClipRect);

Powered by Google App Engine
This is Rietveld 408576698