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

Unified Diff: ui/gfx/render_text.h

Issue 2943823002: Remove gfx::DIAGONAL_STRIKE and supporting code. (Closed)
Patch Set: Created 3 years, 6 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 | « ui/gfx/decorated_text.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 5353be69b8e2207a8e83cbd71824248ab96866e0..508f50ce21e4d6f33b3fd30cf3f7829d65a78d8e 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -74,44 +74,22 @@ class GFX_EXPORT SkiaTextRenderer {
// Draw underline and strike-through text decorations.
// Based on |SkCanvas::DrawTextDecorations()| and constants from:
// third_party/skia/src/core/SkTextFormatParams.h
- virtual void DrawDecorations(int x, int y, int width, bool underline,
- bool strike, bool diagonal_strike);
- // Finishes any ongoing diagonal strike run.
- void EndDiagonalStrike();
+ virtual void DrawDecorations(int x,
+ int y,
+ int width,
+ bool underline,
+ bool strike);
void DrawUnderline(int x, int y, int width);
void DrawStrike(int x, int y, int width) const;
private:
friend class test::RenderTextTestApi;
- // Helper class to draw a diagonal line with multiple pieces of different
- // lengths and colors; to support text selection appearances.
- class DiagonalStrike {
- public:
- DiagonalStrike(Canvas* canvas, Point start, const cc::PaintFlags& flags);
- ~DiagonalStrike();
-
- void AddPiece(int length, SkColor color);
- void Draw();
-
- private:
- typedef std::pair<int, SkColor> Piece;
-
- Canvas* canvas_;
- const Point start_;
- cc::PaintFlags flags_;
- int total_length_;
- std::vector<Piece> pieces_;
-
- DISALLOW_COPY_AND_ASSIGN(DiagonalStrike);
- };
-
Canvas* canvas_;
cc::PaintCanvas* canvas_skia_;
cc::PaintFlags flags_;
SkScalar underline_thickness_;
SkScalar underline_position_;
- std::unique_ptr<DiagonalStrike> diagonal_;
DISALLOW_COPY_AND_ASSIGN(SkiaTextRenderer);
};
« no previous file with comments | « ui/gfx/decorated_text.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698