| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_RENDERER_H_ | 5 #ifndef CC_RENDERER_H_ |
| 6 #define CC_RENDERER_H_ | 6 #define CC_RENDERER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "cc/cc_export.h" | 9 #include "cc/cc_export.h" |
| 10 #include "cc/layer_tree_host.h" | 10 #include "cc/layer_tree_host.h" |
| 11 #include "cc/managed_memory_policy.h" | 11 #include "cc/managed_memory_policy.h" |
| 12 #include "cc/render_pass.h" | 12 #include "cc/render_pass.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 class CompositorFrameAck; | 16 class CompositorFrameAck; |
| 17 class CompositorFrameMetadata; |
| 17 class ScopedResource; | 18 class ScopedResource; |
| 18 | 19 |
| 19 class CC_EXPORT RendererClient { | 20 class CC_EXPORT RendererClient { |
| 20 public: | 21 public: |
| 21 virtual const gfx::Size& deviceViewportSize() const = 0; | 22 virtual const gfx::Size& deviceViewportSize() const = 0; |
| 22 virtual const LayerTreeSettings& settings() const = 0; | 23 virtual const LayerTreeSettings& settings() const = 0; |
| 23 virtual void didLoseOutputSurface() = 0; | 24 virtual void didLoseOutputSurface() = 0; |
| 24 virtual void onSwapBuffersComplete() = 0; | 25 virtual void onSwapBuffersComplete() = 0; |
| 25 virtual void setFullRootLayerDamage() = 0; | 26 virtual void setFullRootLayerDamage() = 0; |
| 26 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; | 27 virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; |
| 27 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) =
0; | 28 virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) =
0; |
| 28 virtual bool hasImplThread() const = 0; | 29 virtual bool hasImplThread() const = 0; |
| 30 virtual CompositorFrameMetadata makeCompositorFrameMetadata() const = 0; |
| 29 protected: | 31 protected: |
| 30 virtual ~RendererClient() { } | 32 virtual ~RendererClient() { } |
| 31 }; | 33 }; |
| 32 | 34 |
| 33 class CC_EXPORT Renderer { | 35 class CC_EXPORT Renderer { |
| 34 public: | 36 public: |
| 35 // This enum defines the various resource pools for the ResourceProvider | 37 // This enum defines the various resource pools for the ResourceProvider |
| 36 // where textures get allocated. | 38 // where textures get allocated. |
| 37 enum ResourcePool { | 39 enum ResourcePool { |
| 38 ImplPool = 1, // This pool is for textures that get allocated on the impl
thread (e.g. RenderSurfaces). | 40 ImplPool = 1, // This pool is for textures that get allocated on the impl
thread (e.g. RenderSurfaces). |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 83 } |
| 82 | 84 |
| 83 RendererClient* m_client; | 85 RendererClient* m_client; |
| 84 | 86 |
| 85 DISALLOW_COPY_AND_ASSIGN(Renderer); | 87 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 } | 90 } |
| 89 | 91 |
| 90 #endif // CC_RENDERER_H_ | 92 #endif // CC_RENDERER_H_ |
| OLD | NEW |