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

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

Issue 167953003: cc: Remove the --enable-partial-swap flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: enablepartialswap: build Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | 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) 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
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() &&
172 cmd->HasSwitch(cc::switches::kEnablePartialSwap);
173 settings.background_color_instead_of_checkerboard = 171 settings.background_color_instead_of_checkerboard =
174 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); 172 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
175 settings.show_overdraw_in_tracing = 173 settings.show_overdraw_in_tracing =
176 cmd->HasSwitch(cc::switches::kTraceOverdraw); 174 cmd->HasSwitch(cc::switches::kTraceOverdraw);
177 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled(); 175 settings.can_use_lcd_text = cc::switches::IsLCDTextEnabled();
178 settings.use_pinch_virtual_viewport = 176 settings.use_pinch_virtual_viewport =
179 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport); 177 cmd->HasSwitch(cc::switches::kEnablePinchVirtualViewport);
180 settings.allow_antialiasing &= 178 settings.allow_antialiasing &=
181 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); 179 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing);
182 180
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 widget_->OnSwapBuffersAborted(); 635 widget_->OnSwapBuffersAborted();
638 } 636 }
639 637
640 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 638 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
641 cc::ContextProvider* provider = 639 cc::ContextProvider* provider =
642 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 640 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
643 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 641 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
644 } 642 }
645 643
646 } // namespace content 644 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698