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

Side by Side Diff: ui/gfx/render_text_win.cc

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
« ui/gfx/render_text.cc ('K') | « ui/gfx/render_text.cc ('k') | no next file » | no next file with comments »
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 #include "ui/gfx/render_text_win.h" 5 #include "ui/gfx/render_text_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/break_iterator.h" 9 #include "base/i18n/break_iterator.h"
10 #include "base/i18n/char_iterator.h" 10 #include "base/i18n/char_iterator.h"
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 748
749 std::vector<SkPoint> pos; 749 std::vector<SkPoint> pos;
750 750
751 internal::SkiaTextRenderer renderer(canvas); 751 internal::SkiaTextRenderer renderer(canvas);
752 ApplyFadeEffects(&renderer); 752 ApplyFadeEffects(&renderer);
753 ApplyTextShadows(&renderer); 753 ApplyTextShadows(&renderer);
754 754
755 renderer.SetFontRenderParams( 755 renderer.SetFontRenderParams(
756 font_list().GetPrimaryFont().GetFontRenderParams(), 756 font_list().GetPrimaryFont().GetFontRenderParams(),
757 background_is_transparent()); 757 background_is_transparent());
758 renderer.CorrectPaintFlags(background_is_transparent());
758 759
759 ApplyCompositionAndSelectionStyles(); 760 ApplyCompositionAndSelectionStyles();
760 761
761 for (size_t i = 0; i < lines().size(); ++i) { 762 for (size_t i = 0; i < lines().size(); ++i) {
762 const internal::Line& line = lines()[i]; 763 const internal::Line& line = lines()[i];
763 const Vector2d line_offset = GetLineOffset(i); 764 const Vector2d line_offset = GetLineOffset(i);
764 765
765 // Skip painting empty lines or lines outside the display rect area. 766 // Skip painting empty lines or lines outside the display rect area.
766 if (!display_rect().Intersects(Rect(PointAtOffsetFromOrigin(line_offset), 767 if (!display_rect().Intersects(Rect(PointAtOffsetFromOrigin(line_offset),
767 ToCeiledSize(line.size)))) 768 ToCeiledSize(line.size))))
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 size_t position = LayoutIndexToTextIndex(run->range.end()); 1225 size_t position = LayoutIndexToTextIndex(run->range.end());
1225 position = IndexOfAdjacentGrapheme(position, CURSOR_BACKWARD); 1226 position = IndexOfAdjacentGrapheme(position, CURSOR_BACKWARD);
1226 return SelectionModel(position, CURSOR_FORWARD); 1227 return SelectionModel(position, CURSOR_FORWARD);
1227 } 1228 }
1228 1229
1229 RenderText* RenderText::CreateNativeInstance() { 1230 RenderText* RenderText::CreateNativeInstance() {
1230 return new RenderTextWin; 1231 return new RenderTextWin;
1231 } 1232 }
1232 1233
1233 } // namespace gfx 1234 } // namespace gfx
OLDNEW
« ui/gfx/render_text.cc ('K') | « ui/gfx/render_text.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698