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

Side by Side Diff: ui/gfx/render_text.h

Issue 493363006: Remove deferred fade shader workaround from RenderText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_GFX_RENDER_TEXT_H_ 5 #ifndef UI_GFX_RENDER_TEXT_H_
6 #define UI_GFX_RENDER_TEXT_H_ 6 #define UI_GFX_RENDER_TEXT_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 // Internal helper class used by derived classes to draw text through Skia. 48 // Internal helper class used by derived classes to draw text through Skia.
49 class SkiaTextRenderer { 49 class SkiaTextRenderer {
50 public: 50 public:
51 explicit SkiaTextRenderer(Canvas* canvas); 51 explicit SkiaTextRenderer(Canvas* canvas);
52 ~SkiaTextRenderer(); 52 ~SkiaTextRenderer();
53 53
54 void SetDrawLooper(SkDrawLooper* draw_looper); 54 void SetDrawLooper(SkDrawLooper* draw_looper);
55 void SetFontRenderParams(const FontRenderParams& params, 55 void SetFontRenderParams(const FontRenderParams& params,
56 bool background_is_transparent); 56 bool background_is_transparent);
57 #if defined(OS_WIN)
58 void CorrectPaintFlags(bool background_is_transparent);
59 #endif // OS_WIN
57 void SetTypeface(SkTypeface* typeface); 60 void SetTypeface(SkTypeface* typeface);
58 void SetTextSize(SkScalar size); 61 void SetTextSize(SkScalar size);
59 void SetFontFamilyWithStyle(const std::string& family, int font_style); 62 void SetFontFamilyWithStyle(const std::string& family, int font_style);
60 void SetForegroundColor(SkColor foreground); 63 void SetForegroundColor(SkColor foreground);
61 void SetShader(SkShader* shader, const Rect& bounds); 64 void SetShader(SkShader* shader, const Rect& bounds);
62 // Sets underline metrics to use if the text will be drawn with an underline. 65 // Sets underline metrics to use if the text will be drawn with an underline.
63 // If not set, default values based on the size of the text will be used. The 66 // If not set, default values based on the size of the text will be used. The
64 // two metrics must be set together. 67 // two metrics must be set together.
65 void SetUnderlineMetrics(SkScalar thickness, SkScalar position); 68 void SetUnderlineMetrics(SkScalar thickness, SkScalar position);
66 void DrawSelection(const std::vector<Rect>& selection, SkColor color); 69 void DrawSelection(const std::vector<Rect>& selection, SkColor color);
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 // Lines computed by EnsureLayout. These should be invalidated with 729 // Lines computed by EnsureLayout. These should be invalidated with
727 // ResetLayout and on |display_rect_| changes. 730 // ResetLayout and on |display_rect_| changes.
728 std::vector<internal::Line> lines_; 731 std::vector<internal::Line> lines_;
729 732
730 DISALLOW_COPY_AND_ASSIGN(RenderText); 733 DISALLOW_COPY_AND_ASSIGN(RenderText);
731 }; 734 };
732 735
733 } // namespace gfx 736 } // namespace gfx
734 737
735 #endif // UI_GFX_RENDER_TEXT_H_ 738 #endif // UI_GFX_RENDER_TEXT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698