| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class LayerTreeHostImplTimeSourceAdapter; | 43 class LayerTreeHostImplTimeSourceAdapter; |
| 44 class LayerTreeImpl; | 44 class LayerTreeImpl; |
| 45 class PageScaleAnimation; | 45 class PageScaleAnimation; |
| 46 class PaintTimeCounter; | 46 class PaintTimeCounter; |
| 47 class MemoryHistory; | 47 class MemoryHistory; |
| 48 class RenderingStatsInstrumentation; | 48 class RenderingStatsInstrumentation; |
| 49 class RenderPassDrawQuad; | 49 class RenderPassDrawQuad; |
| 50 class TextureMailboxDeleter; | 50 class TextureMailboxDeleter; |
| 51 class TopControlsManager; | 51 class TopControlsManager; |
| 52 class UIResourceBitmap; | 52 class UIResourceBitmap; |
| 53 class UIResourceRequest; |
| 53 struct RendererCapabilities; | 54 struct RendererCapabilities; |
| 54 struct UIResourceRequest; | |
| 55 | 55 |
| 56 // LayerTreeHost->Proxy callback interface. | 56 // LayerTreeHost->Proxy callback interface. |
| 57 class LayerTreeHostImplClient { | 57 class LayerTreeHostImplClient { |
| 58 public: | 58 public: |
| 59 virtual void DidLoseOutputSurfaceOnImplThread() = 0; | 59 virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 60 virtual void OnSwapBuffersCompleteOnImplThread() = 0; | 60 virtual void OnSwapBuffersCompleteOnImplThread() = 0; |
| 61 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0; | 61 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0; |
| 62 virtual void OnCanDrawStateChanged(bool can_draw) = 0; | 62 virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 63 virtual void NotifyReadyToActivate() = 0; | 63 virtual void NotifyReadyToActivate() = 0; |
| 64 virtual void SetNeedsRedrawOnImplThread() = 0; | 64 virtual void SetNeedsRedrawOnImplThread() = 0; |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 base::Time CurrentFrameTime(); | 393 base::Time CurrentFrameTime(); |
| 394 | 394 |
| 395 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; | 395 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; |
| 396 | 396 |
| 397 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } | 397 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } |
| 398 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; | 398 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; |
| 399 scoped_ptr<base::Value> ActivationStateAsValue() const; | 399 scoped_ptr<base::Value> ActivationStateAsValue() const; |
| 400 | 400 |
| 401 bool page_scale_animation_active() const { return !!page_scale_animation_; } | 401 bool page_scale_animation_active() const { return !!page_scale_animation_; } |
| 402 | 402 |
| 403 void CreateUIResource(UIResourceId uid, | 403 virtual void CreateUIResource(UIResourceId uid, |
| 404 scoped_refptr<UIResourceBitmap> bitmap); | 404 const UIResourceBitmap& bitmap); |
| 405 // Deletes a UI resource. May safely be called more than once. | 405 // Deletes a UI resource. May safely be called more than once. |
| 406 void DeleteUIResource(UIResourceId uid); | 406 virtual void DeleteUIResource(UIResourceId uid); |
| 407 void EvictAllUIResources(); | 407 void EvictAllUIResources(); |
| 408 bool EvictedUIResourcesExist() const; | 408 bool EvictedUIResourcesExist() const; |
| 409 | 409 |
| 410 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; | 410 virtual ResourceProvider::ResourceId ResourceIdForUIResource( |
| 411 UIResourceId uid) const; |
| 411 | 412 |
| 412 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); } | 413 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); } |
| 413 | 414 |
| 414 protected: | 415 protected: |
| 415 LayerTreeHostImpl( | 416 LayerTreeHostImpl( |
| 416 const LayerTreeSettings& settings, | 417 const LayerTreeSettings& settings, |
| 417 LayerTreeHostImplClient* client, | 418 LayerTreeHostImplClient* client, |
| 418 Proxy* proxy, | 419 Proxy* proxy, |
| 419 RenderingStatsInstrumentation* rendering_stats_instrumentation); | 420 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
| 420 | 421 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 | 610 |
| 610 // Optional callback to notify of new tree activations. | 611 // Optional callback to notify of new tree activations. |
| 611 base::Closure tree_activation_callback_; | 612 base::Closure tree_activation_callback_; |
| 612 | 613 |
| 613 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 614 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 614 }; | 615 }; |
| 615 | 616 |
| 616 } // namespace cc | 617 } // namespace cc |
| 617 | 618 |
| 618 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 619 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |