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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 12147005: Hardcode scrollbar rendering for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hardcoded scrollbar not using layer structure. similar to M18 approach Created 7 years, 10 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
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index d1e90409007a922b5268a96b5b7f4a61af1e3151..9d8c7ba10579ed7ea228e4dbb9a0861519cd4169 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -159,6 +159,7 @@ LayerTreeHostImpl::LayerTreeHostImpl(const LayerTreeSettings& settings, LayerTre
, m_lastSentMemoryVisibleAndNearbyBytes(0)
, m_lastSentMemoryUseBytes(0)
, m_animationRegistrar(AnimationRegistrar::create())
+ , m_hardcodedScrollbar(this)
{
DCHECK(m_proxy->isImplThread());
didVisibilityChange(this, m_visible);
@@ -244,6 +245,7 @@ void LayerTreeHostImpl::animate(base::TimeTicks monotonicTime, base::Time wallCl
animateScrollbars(monotonicTime);
if (m_topControlsManager)
m_topControlsManager->Animate(monotonicTime);
+ m_hardcodedScrollbar.Animate(monotonicTime);
danakj 2013/02/05 17:55:02 why isn't this in animateScrollbars?
}
void LayerTreeHostImpl::manageTiles()
@@ -527,6 +529,8 @@ bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame)
appendQuadsToFillScreen(frame.renderPasses.back(), rootLayer(), activeTree()->background_color(), occlusionTracker);
}
+ m_hardcodedScrollbar.PrependQuads(frame.renderPasses.back());
+
if (drawFrame)
occlusionTracker.overdrawMetrics().recordMetrics(this);
@@ -1334,6 +1338,7 @@ bool LayerTreeHostImpl::scrollBy(const gfx::Point& viewportPoint,
m_client->setNeedsCommitOnImplThread();
m_client->setNeedsRedrawOnImplThread();
m_client->renewTreePriority();
+ m_hardcodedScrollbar.DidUpdateScrollOffset(base::TimeTicks::Now());
}
return didScroll;
}
@@ -1383,6 +1388,7 @@ void LayerTreeHostImpl::pinchGestureUpdate(float magnifyDelta, gfx::Point anchor
if (rootScrollLayer()->scrollbarAnimationController())
rootScrollLayer()->scrollbarAnimationController()->didPinchGestureUpdate(base::TimeTicks::Now());
+ m_hardcodedScrollbar.DidPinchGestureUpdate(base::TimeTicks::Now());
m_client->setNeedsCommitOnImplThread();
m_client->setNeedsRedrawOnImplThread();
@@ -1395,6 +1401,7 @@ void LayerTreeHostImpl::pinchGestureEnd()
if (rootScrollLayer() && rootScrollLayer()->scrollbarAnimationController())
rootScrollLayer()->scrollbarAnimationController()->didPinchGestureEnd(base::TimeTicks::Now());
+ m_hardcodedScrollbar.DidPinchGestureEnd(base::TimeTicks::Now());
m_client->setNeedsCommitOnImplThread();
}
« cc/hardcoded_scrollbar.cc ('K') | « cc/layer_tree_host_impl.h ('k') | ui/gfx/vector2d_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698