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

Side by Side Diff: Source/core/rendering/TextPainter.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/rendering/TextPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TextPainter_h 5 #ifndef TextPainter_h
6 #define TextPainter_h 6 #define TextPainter_h
7 7
8 #include "core/rendering/style/RenderStyleConstants.h" 8 #include "core/rendering/style/RenderStyleConstants.h"
9 #include "platform/fonts/TextBlob.h" 9 #include "platform/fonts/TextBlob.h"
10 #include "platform/geometry/FloatPoint.h" 10 #include "platform/geometry/FloatPoint.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 private: 61 private:
62 void updateGraphicsContext(const Style& style, GraphicsContextStateSaver& sa ver) 62 void updateGraphicsContext(const Style& style, GraphicsContextStateSaver& sa ver)
63 { 63 {
64 updateGraphicsContext(m_graphicsContext, style, m_horizontal, saver); 64 updateGraphicsContext(m_graphicsContext, style, m_horizontal, saver);
65 } 65 }
66 66
67 enum PaintInternalStep { PaintText, PaintEmphasisMark }; 67 enum PaintInternalStep { PaintText, PaintEmphasisMark };
68 68
69 template <PaintInternalStep step> 69 template <PaintInternalStep step>
70 void paintInternalRun(TextRunPaintInfo&, int from, int to, TextBlobPtr* cach edTextBlob = 0); 70 void paintInternalRun(TextRunPaintInfo&, int from, int to);
71 71
72 template <PaintInternalStep step> 72 template <PaintInternalStep step>
73 void paintInternal(int startOffset, int endOffset, int truncationPoint, Text BlobPtr* cachedTextBlob = 0); 73 void paintInternal(int startOffset, int endOffset, int truncationPoint, Text BlobPtr* cachedTextBlob = 0);
74 74
75 void paintEmphasisMarkForCombinedText(); 75 void paintEmphasisMarkForCombinedText();
76 76
77 GraphicsContext* m_graphicsContext; 77 GraphicsContext* m_graphicsContext;
78 const Font& m_font; 78 const Font& m_font;
79 const TextRun& m_run; 79 const TextRun& m_run;
80 FloatPoint m_textOrigin; 80 FloatPoint m_textOrigin;
81 FloatRect m_textBounds; 81 FloatRect m_textBounds;
82 bool m_horizontal; 82 bool m_horizontal;
83 AtomicString m_emphasisMark; 83 AtomicString m_emphasisMark;
84 int m_emphasisMarkOffset; 84 int m_emphasisMarkOffset;
85 RenderCombineText* m_combinedText; 85 RenderCombineText* m_combinedText;
86 }; 86 };
87 87
88 } // namespace blink 88 } // namespace blink
89 89
90 #endif // TextPainter_h 90 #endif // TextPainter_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/TextPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698