| Index: cc/layer.cc
|
| diff --git a/cc/layer.cc b/cc/layer.cc
|
| index f3f9b4d0dab6c04adf7c6b032164eab4eb0c00ce..6113878e31e81f88fb4dada809aa785bbe6c73bd 100644
|
| --- a/cc/layer.cc
|
| +++ b/cc/layer.cc
|
| @@ -48,7 +48,7 @@ Layer::Layer()
|
| , m_masksToBounds(false)
|
| , m_contentsOpaque(false)
|
| , m_doubleSided(true)
|
| - , m_useLCDText(false)
|
| + , m_canUseLCDText(false)
|
| , m_preserves3D(false)
|
| , m_useParentBackfaceVisibility(false)
|
| , m_drawCheckerboardForMissingTiles(false)
|
| @@ -76,9 +76,16 @@ Layer::~Layer()
|
| removeAllChildren();
|
| }
|
|
|
| -void Layer::setUseLCDText(bool useLCDText)
|
| +void Layer::setCanUseLCDText(bool useLCDText)
|
| {
|
| - m_useLCDText = useLCDText;
|
| + if (m_canUseLCDText == useLCDText)
|
| + return;
|
| +
|
| + if (!canUseLCDTextWillChange())
|
| + return;
|
| +
|
| + m_canUseLCDText = useLCDText;
|
| + canUseLCDTextDidChange();
|
| }
|
|
|
| void Layer::setLayerTreeHost(LayerTreeHost* host)
|
| @@ -113,6 +120,11 @@ void Layer::setNeedsFullTreeSync()
|
| m_layerTreeHost->setNeedsFullTreeSync();
|
| }
|
|
|
| +bool Layer::canUseLCDTextWillChange()
|
| +{
|
| + return true;
|
| +}
|
| +
|
| gfx::Rect Layer::layerRectToContentRect(const gfx::RectF& layerRect) const
|
| {
|
| gfx::RectF contentRect = gfx::ScaleRect(layerRect, contentsScaleX(), contentsScaleY());
|
| @@ -567,7 +579,7 @@ void Layer::pushPropertiesTo(LayerImpl* layer)
|
| layer->setFilters(filters());
|
| layer->setFilter(filter());
|
| layer->setBackgroundFilters(backgroundFilters());
|
| - layer->setUseLCDText(m_useLCDText);
|
| + layer->setCanUseLCDText(m_canUseLCDText);
|
| layer->setMasksToBounds(m_masksToBounds);
|
| layer->setScrollable(m_scrollable);
|
| layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread);
|
|
|