[cc] Fold more update calls into updateDrawProperties
(Reland of https://codereview.chromium.org/11529006/)
Now that we have a clean update system, we can remove the manual
calling of updateRootScrollLayerImplTransform and other similar kinds of "I'm going to do something manually in a half dozen places because I can." This removes some surface area
on LTHI which helps with the LTHI->LTI push.
BUG=155209
TBR=enne
Review URL: https://chromiumcodereview.appspot.com/11573069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173820 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/layer_tree_host_impl.h b/cc/layer_tree_host_impl.h
index 5337f19..c7e9c0b4 100644
--- a/cc/layer_tree_host_impl.h
+++ b/cc/layer_tree_host_impl.h
@@ -53,7 +53,7 @@
// PinchZoomViewport models the bounds and offset of the viewport that is used during a pinch-zoom operation.
// It tracks the layout-space dimensions of the viewport before any applied scale, and then tracks the layout-space
// coordinates of the viewport respecting the pinch settings.
-class PinchZoomViewport {
+class CC_EXPORT PinchZoomViewport {
public:
PinchZoomViewport();
@@ -259,8 +259,6 @@
void renderingStats(RenderingStats*) const;
- void updateRootScrollLayerImplTransform();
-
void sendManagedMemoryStats(
size_t memoryVisibleBytes,
size_t memoryVisibleAndNearbyBytes,
@@ -305,18 +303,11 @@
template<typename RenderPassCuller>
static void removeRenderPasses(RenderPassCuller, FrameData&);
+ float totalPageScaleFactorForTesting() const { return m_pinchZoomViewport.totalPageScaleFactor(); }
+
protected:
LayerTreeHostImpl(const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*);
- void animatePageScale(base::TimeTicks monotonicTime);
- void animateScrollbars(base::TimeTicks monotonicTime);
-
- void updateDrawProperties();
-
- // Exposed for testing.
- void calculateRenderSurfaceLayerList(LayerList&);
- void resetNeedsUpdateDrawPropertiesForTesting() { m_needsUpdateDrawProperties = false; }
-
// Virtual for testing.
virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClockTime);
@@ -327,6 +318,11 @@
Proxy* m_proxy;
private:
+ void animatePageScale(base::TimeTicks monotonicTime);
+ void animateScrollbars(base::TimeTicks monotonicTime);
+
+ void updateDrawProperties();
+
void computeDoubleTapZoomDeltas(ScrollAndScaleSet* scrollInfo);
void computePinchZoomDeltas(ScrollAndScaleSet* scrollInfo);
void makeScrollAndScaleSet(ScrollAndScaleSet* scrollInfo, gfx::Vector2d scrollOffset, float pageScale);