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/debug/latency_info.h" | 10 #include "cc/debug/latency_info.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 const LayerTreeSettings& Settings() const { return client_->Settings(); } | 44 const LayerTreeSettings& Settings() const { return client_->Settings(); } |
45 | 45 |
46 gfx::Size ViewportSize() const { return client_->DeviceViewportSize(); } | 46 gfx::Size ViewportSize() const { return client_->DeviceViewportSize(); } |
47 int ViewportWidth() const { return ViewportSize().width(); } | 47 int ViewportWidth() const { return ViewportSize().width(); } |
48 int ViewportHeight() const { return ViewportSize().height(); } | 48 int ViewportHeight() const { return ViewportSize().height(); } |
49 | 49 |
50 virtual void ViewportChanged() {} | 50 virtual void ViewportChanged() {} |
51 virtual void ReceiveCompositorFrameAck(const CompositorFrameAck& ack) {} | 51 virtual void ReceiveCompositorFrameAck(const CompositorFrameAck& ack) {} |
52 | 52 |
| 53 virtual bool CanReadPixels() const = 0; |
| 54 |
53 virtual void DecideRenderPassAllocationsForFrame( | 55 virtual void DecideRenderPassAllocationsForFrame( |
54 const RenderPassList& render_passes_in_draw_order) {} | 56 const RenderPassList& render_passes_in_draw_order) {} |
55 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const; | 57 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const; |
56 | 58 |
57 // This passes ownership of the render passes to the renderer. It should | 59 // This passes ownership of the render passes to the renderer. It should |
58 // consume them, and empty the list. | 60 // consume them, and empty the list. |
59 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order) = 0; | 61 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order) = 0; |
60 | 62 |
61 // Waits for rendering to finish. | 63 // Waits for rendering to finish. |
62 virtual void Finish() = 0; | 64 virtual void Finish() = 0; |
(...skipping 18 matching lines...) Expand all Loading... |
81 : client_(client) {} | 83 : client_(client) {} |
82 | 84 |
83 RendererClient* client_; | 85 RendererClient* client_; |
84 | 86 |
85 DISALLOW_COPY_AND_ASSIGN(Renderer); | 87 DISALLOW_COPY_AND_ASSIGN(Renderer); |
86 }; | 88 }; |
87 | 89 |
88 } // namespace cc | 90 } // namespace cc |
89 | 91 |
90 #endif // CC_OUTPUT_RENDERER_H_ | 92 #endif // CC_OUTPUT_RENDERER_H_ |
OLD | NEW |