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

Unified Diff: Source/core/platform/graphics/TextRun.h

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed build on win and mac Created 7 years, 7 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/platform/graphics/TextRun.h
diff --git a/Source/core/platform/graphics/TextRun.h b/Source/core/platform/graphics/TextRun.h
index 2d76d2e531c2d1a6568c36e043ed5fa00b828c73..40a5b2a2857a188e3c37f5adb203b3f4a2a42b90 100644
--- a/Source/core/platform/graphics/TextRun.h
+++ b/Source/core/platform/graphics/TextRun.h
@@ -24,6 +24,7 @@
#ifndef TextRun_h
#define TextRun_h
+#include "core/platform/graphics/FloatRect.h"
#include "core/platform/text/TextDirection.h"
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
@@ -31,7 +32,6 @@
namespace WebCore {
class FloatPoint;
-class FloatRect;
class Font;
class GraphicsContext;
class GlyphBuffer;
@@ -256,6 +256,20 @@ inline void TextRun::setTabSize(bool allow, unsigned size)
m_tabSize = size;
}
-}
+// Container for parameters needed to paint TextRun.
+struct TextRunPaintInfo {
+ explicit TextRunPaintInfo(const TextRun& r)
+ : run(r)
+ , from(0)
+ , to(r.length())
+ {
+ }
+ const TextRun& run;
+ int from;
+ int to;
+ FloatRect bounds;
+};
+
+}
#endif
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext.cpp ('k') | Source/core/platform/graphics/chromium/FontChromiumWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698