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

Side by Side Diff: cc/layer_tree_host_impl.h

Issue 12025031: Find root scroll layer at tree activation (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_LAYER_TREE_HOST_IMPL_H_
6 #define CC_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual bool scrollBy(const gfx::Point&, const gfx::Vector2d&) OVERRIDE; 78 virtual bool scrollBy(const gfx::Point&, const gfx::Vector2d&) OVERRIDE;
79 virtual void scrollEnd() OVERRIDE; 79 virtual void scrollEnd() OVERRIDE;
80 virtual void pinchGestureBegin() OVERRIDE; 80 virtual void pinchGestureBegin() OVERRIDE;
81 virtual void pinchGestureUpdate(float, gfx::Point) OVERRIDE; 81 virtual void pinchGestureUpdate(float, gfx::Point) OVERRIDE;
82 virtual void pinchGestureEnd() OVERRIDE; 82 virtual void pinchGestureEnd() OVERRIDE;
83 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool anchor Point, float pageScale, base::TimeTicks startTime, base::TimeDelta duration) OVE RRIDE; 83 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool anchor Point, float pageScale, base::TimeTicks startTime, base::TimeDelta duration) OVE RRIDE;
84 virtual void scheduleAnimation() OVERRIDE; 84 virtual void scheduleAnimation() OVERRIDE;
85 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; 85 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE;
86 86
87 // TopControlsManagerClient implementation. 87 // TopControlsManagerClient implementation.
88 virtual LayerTreeImpl* activeTree() OVERRIDE;
89 virtual void setNeedsUpdateDrawProperties() OVERRIDE; 88 virtual void setNeedsUpdateDrawProperties() OVERRIDE;
90 virtual void setNeedsRedraw() OVERRIDE; 89 virtual void setNeedsRedraw() OVERRIDE;
90 virtual bool haveRootScrollLayer() const OVERRIDE;
91 virtual float rootScrollLayerTotalScrollY() const OVERRIDE;
91 92
92 struct CC_EXPORT FrameData : public RenderPassSink { 93 struct CC_EXPORT FrameData : public RenderPassSink {
93 FrameData(); 94 FrameData();
94 ~FrameData(); 95 ~FrameData();
95 96
96 std::vector<gfx::Rect> occludingScreenSpaceRects; 97 std::vector<gfx::Rect> occludingScreenSpaceRects;
97 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; 98 std::vector<gfx::Rect> nonOccludingScreenSpaceRects;
98 RenderPassList renderPasses; 99 RenderPassList renderPasses;
99 RenderPassIdHashMap renderPassesById; 100 RenderPassIdHashMap renderPassesById;
100 const LayerList* renderSurfaceLayerList; 101 const LayerList* renderSurfaceLayerList;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 bool initializeRenderer(scoped_ptr<OutputSurface>); 157 bool initializeRenderer(scoped_ptr<OutputSurface>);
157 bool isContextLost(); 158 bool isContextLost();
158 TileManager* tileManager() { return m_tileManager.get(); } 159 TileManager* tileManager() { return m_tileManager.get(); }
159 Renderer* renderer() { return m_renderer.get(); } 160 Renderer* renderer() { return m_renderer.get(); }
160 const RendererCapabilities& rendererCapabilities() const; 161 const RendererCapabilities& rendererCapabilities() const;
161 162
162 bool swapBuffers(); 163 bool swapBuffers();
163 164
164 void readback(void* pixels, const gfx::Rect&); 165 void readback(void* pixels, const gfx::Rect&);
165 166
167 LayerTreeImpl* activeTree() { return m_activeTree.get(); }
166 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); } 168 const LayerTreeImpl* activeTree() const { return m_activeTree.get(); }
167 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); } 169 LayerTreeImpl* pendingTree() { return m_pendingTree.get(); }
168 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); } 170 const LayerTreeImpl* pendingTree() const { return m_pendingTree.get(); }
169 void createPendingTree(); 171 void createPendingTree();
170 void checkForCompletedTextures(); 172 void checkForCompletedTextures();
171 virtual void activatePendingTreeIfNeeded(); 173 virtual void activatePendingTreeIfNeeded();
172 174
173 // Shortcuts to layers on the active tree. 175 // Shortcuts to layers on the active tree.
174 LayerImpl* rootLayer() const; 176 LayerImpl* rootLayer() const;
175 LayerImpl* rootScrollLayer() const; 177 LayerImpl* rootScrollLayer() const;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 size_t m_lastSentMemoryUseBytes; 354 size_t m_lastSentMemoryUseBytes;
353 355
354 scoped_ptr<AnimationRegistrar> m_animationRegistrar; 356 scoped_ptr<AnimationRegistrar> m_animationRegistrar;
355 357
356 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 358 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
357 }; 359 };
358 360
359 } // namespace cc 361 } // namespace cc
360 362
361 #endif // CC_LAYER_TREE_HOST_IMPL_H_ 363 #endif // CC_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layer_tree_host.cc ('k') | cc/layer_tree_host_impl.cc » ('j') | cc/layer_tree_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698