| 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 <unordered_map> | 8 #include <unordered_map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
| 13 #include "cc/output/ca_layer_overlay.h" | 13 #include "cc/output/ca_layer_overlay.h" |
| 14 #include "cc/output/overlay_processor.h" | 14 #include "cc/output/overlay_processor.h" |
| 15 #include "cc/output/renderer.h" | 15 #include "cc/output/renderer.h" |
| 16 #include "cc/raster/task_graph_runner.h" | 16 #include "cc/raster/task_graph_runner.h" |
| 17 #include "cc/resources/resource_provider.h" | 17 #include "cc/resources/resource_provider.h" |
| 18 #include "cc/resources/scoped_resource.h" | 18 #include "cc/resources/scoped_resource.h" |
| 19 #include "gpu/command_buffer/common/texture_in_use_response.h" |
| 19 #include "ui/gfx/geometry/quad_f.h" | 20 #include "ui/gfx/geometry/quad_f.h" |
| 20 | 21 |
| 21 namespace cc { | 22 namespace cc { |
| 22 class DrawPolygon; | 23 class DrawPolygon; |
| 23 class ResourceProvider; | 24 class ResourceProvider; |
| 24 | 25 |
| 25 // This is the base class for code shared between the GL and software | 26 // This is the base class for code shared between the GL and software |
| 26 // renderer implementations. "Direct" refers to the fact that it does not | 27 // renderer implementations. "Direct" refers to the fact that it does not |
| 27 // delegate rendering to another compositor. | 28 // delegate rendering to another compositor. |
| 28 class CC_EXPORT DirectRenderer : public Renderer { | 29 class CC_EXPORT DirectRenderer : public Renderer { |
| 29 public: | 30 public: |
| 30 ~DirectRenderer() override; | 31 ~DirectRenderer() override; |
| 31 | 32 |
| 32 void DecideRenderPassAllocationsForFrame( | 33 void DecideRenderPassAllocationsForFrame( |
| 33 const RenderPassList& render_passes_in_draw_order) override; | 34 const RenderPassList& render_passes_in_draw_order) override; |
| 34 bool HasAllocatedResourcesForTesting(RenderPassId id) const override; | 35 bool HasAllocatedResourcesForTesting(RenderPassId id) const override; |
| 35 void DrawFrame(RenderPassList* render_passes_in_draw_order, | 36 void DrawFrame(RenderPassList* render_passes_in_draw_order, |
| 36 float device_scale_factor, | 37 float device_scale_factor, |
| 37 const gfx::Rect& device_viewport_rect, | 38 const gfx::Rect& device_viewport_rect, |
| 38 const gfx::Rect& device_clip_rect, | 39 const gfx::Rect& device_clip_rect, |
| 39 bool disable_picture_quad_image_filtering) override; | 40 bool disable_picture_quad_image_filtering) override; |
| 40 virtual void SwapBuffersComplete() {} | 41 virtual void SwapBuffersComplete() {} |
| 42 virtual void DidReceiveTextureInUseResponses( |
| 43 const gpu::TextureInUseResponses& responses) {} |
| 41 | 44 |
| 42 struct CC_EXPORT DrawingFrame { | 45 struct CC_EXPORT DrawingFrame { |
| 43 DrawingFrame(); | 46 DrawingFrame(); |
| 44 ~DrawingFrame(); | 47 ~DrawingFrame(); |
| 45 | 48 |
| 46 const RenderPassList* render_passes_in_draw_order; | 49 const RenderPassList* render_passes_in_draw_order; |
| 47 const RenderPass* root_render_pass; | 50 const RenderPass* root_render_pass; |
| 48 const RenderPass* current_render_pass; | 51 const RenderPass* current_render_pass; |
| 49 const ScopedResource* current_texture; | 52 const ScopedResource* current_texture; |
| 50 | 53 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 171 |
| 169 private: | 172 private: |
| 170 gfx::Size enlarge_pass_texture_amount_; | 173 gfx::Size enlarge_pass_texture_amount_; |
| 171 | 174 |
| 172 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 175 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 173 }; | 176 }; |
| 174 | 177 |
| 175 } // namespace cc | 178 } // namespace cc |
| 176 | 179 |
| 177 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 180 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |