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

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: Comments 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) { 165 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) {
166 std::string top_threshold_str = 166 std::string top_threshold_str =
167 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); 167 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold);
168 double hide_threshold; 168 double hide_threshold;
169 if (base::StringToDouble(top_threshold_str, &hide_threshold) && 169 if (base::StringToDouble(top_threshold_str, &hide_threshold) &&
170 hide_threshold >= 0.f && hide_threshold <= 1.f) 170 hide_threshold >= 0.f && hide_threshold <= 1.f)
171 settings.topControlsHideThreshold = hide_threshold; 171 settings.topControlsHideThreshold = hide_threshold;
172 } 172 }
173 173
174 settings.partialSwapEnabled = 174 settings.partialSwapEnabled = web_settings.partialSwapEnabled &&
jamesr 2013/03/06 19:30:28 No, please don't add more dependencies on web_sett
175 cmd->HasSwitch(cc::switches::kEnablePartialSwap); 175 cmd->HasSwitch(cc::switches::kEnablePartialSwap);
176 settings.backgroundColorInsteadOfCheckerboard = 176 settings.backgroundColorInsteadOfCheckerboard =
177 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); 177 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
178 settings.showOverdrawInTracing = 178 settings.showOverdrawInTracing =
179 cmd->HasSwitch(cc::switches::kTraceOverdraw); 179 cmd->HasSwitch(cc::switches::kTraceOverdraw);
180 180
181 settings.initialDebugState.showFPSCounter = 181 settings.initialDebugState.showFPSCounter =
182 cmd->HasSwitch(switches::kShowFPSCounter); 182 cmd->HasSwitch(switches::kShowFPSCounter);
183 settings.initialDebugState.showPaintRects = 183 settings.initialDebugState.showPaintRects =
184 cmd->HasSwitch(switches::kShowPaintRects); 184 cmd->HasSwitch(switches::kShowPaintRects);
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 scoped_refptr<cc::ContextProvider> 560 scoped_refptr<cc::ContextProvider>
561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
562 if (!contexts_compositor_thread_ || 562 if (!contexts_compositor_thread_ ||
563 contexts_compositor_thread_->DestroyedOnMainThread()) 563 contexts_compositor_thread_->DestroyedOnMainThread())
564 contexts_compositor_thread_ = new CompositorThreadContextProvider; 564 contexts_compositor_thread_ = new CompositorThreadContextProvider;
565 return contexts_compositor_thread_; 565 return contexts_compositor_thread_;
566 } 566 }
567 567
568 } // namespace content 568 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698