| 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/base/scoped_ptr_vector.h" | 10 #include "cc/base/scoped_ptr_vector.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 public: | 48 public: |
| 49 virtual void SetFullRootLayerDamage() = 0; | 49 virtual void SetFullRootLayerDamage() = 0; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 class CC_EXPORT Renderer { | 52 class CC_EXPORT Renderer { |
| 53 public: | 53 public: |
| 54 virtual ~Renderer() {} | 54 virtual ~Renderer() {} |
| 55 | 55 |
| 56 virtual const RendererCapabilitiesImpl& Capabilities() const = 0; | 56 virtual const RendererCapabilitiesImpl& Capabilities() const = 0; |
| 57 | 57 |
| 58 virtual bool CanRender(const RenderPassList& render_passes) const; |
| 58 virtual void DecideRenderPassAllocationsForFrame( | 59 virtual void DecideRenderPassAllocationsForFrame( |
| 59 const RenderPassList& render_passes_in_draw_order) {} | 60 const RenderPassList& render_passes_in_draw_order) {} |
| 60 virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const; | 61 virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const; |
| 61 | 62 |
| 62 // This passes ownership of the render passes to the renderer. It should | 63 // This passes ownership of the render passes to the renderer. It should |
| 63 // consume them, and empty the list. The parameters here may change from frame | 64 // consume them, and empty the list. The parameters here may change from frame |
| 64 // to frame and should not be cached. | 65 // to frame and should not be cached. |
| 65 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped | 66 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped |
| 66 // window space. | 67 // window space. |
| 67 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, | 68 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 90 const RendererSettings* settings_; | 91 const RendererSettings* settings_; |
| 91 bool visible_; | 92 bool visible_; |
| 92 | 93 |
| 93 private: | 94 private: |
| 94 DISALLOW_COPY_AND_ASSIGN(Renderer); | 95 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace cc | 98 } // namespace cc |
| 98 | 99 |
| 99 #endif // CC_OUTPUT_RENDERER_H_ | 100 #endif // CC_OUTPUT_RENDERER_H_ |
| OLD | NEW |