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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 266743003: Add flag to enable rendering of text using signed distance fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bug fix; requested clean-up Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // render_thread may be NULL in tests. 144 // render_thread may be NULL in tests.
145 if (render_thread) { 145 if (render_thread) {
146 settings.impl_side_painting = 146 settings.impl_side_painting =
147 render_thread->is_impl_side_painting_enabled(); 147 render_thread->is_impl_side_painting_enabled();
148 settings.gpu_rasterization_forced = 148 settings.gpu_rasterization_forced =
149 render_thread->is_gpu_rasterization_forced(); 149 render_thread->is_gpu_rasterization_forced();
150 settings.gpu_rasterization_enabled = 150 settings.gpu_rasterization_enabled =
151 render_thread->is_gpu_rasterization_enabled(); 151 render_thread->is_gpu_rasterization_enabled();
152 settings.create_low_res_tiling = render_thread->is_low_res_tiling_enabled(); 152 settings.create_low_res_tiling = render_thread->is_low_res_tiling_enabled();
153 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled(); 153 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled();
154 settings.use_distance_field_text =
155 render_thread->is_distance_field_text_enabled();
154 settings.use_zero_copy = render_thread->is_zero_copy_enabled(); 156 settings.use_zero_copy = render_thread->is_zero_copy_enabled();
155 settings.use_one_copy = render_thread->is_one_copy_enabled(); 157 settings.use_one_copy = render_thread->is_one_copy_enabled();
156 } 158 }
157 159
158 settings.calculate_top_controls_position = 160 settings.calculate_top_controls_position =
159 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); 161 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation);
160 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { 162 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) {
161 std::string controls_height_str = 163 std::string controls_height_str =
162 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); 164 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight);
163 double controls_height; 165 double controls_height;
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 widget_->OnSwapBuffersAborted(); 694 widget_->OnSwapBuffersAborted();
693 } 695 }
694 696
695 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 697 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
696 cc::ContextProvider* provider = 698 cc::ContextProvider* provider =
697 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 699 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
698 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 700 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
699 } 701 }
700 702
701 } // namespace content 703 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698