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

Unified Diff: cc/tiled_layer.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: rebase with TOT, addressed comments 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
Index: cc/tiled_layer.cc
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc
index 77be6eb93aacac1529c0a883400d410a42524415..2c6e4631d2cce101be1b408b9771dad4c7634a41 100644
--- a/cc/tiled_layer.cc
+++ b/cc/tiled_layer.cc
@@ -272,18 +272,11 @@ void TiledLayer::setNeedsDisplayRect(const gfx::RectF& dirtyRect)
ContentsScalingLayer::setNeedsDisplayRect(dirtyRect);
}
-void TiledLayer::setUseLCDText(bool useLCDText)
-{
- ContentsScalingLayer::setUseLCDText(useLCDText);
-
- LayerTilingData::BorderTexelOption borderTexelOption;
-#if defined(OS_ANDROID)
- // Always want border texels and GL_LINEAR due to pinch zoom.
- borderTexelOption = LayerTilingData::HasBorderTexels;
-#else
- borderTexelOption = useLCDText ? LayerTilingData::NoBorderTexels : LayerTilingData::HasBorderTexels;
-#endif
- setBorderTexelOption(borderTexelOption);
+void TiledLayer::setCanUseLCDText(bool useLCDText)
enne (OOO) 2012/11/14 17:42:15 Where's the invalidation here if this setting chan
alokp 2012/11/16 04:41:11 It was indirectly happening when tile layers were
enne (OOO) 2012/11/16 17:36:38 Ah, great. Thanks for the unit test. :)
+{
+ ContentsScalingLayer::setCanUseLCDText(useLCDText);
+
+ setBorderTexelOption(useLCDText ? LayerTilingData::NoBorderTexels : LayerTilingData::HasBorderTexels);
}
void TiledLayer::invalidateContentRect(const gfx::Rect& contentRect)

Powered by Google App Engine
This is Rietveld 408576698