From 5adaaaa1bc1aa4bcdfed14259d81c6bdf30618a6 Mon Sep 17 00:00:00 2001 From: "yusufo@chromium.org" Date: Thu, 10 Jan 2013 04:45:52 +0000 Subject: Remove flags for nonFastScrollable and touchEventHandler regions getting changed Currently, two flags are controlling whether we push these regions to layerImpl from layer and with implSidePainting, we end up not pushing the regions at all since the flags are flipped back after pusing them once. Removing both flags to make sure we get the regions carried over. BUG=168929 Review URL: https://chromiumcodereview.appspot.com/11829041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176024 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/layer.cc | 16 ++-------------- cc/layer.h | 4 ---- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/cc/layer.cc b/cc/layer.cc index f64c319..8025f0d 100644 --- a/cc/layer.cc +++ b/cc/layer.cc @@ -35,8 +35,6 @@ Layer::Layer() , m_scrollable(false) , m_shouldScrollOnMainThread(false) , m_haveWheelEventHandlers(false) - , m_nonFastScrollableRegionChanged(false) - , m_touchEventHandlerRegionChanged(false) , m_anchorPoint(0.5, 0.5) , m_backgroundColor(0) , m_opacity(1.0) @@ -483,7 +481,6 @@ void Layer::setNonFastScrollableRegion(const Region& region) if (m_nonFastScrollableRegion == region) return; m_nonFastScrollableRegion = region; - m_nonFastScrollableRegionChanged = true; setNeedsCommit(); } @@ -492,7 +489,6 @@ void Layer::setTouchEventHandlerRegion(const Region& region) if (m_touchEventHandlerRegion == region) return; m_touchEventHandlerRegion = region; - m_touchEventHandlerRegionChanged = true; } void Layer::setDrawCheckerboardForMissingTiles(bool checkerboard) @@ -601,16 +597,8 @@ void Layer::pushPropertiesTo(LayerImpl* layer) layer->setScrollable(m_scrollable); layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread); layer->setHaveWheelEventHandlers(m_haveWheelEventHandlers); - // Copying a Region is more expensive than most layer properties, since it involves copying two Vectors that may be - // arbitrarily large depending on page content, so we only push the property if it's changed. - if (m_nonFastScrollableRegionChanged) { - layer->setNonFastScrollableRegion(m_nonFastScrollableRegion); - m_nonFastScrollableRegionChanged = false; - } - if (m_touchEventHandlerRegionChanged) { - layer->setTouchEventHandlerRegion(m_touchEventHandlerRegion); - m_touchEventHandlerRegionChanged = false; - } + layer->setNonFastScrollableRegion(m_nonFastScrollableRegion); + layer->setTouchEventHandlerRegion(m_touchEventHandlerRegion); layer->setContentsOpaque(m_contentsOpaque); if (!opacityIsAnimating()) layer->setOpacity(m_opacity); diff --git a/cc/layer.h b/cc/layer.h index c769394..5f61d14 100644 --- a/cc/layer.h +++ b/cc/layer.h @@ -165,11 +165,9 @@ public: bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } void setNonFastScrollableRegion(const Region&); - void setNonFastScrollableRegionChanged() { m_nonFastScrollableRegionChanged = true; } const Region& nonFastScrollableRegion() const { return m_nonFastScrollableRegion; } void setTouchEventHandlerRegion(const Region&); - void setTouchEventHandlerRegionChanged() { m_touchEventHandlerRegionChanged = true; } const Region& touchEventHandlerRegion() const { return m_touchEventHandlerRegion; } void setLayerScrollClient(WebKit::WebLayerScrollClient* layerScrollClient) { m_layerScrollClient = layerScrollClient; } @@ -364,9 +362,7 @@ private: bool m_shouldScrollOnMainThread; bool m_haveWheelEventHandlers; Region m_nonFastScrollableRegion; - bool m_nonFastScrollableRegionChanged; Region m_touchEventHandlerRegion; - bool m_touchEventHandlerRegionChanged; gfx::PointF m_position; gfx::PointF m_anchorPoint; SkColor m_backgroundColor; -- cgit v1.1