diff options
Diffstat (limited to 'cc/content_layer.cc')
-rw-r--r-- | cc/content_layer.cc | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/cc/content_layer.cc b/cc/content_layer.cc index 4b051ad..5fa5636 100644 --- a/cc/content_layer.cc +++ b/cc/content_layer.cc @@ -5,7 +5,6 @@ #include "cc/content_layer.h" #include "base/auto_reset.h" -#include "base/debug/trace_event.h" #include "base/metrics/histogram.h" #include "base/time.h" #include "cc/bitmap_content_layer_updater.h" @@ -39,8 +38,6 @@ void ContentLayerPainter::paint(SkCanvas* canvas, gfx::Rect contentRect, gfx::Re pixelsPerSec / 1000000, 10, 210, 30); } -const int ContentLayer::kLCDTextMaxChangeCount = 1; - scoped_refptr<ContentLayer> ContentLayer::create(ContentLayerClient* client) { return make_scoped_refptr(new ContentLayer(client)); @@ -49,8 +46,6 @@ scoped_refptr<ContentLayer> ContentLayer::create(ContentLayerClient* client) ContentLayer::ContentLayer(ContentLayerClient* client) : TiledLayer() , m_client(client) - , m_useLCDText(false) - , m_lcdTextChangeCount(0) { } @@ -77,7 +72,6 @@ void ContentLayer::update(ResourceUpdateQueue& queue, const OcclusionTracker* oc base::AutoReset<bool> ignoreSetNeedsCommit(&m_ignoreSetNeedsCommit, true); createUpdaterIfNeeded(); - updateUseLCDText(); } TiledLayer::update(queue, occlusion, stats); @@ -118,38 +112,4 @@ void ContentLayer::setContentsOpaque(bool opaque) m_updater->setOpaque(opaque); } -void ContentLayer::updateUseLCDText() -{ - if (m_useLCDText == drawProperties().can_use_lcd_text) - return; - - if (!useLCDTextWillChange()) - return; - - m_useLCDText = drawProperties().can_use_lcd_text; - useLCDTextDidChange(); -} - -bool ContentLayer::useLCDTextWillChange() const -{ - // Always allow disabling LCD text. - if (m_useLCDText) - return true; - - return m_lcdTextChangeCount < kLCDTextMaxChangeCount; -} - -void ContentLayer::useLCDTextDidChange() -{ - if (m_lcdTextChangeCount > 0) { - // Do not record the first time LCD text is enabled because - // it does not really cause any invalidation. - TRACE_EVENT_INSTANT0("cc", "ContentLayer::canUseLCDTextDidChange"); - } - ++m_lcdTextChangeCount; - - // Need to repaint the layer with different text AA setting. - setNeedsDisplay(); -} - } // namespace cc |