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

Unified Diff: cc/layer.cc

Issue 11377013: Add touchEventHandlerRegion to Layer and LayerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed OVERRIDE from web_layer_impl 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
« no previous file with comments | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer.cc
diff --git a/cc/layer.cc b/cc/layer.cc
index 1377dec1a7f0ece61ffd07a17ad23135ea48c34e..158279c3a9f464c75e256a0083f2f315692c7392 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -41,6 +41,7 @@ Layer::Layer()
, m_shouldScrollOnMainThread(false)
, m_haveWheelEventHandlers(false)
, m_nonFastScrollableRegionChanged(false)
+ , m_touchEventHandlerRegionChanged(false)
, m_anchorPoint(0.5, 0.5)
, m_backgroundColor(0)
, m_debugBorderColor(0)
@@ -459,6 +460,14 @@ void Layer::setNonFastScrollableRegion(const Region& region)
setNeedsCommit();
}
+void Layer::setTouchEventHandlerRegion(const Region& region)
+{
+ if (m_touchEventHandlerRegion == region)
+ return;
+ m_touchEventHandlerRegion = region;
+ m_touchEventHandlerRegionChanged = true;
+}
+
void Layer::setDrawCheckerboardForMissingTiles(bool checkerboard)
{
if (m_drawCheckerboardForMissingTiles == checkerboard)
@@ -579,6 +588,10 @@ void Layer::pushPropertiesTo(LayerImpl* layer)
layer->setNonFastScrollableRegion(m_nonFastScrollableRegion);
m_nonFastScrollableRegionChanged = false;
}
+ if (m_touchEventHandlerRegionChanged) {
+ layer->setTouchEventHandlerRegion(m_touchEventHandlerRegion);
+ m_touchEventHandlerRegionChanged = false;
+ }
layer->setContentsOpaque(m_contentsOpaque);
if (!opacityIsAnimating())
layer->setOpacity(m_opacity);
« no previous file with comments | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698