| 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 UIResourceRequest; | 56 class UIResourceRequest; |
| 57 struct RendererCapabilitiesImpl; | 57 struct RendererCapabilitiesImpl; |
| 58 | 58 |
| 59 // LayerTreeHost->Proxy callback interface. | 59 // LayerTreeHost->Proxy callback interface. |
| 60 class LayerTreeHostImplClient { | 60 class LayerTreeHostImplClient { |
| 61 public: | 61 public: |
| 62 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; | 62 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; |
| 63 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 63 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 64 virtual void DidSwapBuffersOnImplThread() = 0; | 64 virtual void DidSwapBuffersOnImplThread() = 0; |
| 65 virtual void OnSwapBuffersCompleteOnImplThread() = 0; | 65 virtual void OnSwapBuffersCompleteOnImplThread() = 0; |
| 66 virtual void BeginImplFrame(const BeginFrameArgs& args) = 0; | 66 virtual void BeginFrame(const BeginFrameArgs& args) = 0; |
| 67 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 67 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 68 virtual void NotifyReadyToActivate() = 0; | 68 virtual void NotifyReadyToActivate() = 0; |
| 69 // Please call these 2 functions through | 69 // Please call these 2 functions through |
| 70 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). | 70 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). |
| 71 virtual void SetNeedsRedrawOnImplThread() = 0; | 71 virtual void SetNeedsRedrawOnImplThread() = 0; |
| 72 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; | 72 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; |
| 73 virtual void DidInitializeVisibleTileOnImplThread() = 0; | 73 virtual void DidInitializeVisibleTileOnImplThread() = 0; |
| 74 virtual void SetNeedsCommitOnImplThread() = 0; | 74 virtual void SetNeedsCommitOnImplThread() = 0; |
| 75 virtual void SetNeedsManageTilesOnImplThread() = 0; | 75 virtual void SetNeedsManageTilesOnImplThread() = 0; |
| 76 virtual void PostAnimationEventsToMainThreadOnImplThread( | 76 virtual void PostAnimationEventsToMainThreadOnImplThread( |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 virtual void SetFullRootLayerDamage() OVERRIDE; | 218 virtual void SetFullRootLayerDamage() OVERRIDE; |
| 219 | 219 |
| 220 // TileManagerClient implementation. | 220 // TileManagerClient implementation. |
| 221 virtual void NotifyReadyToActivate() OVERRIDE; | 221 virtual void NotifyReadyToActivate() OVERRIDE; |
| 222 | 222 |
| 223 // OutputSurfaceClient implementation. | 223 // OutputSurfaceClient implementation. |
| 224 virtual bool DeferredInitialize( | 224 virtual bool DeferredInitialize( |
| 225 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; | 225 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; |
| 226 virtual void ReleaseGL() OVERRIDE; | 226 virtual void ReleaseGL() OVERRIDE; |
| 227 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; | 227 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) OVERRIDE; |
| 228 virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE; | 228 virtual void BeginFrame(const BeginFrameArgs& args) OVERRIDE; |
| 229 virtual void SetExternalDrawConstraints( | 229 virtual void SetExternalDrawConstraints( |
| 230 const gfx::Transform& transform, | 230 const gfx::Transform& transform, |
| 231 const gfx::Rect& viewport, | 231 const gfx::Rect& viewport, |
| 232 const gfx::Rect& clip, | 232 const gfx::Rect& clip, |
| 233 bool valid_for_tile_management) OVERRIDE; | 233 bool valid_for_tile_management) OVERRIDE; |
| 234 virtual void DidLoseOutputSurface() OVERRIDE; | 234 virtual void DidLoseOutputSurface() OVERRIDE; |
| 235 virtual void DidSwapBuffers() OVERRIDE; | 235 virtual void DidSwapBuffers() OVERRIDE; |
| 236 virtual void OnSwapBuffersComplete() OVERRIDE; | 236 virtual void OnSwapBuffersComplete() OVERRIDE; |
| 237 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; | 237 virtual void ReclaimResources(const CompositorFrameAck* ack) OVERRIDE; |
| 238 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; | 238 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 257 void FinishAllRendering(); | 257 void FinishAllRendering(); |
| 258 int SourceAnimationFrameNumber() const; | 258 int SourceAnimationFrameNumber() const; |
| 259 | 259 |
| 260 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); | 260 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); |
| 261 bool IsContextLost(); | 261 bool IsContextLost(); |
| 262 TileManager* tile_manager() { return tile_manager_.get(); } | 262 TileManager* tile_manager() { return tile_manager_.get(); } |
| 263 Renderer* renderer() { return renderer_.get(); } | 263 Renderer* renderer() { return renderer_.get(); } |
| 264 const RendererCapabilitiesImpl& GetRendererCapabilities() const; | 264 const RendererCapabilitiesImpl& GetRendererCapabilities() const; |
| 265 | 265 |
| 266 virtual bool SwapBuffers(const FrameData& frame); | 266 virtual bool SwapBuffers(const FrameData& frame); |
| 267 void SetNeedsBeginImplFrame(bool enable); | 267 void SetNeedsBeginFrame(bool enable); |
| 268 void DidModifyTilePriorities(); | 268 void DidModifyTilePriorities(); |
| 269 | 269 |
| 270 void Readback(void* pixels, const gfx::Rect& rect_in_device_viewport); | 270 void Readback(void* pixels, const gfx::Rect& rect_in_device_viewport); |
| 271 | 271 |
| 272 LayerTreeImpl* active_tree() { return active_tree_.get(); } | 272 LayerTreeImpl* active_tree() { return active_tree_.get(); } |
| 273 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } | 273 const LayerTreeImpl* active_tree() const { return active_tree_.get(); } |
| 274 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } | 274 LayerTreeImpl* pending_tree() { return pending_tree_.get(); } |
| 275 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } | 275 const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } |
| 276 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } | 276 const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } |
| 277 virtual void CreatePendingTree(); | 277 virtual void CreatePendingTree(); |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 int id_; | 653 int id_; |
| 654 | 654 |
| 655 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 655 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 656 | 656 |
| 657 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 657 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 658 }; | 658 }; |
| 659 | 659 |
| 660 } // namespace cc | 660 } // namespace cc |
| 661 | 661 |
| 662 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 662 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |