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

Unified Diff: cc/layer_tree_host.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added ContentLayer::useLCDText() Created 8 years 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
Index: cc/layer_tree_host.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index 9194e1482797750bda1ec92c0045f3c5538373bc..7b93d78ed74d1edab3138d80205980488123e425 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -104,6 +104,7 @@ LayerTreeSettings::LayerTreeSettings()
, pageScalePinchZoomEnabled(false)
, backgroundColorInsteadOfCheckerboard(false)
, showOverdrawInTracing(false)
+ , canUseLCDText(true)
, refreshRate(0)
, maxPartialTextureUpdates(std::numeric_limits<size_t>::max())
, numRasterThreads(1)
@@ -117,6 +118,12 @@ LayerTreeSettings::LayerTreeSettings()
backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard);
showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches::kTraceOverdraw);
+// TODO(alokp): Remove this hard-coded setting.
+// Platforms that need to disable LCD text must explicitly set this value.
+#if defined(OS_ANDROID)
+ canUseLCDText = false;
+#endif
+
initialDebugState.showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowPropertyChangedRects);
initialDebugState.showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowSurfaceDamageRects);
initialDebugState.showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowScreenSpaceRects);
@@ -682,7 +689,7 @@ void LayerTreeHost::updateLayers(Layer* rootLayer, ResourceUpdateQueue& queue)
}
TRACE_EVENT0("cc", "LayerTreeHost::updateLayers::calcDrawEtc");
- LayerTreeHostCommon::calculateDrawProperties(rootLayer, deviceViewportSize(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureSize, updateList);
+ LayerTreeHostCommon::calculateDrawProperties(rootLayer, deviceViewportSize(), m_deviceScaleFactor, m_pageScaleFactor, rendererCapabilities().maxTextureSize, m_settings.canUseLCDText, updateList);
}
// Reset partial texture update requests.

Powered by Google App Engine
This is Rietveld 408576698