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

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

Issue 12221005: Add flag to disable impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Consolidated switch checking Created 7 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
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 settings.perTilePaintingEnabled = web_settings.perTilePaintingEnabled; 46 settings.perTilePaintingEnabled = web_settings.perTilePaintingEnabled;
47 settings.acceleratedAnimationEnabled = 47 settings.acceleratedAnimationEnabled =
48 web_settings.acceleratedAnimationEnabled; 48 web_settings.acceleratedAnimationEnabled;
49 settings.pageScalePinchZoomEnabled = web_settings.pageScalePinchZoomEnabled; 49 settings.pageScalePinchZoomEnabled = web_settings.pageScalePinchZoomEnabled;
50 settings.refreshRate = web_settings.refreshRate; 50 settings.refreshRate = web_settings.refreshRate;
51 settings.defaultTileSize = web_settings.defaultTileSize; 51 settings.defaultTileSize = web_settings.defaultTileSize;
52 settings.maxUntiledLayerSize = web_settings.maxUntiledLayerSize; 52 settings.maxUntiledLayerSize = web_settings.maxUntiledLayerSize;
53 53
54 settings.rightAlignedSchedulingEnabled = 54 settings.rightAlignedSchedulingEnabled =
55 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); 55 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling);
56 settings.implSidePainting = 56 settings.implSidePainting = cc::switches::IsImplSidePaintingEnabled();
57 cmd->HasSwitch(cc::switches::kEnableImplSidePainting);
58 settings.useCheapnessEstimator = 57 settings.useCheapnessEstimator =
59 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator); 58 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator);
60 59
61 settings.calculateTopControlsPosition = 60 settings.calculateTopControlsPosition =
62 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); 61 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation);
63 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { 62 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) {
64 std::string controls_height_str = 63 std::string controls_height_str =
65 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); 64 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight);
66 double controls_height; 65 double controls_height;
67 if (base::StringToDouble(controls_height_str, &controls_height) && 66 if (base::StringToDouble(controls_height_str, &controls_height) &&
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 widget_->didCompleteSwapBuffers(); 369 widget_->didCompleteSwapBuffers();
371 } 370 }
372 371
373 // TODO(jamesr): This goes through WebViewImpl just to do suppression, refactor 372 // TODO(jamesr): This goes through WebViewImpl just to do suppression, refactor
374 // that piece out. 373 // that piece out.
375 void RenderWidgetCompositor::scheduleComposite() { 374 void RenderWidgetCompositor::scheduleComposite() {
376 client_->scheduleComposite(); 375 client_->scheduleComposite();
377 } 376 }
378 377
379 } // namespace content 378 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698