| 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/compositor_frame_metadata.h" |
| 13 #include "cc/output/renderer_capabilities.h" | 13 #include "cc/output/renderer_capabilities.h" |
| 14 #include "cc/output/renderer_settings.h" | 14 #include "cc/output/renderer_settings.h" |
| 15 #include "ui/gfx/color_profile.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 16 | 17 |
| 17 namespace cc { | 18 namespace cc { |
| 18 | 19 |
| 19 class CompositorFrameAck; | 20 class CompositorFrameAck; |
| 20 class RenderPass; | 21 class RenderPass; |
| 21 class RenderPassId; | 22 class RenderPassId; |
| 22 class ScopedResource; | 23 class ScopedResource; |
| 23 class Task; | 24 class Task; |
| 24 | 25 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 const RenderPassList& render_passes_in_draw_order) {} | 64 const RenderPassList& render_passes_in_draw_order) {} |
| 64 virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const; | 65 virtual bool HasAllocatedResourcesForTesting(RenderPassId id) const; |
| 65 | 66 |
| 66 // This passes ownership of the render passes to the renderer. It should | 67 // This passes ownership of the render passes to the renderer. It should |
| 67 // consume them, and empty the list. The parameters here may change from frame | 68 // consume them, and empty the list. The parameters here may change from frame |
| 68 // to frame and should not be cached. | 69 // to frame and should not be cached. |
| 69 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped | 70 // The |device_viewport_rect| and |device_clip_rect| are in non-y-flipped |
| 70 // window space. | 71 // window space. |
| 71 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, | 72 virtual void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 72 float device_scale_factor, | 73 float device_scale_factor, |
| 74 const gfx::ColorProfile& device_color_profile, |
| 73 const gfx::Rect& device_viewport_rect, | 75 const gfx::Rect& device_viewport_rect, |
| 74 const gfx::Rect& device_clip_rect, | 76 const gfx::Rect& device_clip_rect, |
| 75 bool disable_picture_quad_image_filtering) = 0; | 77 bool disable_picture_quad_image_filtering) = 0; |
| 76 | 78 |
| 77 // Waits for rendering to finish. | 79 // Waits for rendering to finish. |
| 78 virtual void Finish() = 0; | 80 virtual void Finish() = 0; |
| 79 | 81 |
| 80 // Puts backbuffer onscreen. | 82 // Puts backbuffer onscreen. |
| 81 virtual void SwapBuffers(CompositorFrameMetadata metadata) = 0; | 83 virtual void SwapBuffers(CompositorFrameMetadata metadata) = 0; |
| 82 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} | 84 virtual void ReceiveSwapBuffersAck(const CompositorFrameAck& ack) {} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 94 const RendererSettings* settings_; | 96 const RendererSettings* settings_; |
| 95 bool visible_; | 97 bool visible_; |
| 96 | 98 |
| 97 private: | 99 private: |
| 98 DISALLOW_COPY_AND_ASSIGN(Renderer); | 100 DISALLOW_COPY_AND_ASSIGN(Renderer); |
| 99 }; | 101 }; |
| 100 | 102 |
| 101 } // namespace cc | 103 } // namespace cc |
| 102 | 104 |
| 103 #endif // CC_OUTPUT_RENDERER_H_ | 105 #endif // CC_OUTPUT_RENDERER_H_ |
| OLD | NEW |