| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "cc/animation/animation_events.h" | 14 #include "cc/animation/animation_events.h" |
| 15 #include "cc/animation/animation_registrar.h" | 15 #include "cc/animation/animation_registrar.h" |
| 16 #include "cc/base/cc_export.h" | 16 #include "cc/base/cc_export.h" |
| 17 #include "cc/input/input_handler.h" | 17 #include "cc/input/input_handler.h" |
| 18 #include "cc/input/layer_scroll_offset_delegate.h" | 18 #include "cc/input/layer_scroll_offset_delegate.h" |
| 19 #include "cc/input/top_controls_manager_client.h" | 19 #include "cc/input/top_controls_manager_client.h" |
| 20 #include "cc/layers/layer_lists.h" | 20 #include "cc/layers/layer_lists.h" |
| 21 #include "cc/layers/render_pass_sink.h" | 21 #include "cc/layers/render_pass_sink.h" |
| 22 #include "cc/output/begin_frame_args.h" |
| 22 #include "cc/output/output_surface_client.h" | 23 #include "cc/output/output_surface_client.h" |
| 23 #include "cc/output/renderer.h" | 24 #include "cc/output/renderer.h" |
| 24 #include "cc/quads/render_pass.h" | 25 #include "cc/quads/render_pass.h" |
| 25 #include "cc/resources/tile_manager.h" | 26 #include "cc/resources/tile_manager.h" |
| 26 #include "skia/ext/refptr.h" | 27 #include "skia/ext/refptr.h" |
| 27 #include "third_party/skia/include/core/SkColor.h" | 28 #include "third_party/skia/include/core/SkColor.h" |
| 28 #include "third_party/skia/include/core/SkPicture.h" | 29 #include "third_party/skia/include/core/SkPicture.h" |
| 29 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 30 | 31 |
| 31 namespace cc { | 32 namespace cc { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 47 struct RendererCapabilities; | 48 struct RendererCapabilities; |
| 48 | 49 |
| 49 // LayerTreeHost->Proxy callback interface. | 50 // LayerTreeHost->Proxy callback interface. |
| 50 class LayerTreeHostImplClient { | 51 class LayerTreeHostImplClient { |
| 51 public: | 52 public: |
| 52 virtual void DidTryInitializeRendererOnImplThread( | 53 virtual void DidTryInitializeRendererOnImplThread( |
| 53 bool success, | 54 bool success, |
| 54 scoped_refptr<ContextProvider> offscreen_context_provider) = 0; | 55 scoped_refptr<ContextProvider> offscreen_context_provider) = 0; |
| 55 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 56 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 56 virtual void OnSwapBuffersCompleteOnImplThread() = 0; | 57 virtual void OnSwapBuffersCompleteOnImplThread() = 0; |
| 57 virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) = 0; | 58 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0; |
| 58 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 59 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 59 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; | 60 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; |
| 60 virtual void SetNeedsRedrawOnImplThread() = 0; | 61 virtual void SetNeedsRedrawOnImplThread() = 0; |
| 61 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; | 62 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; |
| 62 virtual void DidInitializeVisibleTileOnImplThread() = 0; | 63 virtual void DidInitializeVisibleTileOnImplThread() = 0; |
| 63 virtual void SetNeedsCommitOnImplThread() = 0; | 64 virtual void SetNeedsCommitOnImplThread() = 0; |
| 64 virtual void PostAnimationEventsToMainThreadOnImplThread( | 65 virtual void PostAnimationEventsToMainThreadOnImplThread( |
| 65 scoped_ptr<AnimationEventsVector> events, | 66 scoped_ptr<AnimationEventsVector> events, |
| 66 base::Time wall_clock_time) = 0; | 67 base::Time wall_clock_time) = 0; |
| 67 // Returns true if resources were deleted by this call. | 68 // Returns true if resources were deleted by this call. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // TileManagerClient implementation. | 195 // TileManagerClient implementation. |
| 195 virtual void DidInitializeVisibleTile() OVERRIDE; | 196 virtual void DidInitializeVisibleTile() OVERRIDE; |
| 196 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const | 197 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const |
| 197 OVERRIDE; | 198 OVERRIDE; |
| 198 virtual void NotifyReadyToActivate() OVERRIDE; | 199 virtual void NotifyReadyToActivate() OVERRIDE; |
| 199 | 200 |
| 200 // OutputSurfaceClient implementation. | 201 // OutputSurfaceClient implementation. |
| 201 virtual bool DeferredInitialize( | 202 virtual bool DeferredInitialize( |
| 202 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; | 203 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; |
| 203 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; | 204 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; |
| 204 virtual void BeginFrame(base::TimeTicks frame_time) | 205 virtual void BeginFrame(const BeginFrameArgs& args) |
| 205 OVERRIDE; | 206 OVERRIDE; |
| 206 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, | 207 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, |
| 207 gfx::Rect viewport) OVERRIDE; | 208 gfx::Rect viewport) OVERRIDE; |
| 208 virtual void DidLoseOutputSurface() OVERRIDE; | 209 virtual void DidLoseOutputSurface() OVERRIDE; |
| 209 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE; | 210 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE; |
| 210 | 211 |
| 211 // Called from LayerTreeImpl. | 212 // Called from LayerTreeImpl. |
| 212 void OnCanDrawStateChangedForTree(); | 213 void OnCanDrawStateChangedForTree(); |
| 213 | 214 |
| 214 // Implementation | 215 // Implementation |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 scoped_ptr<AnimationRegistrar> animation_registrar_; | 533 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 533 | 534 |
| 534 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 535 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 535 | 536 |
| 536 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 537 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 537 }; | 538 }; |
| 538 | 539 |
| 539 } // namespace cc | 540 } // namespace cc |
| 540 | 541 |
| 541 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 542 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |