| 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; | |
| 54 struct RendererCapabilities; | 53 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 base::Time CurrentFrameTime(); | 391 base::Time CurrentFrameTime(); |
| 392 | 392 |
| 393 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; | 393 virtual base::TimeTicks CurrentPhysicalTimeTicks() const; |
| 394 | 394 |
| 395 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } | 395 scoped_ptr<base::Value> AsValue() const { return AsValueWithFrame(NULL); } |
| 396 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; | 396 scoped_ptr<base::Value> AsValueWithFrame(FrameData* frame) const; |
| 397 scoped_ptr<base::Value> ActivationStateAsValue() const; | 397 scoped_ptr<base::Value> ActivationStateAsValue() const; |
| 398 | 398 |
| 399 bool page_scale_animation_active() const { return !!page_scale_animation_; } | 399 bool page_scale_animation_active() const { return !!page_scale_animation_; } |
| 400 | 400 |
| 401 virtual void CreateUIResource(UIResourceId uid, | 401 void CreateUIResource(UIResourceId uid, |
| 402 const UIResourceBitmap& bitmap); | 402 scoped_refptr<UIResourceBitmap> bitmap); |
| 403 // Deletes a UI resource. May safely be called more than once. | 403 // Deletes a UI resource. May safely be called more than once. |
| 404 virtual void DeleteUIResource(UIResourceId uid); | 404 void DeleteUIResource(UIResourceId uid); |
| 405 void EvictAllUIResources(); | 405 void EvictAllUIResources(); |
| 406 bool EvictedUIResourcesExist() const; | 406 bool EvictedUIResourcesExist() const; |
| 407 | 407 |
| 408 virtual ResourceProvider::ResourceId ResourceIdForUIResource( | 408 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; |
| 409 UIResourceId uid) const; | |
| 410 | 409 |
| 411 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); } | 410 void DidInitializeVisibleTileForTesting() { DidInitializeVisibleTile(); } |
| 412 | 411 |
| 413 protected: | 412 protected: |
| 414 LayerTreeHostImpl( | 413 LayerTreeHostImpl( |
| 415 const LayerTreeSettings& settings, | 414 const LayerTreeSettings& settings, |
| 416 LayerTreeHostImplClient* client, | 415 LayerTreeHostImplClient* client, |
| 417 Proxy* proxy, | 416 Proxy* proxy, |
| 418 RenderingStatsInstrumentation* rendering_stats_instrumentation); | 417 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
| 419 | 418 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 607 |
| 609 // Optional callback to notify of new tree activations. | 608 // Optional callback to notify of new tree activations. |
| 610 base::Closure tree_activation_callback_; | 609 base::Closure tree_activation_callback_; |
| 611 | 610 |
| 612 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 611 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 613 }; | 612 }; |
| 614 | 613 |
| 615 } // namespace cc | 614 } // namespace cc |
| 616 | 615 |
| 617 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 616 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |