| 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_DIRECT_RENDERER_H_ | 5 #ifndef CC_OUTPUT_DIRECT_RENDERER_H_ |
| 6 #define CC_OUTPUT_DIRECT_RENDERER_H_ | 6 #define CC_OUTPUT_DIRECT_RENDERER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
| 14 #include "cc/output/ca_layer_overlay.h" | 14 #include "cc/output/ca_layer_overlay.h" |
| 15 #include "cc/output/output_surface_frame.h" |
| 15 #include "cc/output/overlay_processor.h" | 16 #include "cc/output/overlay_processor.h" |
| 16 #include "cc/quads/tile_draw_quad.h" | 17 #include "cc/quads/tile_draw_quad.h" |
| 17 #include "cc/resources/resource_provider.h" | 18 #include "cc/resources/resource_provider.h" |
| 18 #include "gpu/command_buffer/common/texture_in_use_response.h" | 19 #include "gpu/command_buffer/common/texture_in_use_response.h" |
| 19 #include "ui/events/latency_info.h" | 20 #include "ui/events/latency_info.h" |
| 20 #include "ui/gfx/geometry/quad_f.h" | 21 #include "ui/gfx/geometry/quad_f.h" |
| 21 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
| 22 | 23 |
| 23 namespace gfx { | 24 namespace gfx { |
| 24 class ColorSpace; | 25 class ColorSpace; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 50 void SetVisible(bool visible); | 51 void SetVisible(bool visible); |
| 51 void DecideRenderPassAllocationsForFrame( | 52 void DecideRenderPassAllocationsForFrame( |
| 52 const RenderPassList& render_passes_in_draw_order); | 53 const RenderPassList& render_passes_in_draw_order); |
| 53 bool HasAllocatedResourcesForTesting(int render_pass_id) const; | 54 bool HasAllocatedResourcesForTesting(int render_pass_id) const; |
| 54 void DrawFrame(RenderPassList* render_passes_in_draw_order, | 55 void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 55 float device_scale_factor, | 56 float device_scale_factor, |
| 56 const gfx::ColorSpace& device_color_space, | 57 const gfx::ColorSpace& device_color_space, |
| 57 const gfx::Size& device_viewport_size); | 58 const gfx::Size& device_viewport_size); |
| 58 | 59 |
| 59 // Public interface implemented by subclasses. | 60 // Public interface implemented by subclasses. |
| 60 virtual void SwapBuffers(std::vector<ui::LatencyInfo> latency_info) = 0; | 61 virtual void SwapBuffers(OutputSurfaceFrame output_frame) = 0; |
| 61 virtual void SwapBuffersComplete() {} | 62 virtual void SwapBuffersComplete() {} |
| 62 virtual void DidReceiveTextureInUseResponses( | 63 virtual void DidReceiveTextureInUseResponses( |
| 63 const gpu::TextureInUseResponses& responses) {} | 64 const gpu::TextureInUseResponses& responses) {} |
| 64 | 65 |
| 65 // Allow tests to enlarge the texture size of non-root render passes to | 66 // Allow tests to enlarge the texture size of non-root render passes to |
| 66 // verify cases where the texture doesn't match the render pass size. | 67 // verify cases where the texture doesn't match the render pass size. |
| 67 void SetEnlargePassTextureAmountForTesting(const gfx::Size& amount) { | 68 void SetEnlargePassTextureAmountForTesting(const gfx::Size& amount) { |
| 68 enlarge_pass_texture_amount_ = amount; | 69 enlarge_pass_texture_amount_ = amount; |
| 69 } | 70 } |
| 70 | 71 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 float reshape_device_scale_factor_ = 0.f; | 211 float reshape_device_scale_factor_ = 0.f; |
| 211 gfx::ColorSpace reshape_device_color_space_; | 212 gfx::ColorSpace reshape_device_color_space_; |
| 212 bool reshape_has_alpha_ = false; | 213 bool reshape_has_alpha_ = false; |
| 213 | 214 |
| 214 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 215 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 215 }; | 216 }; |
| 216 | 217 |
| 217 } // namespace cc | 218 } // namespace cc |
| 218 | 219 |
| 219 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 220 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |