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

Unified Diff: Source/core/rendering/TextPainter.h

Issue 554613004: TextBlob: Start caching a text blob per InlineTextBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rewrite in light of changed Font::drawText signature Created 6 years, 3 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/core/rendering/TextPainter.h
diff --git a/Source/core/rendering/TextPainter.h b/Source/core/rendering/TextPainter.h
index 95bfd70513977651b31f7eabc17289cd15157ed8..6caf739b92221e63bbf3d2bb2c9712ad3a031173 100644
--- a/Source/core/rendering/TextPainter.h
+++ b/Source/core/rendering/TextPainter.h
@@ -6,6 +6,7 @@
#define TextPainter_h
#include "core/rendering/style/RenderStyleConstants.h"
+#include "platform/fonts/TextBlob.h"
f(malita) 2014/09/12 13:21:24 Could we use a forward declaration in the header?
jbroman 2014/09/13 00:06:42 Tricky because it's a typedef for a templated clas
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatRect.h"
#include "platform/graphics/Color.h"
@@ -33,7 +34,7 @@ public:
static void updateGraphicsContext(GraphicsContext*, const Style&, bool horizontal, GraphicsContextStateSaver&);
- void paint(int startOffset, int endOffset, int length, const Style&);
+ void paint(int startOffset, int endOffset, int length, const Style&, TextBlobPtr* textBlobCache = 0);
struct Style {
Color fillColor;
@@ -62,10 +63,10 @@ private:
enum PaintInternalStep { PaintText, PaintEmphasisMark };
template <PaintInternalStep step>
- void paintInternalRun(TextRunPaintInfo&, int from, int to);
+ void paintInternalRun(TextRunPaintInfo&, int from, int to, TextBlobPtr* textBlobCache = 0);
template <PaintInternalStep step>
- void paintInternal(int startOffset, int endOffset, int truncationPoint);
+ void paintInternal(int startOffset, int endOffset, int truncationPoint, TextBlobPtr* textBlobCache = 0);
f(malita) 2014/09/12 13:21:24 We may avoid hauling textBlobCache all over the pl
jbroman 2014/09/13 00:06:42 I'm mostly afraid that you can pass TextRunPaintIn
void paintEmphasisMarkForCombinedText();

Powered by Google App Engine
This is Rietveld 408576698