| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/output/compositor_frame_metadata.h" |
| 12 #include "cc/output/renderer_capabilities.h" | 13 #include "cc/output/renderer_capabilities.h" |
| 13 #include "cc/output/renderer_settings.h" | 14 #include "cc/output/renderer_settings.h" |
| 14 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 15 | 16 |
| 16 namespace cc { | 17 namespace cc { |
| 17 | 18 |
| 18 class CompositorFrameAck; | 19 class CompositorFrameAck; |
| 19 class CompositorFrameMetadata; | |
| 20 class RenderPass; | 20 class RenderPass; |
| 21 class RenderPassId; | 21 class RenderPassId; |
| 22 class ScopedResource; | 22 class ScopedResource; |
| 23 class Task; | 23 class Task; |
| 24 | 24 |
| 25 typedef std::vector<std::unique_ptr<RenderPass>> RenderPassList; | 25 typedef std::vector<std::unique_ptr<RenderPass>> RenderPassList; |
| 26 | 26 |
| 27 struct RendererCapabilitiesImpl { | 27 struct RendererCapabilitiesImpl { |
| 28 RendererCapabilitiesImpl(); | 28 RendererCapabilitiesImpl(); |
| 29 ~RendererCapabilitiesImpl(); | 29 ~RendererCapabilitiesImpl(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, | 71 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 72 float device_scale_factor, | 72 float device_scale_factor, |
| 73 const gfx::Rect& device_viewport_rect, | 73 const gfx::Rect& device_viewport_rect, |
| 74 const gfx::Rect& device_clip_rect, | 74 const gfx::Rect& device_clip_rect, |
| 75 bool disable_picture_quad_image_filtering) = 0; | 75 bool disable_picture_quad_image_filtering) = 0; |
| 76 | 76 |
| 77 // Waits for rendering to finish. | 77 // Waits for rendering to finish. |
| 78 virtual void Finish() = 0; | 78 virtual void Finish() = 0; |
| 79 | 79 |
| 80 // Puts backbuffer onscreen. | 80 // Puts backbuffer onscreen. |
| 81 virtual void SwapBuffers(const CompositorFrameMetadata& metadata) = 0; | 81 virtual void SwapBuffers(CompositorFrameMetadata metadata) = 0; |
| 82 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} | 82 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} |
| 83 | 83 |
| 84 bool visible() const { return visible_; } | 84 bool visible() const { return visible_; } |
| 85 void SetVisible(bool visible); | 85 void SetVisible(bool visible); |
| 86 | 86 |
| 87 protected: | 87 protected: |
| 88 Renderer(RendererClient* client, const RendererSettings* settings) | 88 Renderer(RendererClient* client, const RendererSettings* settings) |
| 89 : client_(client), settings_(settings), visible_(true) {} | 89 : client_(client), settings_(settings), visible_(true) {} |
| 90 | 90 |
| 91 virtual void DidChangeVisibility() = 0; | 91 virtual void DidChangeVisibility() = 0; |
| 92 | 92 |
| 93 RendererClient* client_; | 93 RendererClient* client_; |
| 94 const RendererSettings* settings_; | 94 const RendererSettings* settings_; |
| 95 bool visible_; | 95 bool visible_; |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 DISALLOW_COPY_AND_ASSIGN(Renderer); | 98 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace cc | 101 } // namespace cc |
| 102 | 102 |
| 103 #endif // CC_OUTPUT_RENDERER_H_ | 103 #endif // CC_OUTPUT_RENDERER_H_ |
| OLD | NEW |