| 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" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 virtual void DecideRenderPassAllocationsForFrame( | 54 virtual void DecideRenderPassAllocationsForFrame( |
| 55 const RenderPassList& render_passes_in_draw_order) {} | 55 const RenderPassList& render_passes_in_draw_order) {} |
| 56 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const; | 56 virtual bool HaveCachedResourcesForRenderPassId(RenderPass::Id id) const; |
| 57 | 57 |
| 58 // This passes ownership of the render passes to the renderer. It should | 58 // This passes ownership of the render passes to the renderer. It should |
| 59 // consume them, and empty the list. | 59 // consume them, and empty the list. |
| 60 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order) = 0; | 60 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order) = 0; |
| 61 | 61 |
| 62 // Waits for rendering to finish. | 62 // Waits for rendering to finish. |
| 63 virtual void Finish() = 0; | 63 //virtual void Finish() = 0; |
| 64 | 64 |
| 65 virtual void DoNoOp() {} | 65 virtual void DoNoOp() {} |
| 66 | 66 |
| 67 // Puts backbuffer onscreen. | 67 // Puts backbuffer onscreen. |
| 68 virtual void SwapBuffers() = 0; | 68 virtual void SwapBuffers() = 0; |
| 69 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} | 69 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} |
| 70 | 70 |
| 71 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) = 0; | 71 virtual void GetFramebufferPixels(void* pixels, gfx::Rect rect) = 0; |
| 72 | 72 |
| 73 virtual bool IsContextLost(); | 73 virtual bool IsContextLost(); |
| 74 | 74 |
| 75 virtual void SetVisible(bool visible) = 0; | 75 virtual void SetVisible(bool visible) = 0; |
| 76 | 76 |
| 77 virtual void SendManagedMemoryStats(size_t bytes_visible, | 77 virtual void SendManagedMemoryStats(size_t bytes_visible, |
| 78 size_t bytes_visible_and_nearby, | 78 size_t bytes_visible_and_nearby, |
| 79 size_t bytes_allocated) = 0; | 79 size_t bytes_allocated) = 0; |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 explicit Renderer(RendererClient* client) | 82 explicit Renderer(RendererClient* client) |
| 83 : client_(client) {} | 83 : client_(client) {} |
| 84 | 84 |
| 85 RendererClient* client_; | 85 RendererClient* client_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(Renderer); | 87 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace cc | 90 } // namespace cc |
| 91 | 91 |
| 92 #endif // CC_OUTPUT_RENDERER_H_ | 92 #endif // CC_OUTPUT_RENDERER_H_ |
| OLD | NEW |