OLD | NEW |
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) { | 162 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) { |
163 std::string top_threshold_str = | 163 std::string top_threshold_str = |
164 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); | 164 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); |
165 double hide_threshold; | 165 double hide_threshold; |
166 if (base::StringToDouble(top_threshold_str, &hide_threshold) && | 166 if (base::StringToDouble(top_threshold_str, &hide_threshold) && |
167 hide_threshold >= 0.f && hide_threshold <= 1.f) | 167 hide_threshold >= 0.f && hide_threshold <= 1.f) |
168 settings.top_controls_hide_threshold = hide_threshold; | 168 settings.top_controls_hide_threshold = hide_threshold; |
169 } | 169 } |
170 | 170 |
171 settings.partial_swap_enabled = widget->AllowPartialSwap() && | 171 #if !defined(USE_AURA) |
172 cmd->HasSwitch(cc::switches::kEnablePartialSwap); | 172 // This flag only affects renderers that are not using ubercomp. |
| 173 settings.partial_swap_enabled = widget->AllowPartialSwap(); |
| 174 #endif |
| 175 |
173 settings.background_color_instead_of_checkerboard = | 176 settings.background_color_instead_of_checkerboard = |
174 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); | 177 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); |
175 settings.show_overdraw_in_tracing = | 178 settings.show_overdraw_in_tracing = |
176 cmd->HasSwitch(cc::switches::kTraceOverdraw); | 179 cmd->HasSwitch(cc::switches::kTraceOverdraw); |
177 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled(); | 180 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled(); |
178 settings.use_pinch_virtual_viewport = | 181 settings.use_pinch_virtual_viewport = |
179 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); | 182 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); |
180 settings.allow_antialiasing &= | 183 settings.allow_antialiasing &= |
181 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); | 184 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); |
182 | 185 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 widget_->OnSwapBuffersAborted(); | 640 widget_->OnSwapBuffersAborted(); |
638 } | 641 } |
639 | 642 |
640 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 643 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
641 cc::ContextProvider* provider = | 644 cc::ContextProvider* provider = |
642 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 645 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
643 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 646 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
644 } | 647 } |
645 | 648 |
646 } // namespace content | 649 } // namespace content |
OLD | NEW |