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_OUTPUT_RENDERER_H_ | 5 #ifndef CC_OUTPUT_RENDERER_H_ |
6 #define CC_OUTPUT_RENDERER_H_ | 6 #define CC_OUTPUT_RENDERER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/quads/render_pass.h" | 10 #include "cc/quads/render_pass.h" |
11 #include "cc/trees/layer_tree_host.h" | 11 #include "cc/trees/layer_tree_host.h" |
12 | 12 |
13 namespace cc { | 13 namespace cc { |
14 | 14 |
15 class CompositorFrameAck; | 15 class CompositorFrameAck; |
16 class CompositorFrameMetadata; | 16 class CompositorFrameMetadata; |
17 class ScopedResource; | 17 class ScopedResource; |
| 18 class Task; |
18 | 19 |
19 struct RendererCapabilitiesImpl { | 20 struct RendererCapabilitiesImpl { |
20 RendererCapabilitiesImpl(); | 21 RendererCapabilitiesImpl(); |
21 ~RendererCapabilitiesImpl(); | 22 ~RendererCapabilitiesImpl(); |
22 | 23 |
23 // Capabilities copied to main thread. | 24 // Capabilities copied to main thread. |
24 ResourceFormat best_texture_format; | 25 ResourceFormat best_texture_format; |
25 bool allow_partial_texture_updates; | 26 bool allow_partial_texture_updates; |
26 int max_texture_size; | 27 int max_texture_size; |
27 bool using_shared_memory_resources; | 28 bool using_shared_memory_resources; |
28 | 29 |
29 // Capabilities used on compositor thread only. | 30 // Capabilities used on compositor thread only. |
30 bool using_partial_swap; | 31 bool using_partial_swap; |
31 bool using_egl_image; | 32 bool using_egl_image; |
32 bool avoid_pow2_textures; | 33 bool avoid_pow2_textures; |
33 bool using_map_image; | 34 bool using_map_image; |
34 bool using_discard_framebuffer; | 35 bool using_discard_framebuffer; |
35 bool allow_rasterize_on_demand; | 36 bool allow_rasterize_on_demand; |
36 | 37 |
37 RendererCapabilities MainThreadCapabilities() const; | 38 RendererCapabilities MainThreadCapabilities() const; |
38 }; | 39 }; |
39 | 40 |
40 class CC_EXPORT RendererClient { | 41 class CC_EXPORT RendererClient { |
41 public: | 42 public: |
42 virtual void SetFullRootLayerDamage() = 0; | 43 virtual void SetFullRootLayerDamage() = 0; |
| 44 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) = 0; |
43 }; | 45 }; |
44 | 46 |
45 class CC_EXPORT Renderer { | 47 class CC_EXPORT Renderer { |
46 public: | 48 public: |
47 virtual ~Renderer() {} | 49 virtual ~Renderer() {} |
48 | 50 |
49 virtual const RendererCapabilitiesImpl& Capabilities() const = 0; | 51 virtual const RendererCapabilitiesImpl& Capabilities() const = 0; |
50 | 52 |
51 virtual void DecideRenderPassAllocationsForFrame( | 53 virtual void DecideRenderPassAllocationsForFrame( |
52 const RenderPassList& render_passes_in_draw_order) {} | 54 const RenderPassList& render_passes_in_draw_order) {} |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const LayerTreeSettings* settings_; | 89 const LayerTreeSettings* settings_; |
88 bool visible_; | 90 bool visible_; |
89 | 91 |
90 private: | 92 private: |
91 DISALLOW_COPY_AND_ASSIGN(Renderer); | 93 DISALLOW_COPY_AND_ASSIGN(Renderer); |
92 }; | 94 }; |
93 | 95 |
94 } // namespace cc | 96 } // namespace cc |
95 | 97 |
96 #endif // CC_OUTPUT_RENDERER_H_ | 98 #endif // CC_OUTPUT_RENDERER_H_ |
OLD | NEW |