Commit 5adaaaa1 authored by yusufo@chromium.org's avatar yusufo@chromium.org

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
parent 07cb56d2
...@@ -35,8 +35,6 @@ Layer::Layer() ...@@ -35,8 +35,6 @@ Layer::Layer()
, m_scrollable(false) , m_scrollable(false)
, m_shouldScrollOnMainThread(false) , m_shouldScrollOnMainThread(false)
, m_haveWheelEventHandlers(false) , m_haveWheelEventHandlers(false)
, m_nonFastScrollableRegionChanged(false)
, m_touchEventHandlerRegionChanged(false)
, m_anchorPoint(0.5, 0.5) , m_anchorPoint(0.5, 0.5)
, m_backgroundColor(0) , m_backgroundColor(0)
, m_opacity(1.0) , m_opacity(1.0)
...@@ -483,7 +481,6 @@ void Layer::setNonFastScrollableRegion(const Region& region) ...@@ -483,7 +481,6 @@ void Layer::setNonFastScrollableRegion(const Region& region)
if (m_nonFastScrollableRegion == region) if (m_nonFastScrollableRegion == region)
return; return;
m_nonFastScrollableRegion = region; m_nonFastScrollableRegion = region;
m_nonFastScrollableRegionChanged = true;
setNeedsCommit(); setNeedsCommit();
} }
...@@ -492,7 +489,6 @@ void Layer::setTouchEventHandlerRegion(const Region& region) ...@@ -492,7 +489,6 @@ void Layer::setTouchEventHandlerRegion(const Region& region)
if (m_touchEventHandlerRegion == region) if (m_touchEventHandlerRegion == region)
return; return;
m_touchEventHandlerRegion = region; m_touchEventHandlerRegion = region;
m_touchEventHandlerRegionChanged = true;
} }
void Layer::setDrawCheckerboardForMissingTiles(bool checkerboard) void Layer::setDrawCheckerboardForMissingTiles(bool checkerboard)
...@@ -601,16 +597,8 @@ void Layer::pushPropertiesTo(LayerImpl* layer) ...@@ -601,16 +597,8 @@ void Layer::pushPropertiesTo(LayerImpl* layer)
layer->setScrollable(m_scrollable); layer->setScrollable(m_scrollable);
layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread); layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread);
layer->setHaveWheelEventHandlers(m_haveWheelEventHandlers); layer->setHaveWheelEventHandlers(m_haveWheelEventHandlers);
// Copying a Region is more expensive than most layer properties, since it involves copying two Vectors that may be layer->setNonFastScrollableRegion(m_nonFastScrollableRegion);
// arbitrarily large depending on page content, so we only push the property if it's changed. layer->setTouchEventHandlerRegion(m_touchEventHandlerRegion);
if (m_nonFastScrollableRegionChanged) {
layer->setNonFastScrollableRegion(m_nonFastScrollableRegion);
m_nonFastScrollableRegionChanged = false;
}
if (m_touchEventHandlerRegionChanged) {
layer->setTouchEventHandlerRegion(m_touchEventHandlerRegion);
m_touchEventHandlerRegionChanged = false;
}
layer->setContentsOpaque(m_contentsOpaque); layer->setContentsOpaque(m_contentsOpaque);
if (!opacityIsAnimating()) if (!opacityIsAnimating())
layer->setOpacity(m_opacity); layer->setOpacity(m_opacity);
......
...@@ -165,11 +165,9 @@ public: ...@@ -165,11 +165,9 @@ public:
bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; } bool haveWheelEventHandlers() const { return m_haveWheelEventHandlers; }
void setNonFastScrollableRegion(const Region&); void setNonFastScrollableRegion(const Region&);
void setNonFastScrollableRegionChanged() { m_nonFastScrollableRegionChanged = true; }
const Region& nonFastScrollableRegion() const { return m_nonFastScrollableRegion; } const Region& nonFastScrollableRegion() const { return m_nonFastScrollableRegion; }
void setTouchEventHandlerRegion(const Region&); void setTouchEventHandlerRegion(const Region&);
void setTouchEventHandlerRegionChanged() { m_touchEventHandlerRegionChanged = true; }
const Region& touchEventHandlerRegion() const { return m_touchEventHandlerRegion; } const Region& touchEventHandlerRegion() const { return m_touchEventHandlerRegion; }
void setLayerScrollClient(WebKit::WebLayerScrollClient* layerScrollClient) { m_layerScrollClient = layerScrollClient; } void setLayerScrollClient(WebKit::WebLayerScrollClient* layerScrollClient) { m_layerScrollClient = layerScrollClient; }
...@@ -364,9 +362,7 @@ private: ...@@ -364,9 +362,7 @@ private:
bool m_shouldScrollOnMainThread; bool m_shouldScrollOnMainThread;
bool m_haveWheelEventHandlers; bool m_haveWheelEventHandlers;
Region m_nonFastScrollableRegion; Region m_nonFastScrollableRegion;
bool m_nonFastScrollableRegionChanged;
Region m_touchEventHandlerRegion; Region m_touchEventHandlerRegion;
bool m_touchEventHandlerRegionChanged;
gfx::PointF m_position; gfx::PointF m_position;
gfx::PointF m_anchorPoint; gfx::PointF m_anchorPoint;
SkColor m_backgroundColor; SkColor m_backgroundColor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment