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

Unified Diff: Source/platform/text/TextRun.h

Issue 645363003: Consolidate most simple vs. complex Font methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor cleanup Created 6 years, 2 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
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/TextRun.h
diff --git a/Source/platform/text/TextRun.h b/Source/platform/text/TextRun.h
index 4bac69429a4074df44ba494e1c26f6bd3871edf7..b1b13e0be8e77fee33539369b99d6a569d8611bb 100644
--- a/Source/platform/text/TextRun.h
+++ b/Source/platform/text/TextRun.h
@@ -27,11 +27,14 @@
#include "platform/PlatformExport.h"
#include "platform/fonts/Glyph.h"
#include "platform/geometry/FloatRect.h"
+#include "platform/heap/Heap.h"
#include "platform/text/TextDirection.h"
#include "platform/text/TextPath.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
+class SkTextBlob;
+
namespace blink {
class FloatPoint;
@@ -257,10 +260,13 @@ inline void TextRun::setTabSize(bool allow, unsigned size)
// Container for parameters needed to paint TextRun.
struct TextRunPaintInfo {
+ STACK_ALLOCATED();
+public:
explicit TextRunPaintInfo(const TextRun& r)
: run(r)
, from(0)
, to(r.length())
+ , cachedTextBlob(nullptr)
{
}
@@ -268,6 +274,7 @@ struct TextRunPaintInfo {
int from;
int to;
FloatRect bounds;
+ RefPtr<const SkTextBlob>* cachedTextBlob;
};
}
« no previous file with comments | « Source/platform/graphics/GraphicsContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698