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

Unified Diff: cc/layer.cc

Issue 11975007: Implement one-page-at-a-time mousewheel scrolling in the impl thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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') | cc/layer_tree_host_impl.cc » ('J')
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 56ae606163cfbbefb1a97a1fa50ac7e713a5635c..76520348a9ec8c2adaaa46810902ced8e94a3e5d 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -452,6 +452,15 @@ void Layer::setMaxScrollOffset(gfx::Vector2d maxScrollOffset)
setNeedsCommit();
}
+void Layer::setVisibleScrollArea(gfx::Size visibleScrollArea)
+{
+ if (m_visibleScrollArea == visibleScrollArea)
+ return;
+ m_visibleScrollArea = visibleScrollArea;
+ setNeedsCommit();
+}
+
+
void Layer::setScrollable(bool scrollable)
{
if (m_scrollable == scrollable)
@@ -613,6 +622,7 @@ void Layer::pushPropertiesTo(LayerImpl* layer)
layer->setScrollable(m_scrollable);
layer->setScrollOffset(m_scrollOffset);
layer->setMaxScrollOffset(m_maxScrollOffset);
+ layer->setVisibleScrollArea(m_visibleScrollArea);
// If the main thread commits multiple times before the impl thread actually draws, then damage tracking
// will become incorrect if we simply clobber the updateRect here. The LayerImpl's updateRect needs to
« no previous file with comments | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | cc/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698