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

Unified Diff: cc/layer_tree_host.cc

Issue 11361223: cc: Remove cc::settings, move them to LayerTreeSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index ade46eb58803189bfb46d6b71785f6ce46ddce6f..79266dea2290a57639d5e3fa87c5152c78eb3366 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -20,7 +20,6 @@
#include "cc/math_util.h"
#include "cc/occlusion_tracker.h"
#include "cc/overdraw_metrics.h"
-#include "cc/settings.h"
#include "cc/single_thread_proxy.h"
#include "cc/switches.h"
#include "cc/thread.h"
@@ -47,6 +46,13 @@ LayerTreeSettings::LayerTreeSettings()
, showReplicaScreenSpaceRects(false)
, showOccludingRects(false)
, renderVSyncEnabled(true)
+ , perTilePaintingEnabled(false)
+ , partialSwapEnabled(false)
+ , acceleratedAnimationEnabled(false)
+ , pageScalePinchZoomEnabled(false)
+ , jankInsteadOfCheckerboard(false)
slavi 2012/11/14 00:54:58 Wasn't jank-instead-of-checkerboard removed a coup
danakj 2012/11/14 00:56:36 it's in the process of dying in the CQ.
+ , backgroundColorInsteadOfCheckerboard(false)
+ , showOverdrawInTracing(false)
, refreshRate(0)
, maxPartialTextureUpdates(std::numeric_limits<size_t>::max())
, defaultTileSize(gfx::Size(256, 256))
@@ -59,6 +65,10 @@ LayerTreeSettings::LayerTreeSettings()
showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowScreenSpaceRects);
showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects);
showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowOccludingRects);
+ partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePartialSwap);
+ jankInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(switches::kJankInsteadOfCheckerboard);
+ backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard);
+ showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches::kTraceOverdraw);
}
LayerTreeSettings::~LayerTreeSettings()
@@ -545,7 +555,7 @@ void LayerTreeHost::updateLayers(Layer* rootLayer, ResourceUpdateQueue& queue)
LayerList updateList;
{
- if (Settings::pageScalePinchZoomEnabled()) {
+ if (m_settings.pageScalePinchZoomEnabled) {
Layer* rootScroll = findFirstScrollableLayer(rootLayer);
if (rootScroll)
rootScroll->setImplTransform(m_implTransform);
@@ -672,7 +682,7 @@ bool LayerTreeHost::paintLayerContents(const LayerList& renderSurfaceLayerList,
typedef LayerIterator<Layer, LayerList, RenderSurface, LayerIteratorActions::FrontToBack> LayerIteratorType;
bool needMoreUpdates = false;
- bool recordMetricsForFrame = Settings::traceOverdraw() && base::debug::TraceLog::GetInstance() && base::debug::TraceLog::GetInstance()->IsEnabled();
+ bool recordMetricsForFrame = m_settings.showOverdrawInTracing && base::debug::TraceLog::GetInstance() && base::debug::TraceLog::GetInstance()->IsEnabled();
OcclusionTracker occlusionTracker(m_rootLayer->renderSurface()->contentRect(), recordMetricsForFrame);
occlusionTracker.setMinimumTrackingSize(m_settings.minimumOcclusionTrackingSize);
@@ -803,7 +813,7 @@ void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor)
void LayerTreeHost::animateLayers(base::TimeTicks time)
{
- if (!Settings::acceleratedAnimationEnabled() || !m_needsAnimateLayers)
+ if (!m_settings.acceleratedAnimationEnabled || !m_needsAnimateLayers)
return;
TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers");
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698