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