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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.h

Issue 2845883002: [LayoutNG] Add NG-specific DrawText support to GraphicsContext (Closed)
Patch Set: Created 3 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/graphics/GraphicsContext.h
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
index 8e9d1c737b7c902d0e8123b530d597c632a1e4bd..3392ad6bbc4c406a25179b26c8e19987ca334642 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
@@ -237,14 +237,26 @@ class PLATFORM_EXPORT GraphicsContext {
SkClipOp = SkClipOp::kIntersect);
void DrawText(const Font&, const TextRunPaintInfo&, const FloatPoint&);
+ void DrawText(const Font&, const TextFragmentPaintInfo&, const FloatPoint&);
eae 2017/04/27 03:30:32 I tried templetazing the public methods themselves
+
void DrawText(const Font&,
const TextRunPaintInfo&,
const FloatPoint&,
const PaintFlags&);
+ void DrawText(const Font&,
+ const TextFragmentPaintInfo&,
+ const FloatPoint&,
+ const PaintFlags&);
+
void DrawEmphasisMarks(const Font&,
const TextRunPaintInfo&,
const AtomicString& mark,
const FloatPoint&);
+ void DrawEmphasisMarks(const Font&,
+ const TextFragmentPaintInfo&,
+ const AtomicString& mark,
+ const FloatPoint&);
+
void DrawBidiText(
const Font&,
const TextRunPaintInfo&,
@@ -370,6 +382,21 @@ class PLATFORM_EXPORT GraphicsContext {
return paint_state_;
}
+ template <typename TextPaintInfo>
+ void DrawTextInternal(const Font&,
+ const TextPaintInfo&,
+ const FloatPoint&,
+ const PaintFlags&);
+
+ template <typename TextPaintInfo>
+ void DrawTextInternal(const Font&, const TextPaintInfo&, const FloatPoint&);
+
+ template <typename TextPaintInfo>
+ void DrawEmphasisMarksInternal(const Font&,
+ const TextPaintInfo&,
+ const AtomicString& mark,
+ const FloatPoint&);
+
template <typename DrawTextFunc>
void DrawTextPasses(const DrawTextFunc&);

Powered by Google App Engine
This is Rietveld 408576698