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" |
danakj
2014/08/20 23:54:08
can forward declare RenderPass{ID,List} now?
weiliangc
2014/08/21 15:37:23
Same as below.
weiliangc
2014/08/21 17:17:54
Done.
| |
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 class Task; |
19 | 19 |
20 struct RendererCapabilitiesImpl { | 20 struct RendererCapabilitiesImpl { |
(...skipping 23 matching lines...) Expand all Loading... | |
44 }; | 44 }; |
45 | 45 |
46 class CC_EXPORT Renderer { | 46 class CC_EXPORT Renderer { |
47 public: | 47 public: |
48 virtual ~Renderer() {} | 48 virtual ~Renderer() {} |
49 | 49 |
50 virtual const RendererCapabilitiesImpl& Capabilities() const = 0; | 50 virtual const RendererCapabilitiesImpl& Capabilities() const = 0; |
51 | 51 |
52 virtual void DecideRenderPassAllocationsForFrame( | 52 virtual void DecideRenderPassAllocationsForFrame( |
53 const RenderPassList& render_passes_in_draw_order) {} | 53 const RenderPassList& render_passes_in_draw_order) {} |
54 virtual bool HasAllocatedResourcesForTesting(RenderPass::Id id) const; | 54 virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const; |
55 | 55 |
56 // This passes ownership of the render passes to the renderer. It should | 56 // This passes ownership of the render passes to the renderer. It should |
57 // consume them, and empty the list. The parameters here may change from frame | 57 // consume them, and empty the list. The parameters here may change from frame |
58 // to frame and should not be cached. | 58 // to frame and should not be cached. |
59 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped | 59 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped |
60 // window space. | 60 // window space. |
61 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, | 61 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, |
62 float device_scale_factor, | 62 float device_scale_factor, |
63 const gfx::Rect& device_viewport_rect, | 63 const gfx::Rect& device_viewport_rect, |
64 const gfx::Rect& device_clip_rect, | 64 const gfx::Rect& device_clip_rect, |
(...skipping 21 matching lines...) Expand all Loading... | |
86 const LayerTreeSettings* settings_; | 86 const LayerTreeSettings* settings_; |
87 bool visible_; | 87 bool visible_; |
88 | 88 |
89 private: | 89 private: |
90 DISALLOW_COPY_AND_ASSIGN(Renderer); | 90 DISALLOW_COPY_AND_ASSIGN(Renderer); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace cc | 93 } // namespace cc |
94 | 94 |
95 #endif // CC_OUTPUT_RENDERER_H_ | 95 #endif // CC_OUTPUT_RENDERER_H_ |
OLD | NEW |