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

Side by Side Diff: cc/CCLayerTreeHostImpl.h

Issue 10917153: Update cc snapshot to r127918 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « cc/CCLayerTreeHostClient.h ('k') | cc/CCLayerTreeHostImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CCLayerTreeHostImpl_h 5 #ifndef CCLayerTreeHostImpl_h
6 #define CCLayerTreeHostImpl_h 6 #define CCLayerTreeHostImpl_h
7 7
8 #include "CCAnimationEvents.h" 8 #include "CCAnimationEvents.h"
9 #include "CCInputHandler.h" 9 #include "CCInputHandler.h"
10 #include "CCLayerSorter.h" 10 #include "CCLayerSorter.h"
11 #include "CCRenderPass.h" 11 #include "CCRenderPass.h"
12 #include "CCRenderPassSink.h" 12 #include "CCRenderPassSink.h"
13 #include "CCRenderer.h" 13 #include "CCRenderer.h"
14 #include "SkColor.h" 14 #include "SkColor.h"
15 #include <public/WebCompositorOutputSurfaceClient.h> 15 #include <public/WebCompositorOutputSurfaceClient.h>
16 #include <wtf/PassOwnPtr.h> 16 #include <wtf/PassOwnPtr.h>
17 #include <wtf/RefPtr.h> 17 #include <wtf/RefPtr.h>
18 18
19 namespace WebCore { 19 namespace WebCore {
20 20
21 class CCActiveGestureAnimation;
22 class CCCompletionEvent; 21 class CCCompletionEvent;
23 class CCDebugRectHistory; 22 class CCDebugRectHistory;
24 class CCFrameRateCounter; 23 class CCFrameRateCounter;
25 class CCHeadsUpDisplayLayerImpl; 24 class CCHeadsUpDisplayLayerImpl;
26 class CCLayerImpl; 25 class CCLayerImpl;
27 class CCLayerTreeHostImplTimeSourceAdapter; 26 class CCLayerTreeHostImplTimeSourceAdapter;
28 class CCPageScaleAnimation; 27 class CCPageScaleAnimation;
29 class CCRenderPassDrawQuad; 28 class CCRenderPassDrawQuad;
30 class CCResourceProvider; 29 class CCResourceProvider;
31 struct RendererCapabilities; 30 struct RendererCapabilities;
(...skipping 23 matching lines...) Expand all
55 virtual ~CCLayerTreeHostImpl(); 54 virtual ~CCLayerTreeHostImpl();
56 55
57 // CCInputHandlerClient implementation 56 // CCInputHandlerClient implementation
58 virtual CCInputHandlerClient::ScrollStatus scrollBegin(const IntPoint&, CCIn putHandlerClient::ScrollInputType) OVERRIDE; 57 virtual CCInputHandlerClient::ScrollStatus scrollBegin(const IntPoint&, CCIn putHandlerClient::ScrollInputType) OVERRIDE;
59 virtual void scrollBy(const IntPoint&, const IntSize&) OVERRIDE; 58 virtual void scrollBy(const IntPoint&, const IntSize&) OVERRIDE;
60 virtual void scrollEnd() OVERRIDE; 59 virtual void scrollEnd() OVERRIDE;
61 virtual void pinchGestureBegin() OVERRIDE; 60 virtual void pinchGestureBegin() OVERRIDE;
62 virtual void pinchGestureUpdate(float, const IntPoint&) OVERRIDE; 61 virtual void pinchGestureUpdate(float, const IntPoint&) OVERRIDE;
63 virtual void pinchGestureEnd() OVERRIDE; 62 virtual void pinchGestureEnd() OVERRIDE;
64 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool anc horPoint, float pageScale, double startTime, double duration) OVERRIDE; 63 virtual void startPageScaleAnimation(const IntSize& targetPosition, bool anc horPoint, float pageScale, double startTime, double duration) OVERRIDE;
65 virtual CCActiveGestureAnimation* activeGestureAnimation() OVERRIDE { return m_activeGestureAnimation.get(); }
66 // To clear an active animation, pass nullptr.
67 virtual void setActiveGestureAnimation(PassOwnPtr<CCActiveGestureAnimation>) OVERRIDE;
68 virtual void scheduleAnimation() OVERRIDE; 64 virtual void scheduleAnimation() OVERRIDE;
69 65
70 struct FrameData : public CCRenderPassSink { 66 struct FrameData : public CCRenderPassSink {
71 Vector<IntRect> occludingScreenSpaceRects; 67 Vector<IntRect> occludingScreenSpaceRects;
72 CCRenderPassList renderPasses; 68 CCRenderPassList renderPasses;
73 CCRenderPassIdHashMap renderPassesById; 69 CCRenderPassIdHashMap renderPassesById;
74 CCLayerList* renderSurfaceLayerList; 70 CCLayerList* renderSurfaceLayerList;
75 CCLayerList willDrawLayers; 71 CCLayerList willDrawLayers;
76 72
77 // CCRenderPassSink implementation. 73 // CCRenderPassSink implementation.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 size_t renderPassListNext(size_t it) const { return it + 1; } 197 size_t renderPassListNext(size_t it) const { return it + 1; }
202 }; 198 };
203 199
204 template<typename RenderPassCuller> 200 template<typename RenderPassCuller>
205 static void removeRenderPasses(RenderPassCuller, FrameData&); 201 static void removeRenderPasses(RenderPassCuller, FrameData&);
206 202
207 protected: 203 protected:
208 CCLayerTreeHostImpl(const CCLayerTreeSettings&, CCLayerTreeHostImplClient*); 204 CCLayerTreeHostImpl(const CCLayerTreeSettings&, CCLayerTreeHostImplClient*);
209 205
210 void animatePageScale(double monotonicTime); 206 void animatePageScale(double monotonicTime);
211 void animateGestures(double monotonicTime);
212 void animateScrollbars(double monotonicTime); 207 void animateScrollbars(double monotonicTime);
213 208
214 // Exposed for testing. 209 // Exposed for testing.
215 void calculateRenderSurfaceLayerList(CCLayerList&); 210 void calculateRenderSurfaceLayerList(CCLayerList&);
216 211
217 // Virtual for testing. 212 // Virtual for testing.
218 virtual void animateLayers(double monotonicTime, double wallClockTime); 213 virtual void animateLayers(double monotonicTime, double wallClockTime);
219 214
220 // Virtual for testing. Measured in seconds. 215 // Virtual for testing. Measured in seconds.
221 virtual double lowFrequencyAnimationInterval() const; 216 virtual double lowFrequencyAnimationInterval() const;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 268
274 SkColor m_backgroundColor; 269 SkColor m_backgroundColor;
275 bool m_hasTransparentBackground; 270 bool m_hasTransparentBackground;
276 271
277 // If this is true, it is necessary to traverse the layer tree ticking the a nimators. 272 // If this is true, it is necessary to traverse the layer tree ticking the a nimators.
278 bool m_needsAnimateLayers; 273 bool m_needsAnimateLayers;
279 bool m_pinchGestureActive; 274 bool m_pinchGestureActive;
280 IntPoint m_previousPinchAnchor; 275 IntPoint m_previousPinchAnchor;
281 276
282 OwnPtr<CCPageScaleAnimation> m_pageScaleAnimation; 277 OwnPtr<CCPageScaleAnimation> m_pageScaleAnimation;
283 OwnPtr<CCActiveGestureAnimation> m_activeGestureAnimation;
284 278
285 // This is used for ticking animations slowly when hidden. 279 // This is used for ticking animations slowly when hidden.
286 OwnPtr<CCLayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter; 280 OwnPtr<CCLayerTreeHostImplTimeSourceAdapter> m_timeSourceClientAdapter;
287 281
288 CCLayerSorter m_layerSorter; 282 CCLayerSorter m_layerSorter;
289 283
290 // List of visible layers for the most recently prepared frame. Used for 284 // List of visible layers for the most recently prepared frame. Used for
291 // rendering and input event hit testing. 285 // rendering and input event hit testing.
292 CCLayerList m_renderSurfaceLayerList; 286 CCLayerList m_renderSurfaceLayerList;
293 287
294 OwnPtr<CCFrameRateCounter> m_fpsCounter; 288 OwnPtr<CCFrameRateCounter> m_fpsCounter;
295 OwnPtr<CCDebugRectHistory> m_debugRectHistory; 289 OwnPtr<CCDebugRectHistory> m_debugRectHistory;
296 }; 290 };
297 291
298 }; 292 };
299 293
300 #endif 294 #endif
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostClient.h ('k') | cc/CCLayerTreeHostImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698