| OLD | NEW |
| 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 27 matching lines...) Expand all Loading... |
| 38 struct RendererCapabilities; | 38 struct RendererCapabilities; |
| 39 struct RenderingStats; | 39 struct RenderingStats; |
| 40 | 40 |
| 41 // LayerTreeHost->Proxy callback interface. | 41 // LayerTreeHost->Proxy callback interface. |
| 42 class LayerTreeHostImplClient { | 42 class LayerTreeHostImplClient { |
| 43 public: | 43 public: |
| 44 virtual void didLoseOutputSurfaceOnImplThread() = 0; | 44 virtual void didLoseOutputSurfaceOnImplThread() = 0; |
| 45 virtual void onSwapBuffersCompleteOnImplThread() = 0; | 45 virtual void onSwapBuffersCompleteOnImplThread() = 0; |
| 46 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) = 0; | 46 virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDe
lta interval) = 0; |
| 47 virtual void didVSync(base::TimeTicks frameTime) = 0; | 47 virtual void didVSync(base::TimeTicks frameTime) = 0; |
| 48 virtual void didReceiveLastInputEventForVSync() = 0; |
| 48 virtual void onCanDrawStateChanged(bool canDraw) = 0; | 49 virtual void onCanDrawStateChanged(bool canDraw) = 0; |
| 49 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; | 50 virtual void onHasPendingTreeStateChanged(bool hasPendingTree) = 0; |
| 50 virtual void setNeedsRedrawOnImplThread() = 0; | 51 virtual void setNeedsRedrawOnImplThread() = 0; |
| 51 virtual void setNeedsCommitOnImplThread() = 0; | 52 virtual void setNeedsCommitOnImplThread() = 0; |
| 52 virtual void setNeedsManageTilesOnImplThread() = 0; | 53 virtual void setNeedsManageTilesOnImplThread() = 0; |
| 53 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; | 54 virtual void postAnimationEventsToMainThreadOnImplThread(scoped_ptr<Animatio
nEventsVector>, base::Time wallClockTime) = 0; |
| 54 // Returns true if resources were deleted by this call. | 55 // Returns true if resources were deleted by this call. |
| 55 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; | 56 virtual bool reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int
priorityCutoff) = 0; |
| 56 virtual void sendManagedMemoryStats() = 0; | 57 virtual void sendManagedMemoryStats() = 0; |
| 57 }; | 58 }; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 70 // InputHandlerClient implementation | 71 // InputHandlerClient implementation |
| 71 virtual InputHandlerClient::ScrollStatus scrollBegin(gfx::Point, InputHandle
rClient::ScrollInputType) OVERRIDE; | 72 virtual InputHandlerClient::ScrollStatus scrollBegin(gfx::Point, InputHandle
rClient::ScrollInputType) OVERRIDE; |
| 72 virtual bool scrollBy(const gfx::Point&, const gfx::Vector2d&) OVERRIDE; | 73 virtual bool scrollBy(const gfx::Point&, const gfx::Vector2d&) OVERRIDE; |
| 73 virtual void scrollEnd() OVERRIDE; | 74 virtual void scrollEnd() OVERRIDE; |
| 74 virtual void pinchGestureBegin() OVERRIDE; | 75 virtual void pinchGestureBegin() OVERRIDE; |
| 75 virtual void pinchGestureUpdate(float, gfx::Point) OVERRIDE; | 76 virtual void pinchGestureUpdate(float, gfx::Point) OVERRIDE; |
| 76 virtual void pinchGestureEnd() OVERRIDE; | 77 virtual void pinchGestureEnd() OVERRIDE; |
| 77 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool anchor
Point, float pageScale, base::TimeTicks startTime, base::TimeDelta duration) OVE
RRIDE; | 78 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, bool anchor
Point, float pageScale, base::TimeTicks startTime, base::TimeDelta duration) OVE
RRIDE; |
| 78 virtual void scheduleAnimation() OVERRIDE; | 79 virtual void scheduleAnimation() OVERRIDE; |
| 79 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; | 80 virtual bool haveTouchEventHandlersAt(const gfx::Point&) OVERRIDE; |
| 81 virtual void didReceiveLastInputEventForVSync() OVERRIDE; |
| 80 | 82 |
| 81 struct CC_EXPORT FrameData : public RenderPassSink { | 83 struct CC_EXPORT FrameData : public RenderPassSink { |
| 82 FrameData(); | 84 FrameData(); |
| 83 ~FrameData(); | 85 ~FrameData(); |
| 84 | 86 |
| 85 std::vector<gfx::Rect> occludingScreenSpaceRects; | 87 std::vector<gfx::Rect> occludingScreenSpaceRects; |
| 86 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; | 88 std::vector<gfx::Rect> nonOccludingScreenSpaceRects; |
| 87 RenderPassList renderPasses; | 89 RenderPassList renderPasses; |
| 88 RenderPassIdHashMap renderPassesById; | 90 RenderPassIdHashMap renderPassesById; |
| 89 const LayerList* renderSurfaceLayerList; | 91 const LayerList* renderSurfaceLayerList; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 size_t m_lastSentMemoryUseBytes; | 345 size_t m_lastSentMemoryUseBytes; |
| 344 | 346 |
| 345 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 347 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
| 346 | 348 |
| 347 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 349 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 348 }; | 350 }; |
| 349 | 351 |
| 350 } // namespace cc | 352 } // namespace cc |
| 351 | 353 |
| 352 #endif // CC_LAYER_TREE_HOST_IMPL_H_ | 354 #endif // CC_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |