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

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

Issue 12463007: Disable partial swaps for webview guest renderer until we can figure out how to do that properly. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...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.topControlsHideThreshold = hide_threshold; 168 settings.topControlsHideThreshold = hide_threshold;
169 } 169 }
170 170
171 settings.partialSwapEnabled = 171 settings.partialSwapEnabled = widget->AllowPartialSwap() &&
172 cmd->HasSwitch(cc::switches::kEnablePartialSwap); 172 cmd->HasSwitch(cc::switches::kEnablePartialSwap);
173 settings.backgroundColorInsteadOfCheckerboard = 173 settings.backgroundColorInsteadOfCheckerboard =
174 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); 174 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
175 settings.showOverdrawInTracing = 175 settings.showOverdrawInTracing =
176 cmd->HasSwitch(cc::switches::kTraceOverdraw); 176 cmd->HasSwitch(cc::switches::kTraceOverdraw);
177 177
178 settings.initialDebugState.showFPSCounter = 178 settings.initialDebugState.showFPSCounter =
179 cmd->HasSwitch(switches::kShowFPSCounter); 179 cmd->HasSwitch(switches::kShowFPSCounter);
180 settings.initialDebugState.showPaintRects = 180 settings.initialDebugState.showPaintRects =
181 cmd->HasSwitch(switches::kShowPaintRects); 181 cmd->HasSwitch(switches::kShowPaintRects);
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 494 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
495 } 495 }
496 496
497 scoped_refptr<cc::ContextProvider> 497 scoped_refptr<cc::ContextProvider>
498 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 498 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
499 return RenderThreadImpl::current()-> 499 return RenderThreadImpl::current()->
500 OffscreenContextProviderForCompositorThread(); 500 OffscreenContextProviderForCompositorThread();
501 } 501 }
502 502
503 } // namespace content 503 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_compositing_helper.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698