| 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_TREES_LAYER_TREE_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 class TopControlsManager; | 56 class TopControlsManager; |
| 57 class UIResourceBitmap; | 57 class UIResourceBitmap; |
| 58 class UIResourceRequest; | 58 class UIResourceRequest; |
| 59 struct RendererCapabilitiesImpl; | 59 struct RendererCapabilitiesImpl; |
| 60 | 60 |
| 61 // LayerTreeHost->Proxy callback interface. | 61 // LayerTreeHost->Proxy callback interface. |
| 62 class LayerTreeHostImplClient { | 62 class LayerTreeHostImplClient { |
| 63 public: | 63 public: |
| 64 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; | 64 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; |
| 65 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 65 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 66 virtual void SetMaxSwapsPendingOnImplThread(int max) = 0; |
| 66 virtual void DidSwapBuffersOnImplThread() = 0; | 67 virtual void DidSwapBuffersOnImplThread() = 0; |
| 67 virtual void OnSwapBuffersCompleteOnImplThread() = 0; | 68 virtual void DidSwapBuffersCompleteOnImplThread() = 0; |
| 68 virtual void BeginFrame(const BeginFrameArgs& args) = 0; | 69 virtual void BeginFrame(const BeginFrameArgs& args) = 0; |
| 69 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 70 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 70 virtual void NotifyReadyToActivate() = 0; | 71 virtual void NotifyReadyToActivate() = 0; |
| 71 // Please call these 2 functions through | 72 // Please call these 2 functions through |
| 72 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). | 73 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). |
| 73 virtual void SetNeedsRedrawOnImplThread() = 0; | 74 virtual void SetNeedsRedrawOnImplThread() = 0; |
| 74 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; | 75 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; |
| 75 virtual void DidInitializeVisibleTileOnImplThread() = 0; | 76 virtual void DidInitializeVisibleTileOnImplThread() = 0; |
| 76 virtual void SetNeedsCommitOnImplThread() = 0; | 77 virtual void SetNeedsCommitOnImplThread() = 0; |
| 77 virtual void SetNeedsManageTilesOnImplThread() = 0; | 78 virtual void SetNeedsManageTilesOnImplThread() = 0; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 virtual void ReleaseGL() OVERRIDE; | 227 virtual void ReleaseGL() OVERRIDE; |
| 227 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; | 228 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; |
| 228 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; | 229 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; |
| 229 virtual void SetExternalDrawConstraints( | 230 virtual void SetExternalDrawConstraints( |
| 230 const gfx::Transform& transform, | 231 const gfx::Transform& transform, |
| 231 const gfx::Rect& viewport, | 232 const gfx::Rect& viewport, |
| 232 const gfx::Rect& clip, | 233 const gfx::Rect& clip, |
| 233 bool valid_for_tile_management) OVERRIDE; | 234 bool valid_for_tile_management) OVERRIDE; |
| 234 virtual void DidLoseOutputSurface() OVERRIDE; | 235 virtual void DidLoseOutputSurface() OVERRIDE; |
| 235 virtual void DidSwapBuffers() OVERRIDE; | 236 virtual void DidSwapBuffers() OVERRIDE; |
| 236 virtual void OnSwapBuffersComplete() OVERRIDE; | 237 virtual void DidSwapBuffersComplete() OVERRIDE; |
| 237 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; | 238 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; |
| 238 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; | 239 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; |
| 239 virtual void SetTreeActivationCallback(const base::Closure& callback) | 240 virtual void SetTreeActivationCallback(const base::Closure& callback) |
| 240 OVERRIDE; | 241 OVERRIDE; |
| 241 | 242 |
| 242 // Called from LayerTreeImpl. | 243 // Called from LayerTreeImpl. |
| 243 void OnCanDrawStateChangedForTree(); | 244 void OnCanDrawStateChangedForTree(); |
| 244 | 245 |
| 245 // Implementation. | 246 // Implementation. |
| 246 bool CanDraw() const; | 247 bool CanDraw() const; |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 int id_; | 659 int id_; |
| 659 | 660 |
| 660 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 661 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 661 | 662 |
| 662 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 663 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 663 }; | 664 }; |
| 664 | 665 |
| 665 } // namespace cc | 666 } // namespace cc |
| 666 | 667 |
| 667 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 668 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |