| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // window space. | 66 // window space. |
| 67 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, | 67 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 68 float device_scale_factor, | 68 float device_scale_factor, |
| 69 const gfx::Rect& device_viewport_rect, | 69 const gfx::Rect& device_viewport_rect, |
| 70 const gfx::Rect& device_clip_rect, | 70 const gfx::Rect& device_clip_rect, |
| 71 bool disable_picture_quad_image_filtering) = 0; | 71 bool disable_picture_quad_image_filtering) = 0; |
| 72 | 72 |
| 73 // Waits for rendering to finish. | 73 // Waits for rendering to finish. |
| 74 virtual void Finish() = 0; | 74 virtual void Finish() = 0; |
| 75 | 75 |
| 76 virtual void DoNoOp() {} | |
| 77 | |
| 78 // Puts backbuffer onscreen. | 76 // Puts backbuffer onscreen. |
| 79 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; | 77 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; |
| 80 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} | 78 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} |
| 81 | 79 |
| 82 bool visible() const { return visible_; } | 80 bool visible() const { return visible_; } |
| 83 void SetVisible(bool visible); | 81 void SetVisible(bool visible); |
| 84 | 82 |
| 85 protected: | 83 protected: |
| 86 Renderer(RendererClient* client, const RendererSettings* settings) | 84 Renderer(RendererClient* client, const RendererSettings* settings) |
| 87 : client_(client), settings_(settings), visible_(true) {} | 85 : client_(client), settings_(settings), visible_(true) {} |
| 88 | 86 |
| 89 virtual void DidChangeVisibility() = 0; | 87 virtual void DidChangeVisibility() = 0; |
| 90 | 88 |
| 91 RendererClient* client_; | 89 RendererClient* client_; |
| 92 const RendererSettings* settings_; | 90 const RendererSettings* settings_; |
| 93 bool visible_; | 91 bool visible_; |
| 94 | 92 |
| 95 private: | 93 private: |
| 96 DISALLOW_COPY_AND_ASSIGN(Renderer); | 94 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 97 }; | 95 }; |
| 98 | 96 |
| 99 } // namespace cc | 97 } // namespace cc |
| 100 | 98 |
| 101 #endif // CC_OUTPUT_RENDERER_H_ | 99 #endif // CC_OUTPUT_RENDERER_H_ |
| OLD | NEW |