| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/output/overlay_processor.h" |
| 12 #include "cc/output/renderer.h" | 13 #include "cc/output/renderer.h" |
| 13 #include "cc/resources/resource_provider.h" | 14 #include "cc/resources/resource_provider.h" |
| 14 #include "cc/resources/scoped_resource.h" | 15 #include "cc/resources/scoped_resource.h" |
| 15 #include "cc/resources/task_graph_runner.h" | 16 #include "cc/resources/task_graph_runner.h" |
| 16 | 17 |
| 17 namespace cc { | 18 namespace cc { |
| 18 | 19 |
| 19 class ResourceProvider; | 20 class ResourceProvider; |
| 20 | 21 |
| 21 // This is the base class for code shared between the GL and software | 22 // This is the base class for code shared between the GL and software |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 gfx::RectF root_damage_rect; | 51 gfx::RectF root_damage_rect; |
| 51 gfx::Rect device_viewport_rect; | 52 gfx::Rect device_viewport_rect; |
| 52 gfx::Rect device_clip_rect; | 53 gfx::Rect device_clip_rect; |
| 53 | 54 |
| 54 gfx::Transform projection_matrix; | 55 gfx::Transform projection_matrix; |
| 55 gfx::Transform window_matrix; | 56 gfx::Transform window_matrix; |
| 56 | 57 |
| 57 ContextProvider* offscreen_context_provider; | 58 ContextProvider* offscreen_context_provider; |
| 58 | 59 |
| 59 bool disable_picture_quad_image_filtering; | 60 bool disable_picture_quad_image_filtering; |
| 61 |
| 62 OverlayCandidateList overlay_list; |
| 60 }; | 63 }; |
| 61 | 64 |
| 62 void SetEnlargePassTextureAmountForTesting(const gfx::Vector2d& amount); | 65 void SetEnlargePassTextureAmountForTesting(const gfx::Vector2d& amount); |
| 63 | 66 |
| 64 protected: | 67 protected: |
| 65 DirectRenderer(RendererClient* client, | 68 DirectRenderer(RendererClient* client, |
| 66 const LayerTreeSettings* settings, | 69 const LayerTreeSettings* settings, |
| 67 OutputSurface* output_surface, | 70 OutputSurface* output_surface, |
| 68 ResourceProvider* resource_provider); | 71 ResourceProvider* resource_provider); |
| 69 | 72 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 virtual void DiscardBackbuffer() {} | 119 virtual void DiscardBackbuffer() {} |
| 117 virtual void EnsureBackbuffer() {} | 120 virtual void EnsureBackbuffer() {} |
| 118 | 121 |
| 119 virtual void CopyCurrentRenderPassToBitmap( | 122 virtual void CopyCurrentRenderPassToBitmap( |
| 120 DrawingFrame* frame, | 123 DrawingFrame* frame, |
| 121 scoped_ptr<CopyOutputRequest> request) = 0; | 124 scoped_ptr<CopyOutputRequest> request) = 0; |
| 122 | 125 |
| 123 base::ScopedPtrHashMap<RenderPass::Id, ScopedResource> render_pass_textures_; | 126 base::ScopedPtrHashMap<RenderPass::Id, ScopedResource> render_pass_textures_; |
| 124 OutputSurface* output_surface_; | 127 OutputSurface* output_surface_; |
| 125 ResourceProvider* resource_provider_; | 128 ResourceProvider* resource_provider_; |
| 129 scoped_ptr<OverlayProcessor> overlay_processor_; |
| 126 | 130 |
| 127 // For use in coordinate conversion, this stores the output rect, viewport | 131 // For use in coordinate conversion, this stores the output rect, viewport |
| 128 // rect (= unflipped version of glViewport rect), and the size of target | 132 // rect (= unflipped version of glViewport rect), and the size of target |
| 129 // framebuffer. During a draw, this stores the values for the current render | 133 // framebuffer. During a draw, this stores the values for the current render |
| 130 // pass; in between draws, they retain the values for the root render pass of | 134 // pass; in between draws, they retain the values for the root render pass of |
| 131 // the last draw. | 135 // the last draw. |
| 132 gfx::Rect current_draw_rect_; | 136 gfx::Rect current_draw_rect_; |
| 133 gfx::Rect current_viewport_rect_; | 137 gfx::Rect current_viewport_rect_; |
| 134 gfx::Size current_surface_size_; | 138 gfx::Size current_surface_size_; |
| 135 | 139 |
| 136 private: | 140 private: |
| 137 gfx::Vector2d enlarge_pass_texture_amount_; | 141 gfx::Vector2d enlarge_pass_texture_amount_; |
| 138 | 142 |
| 139 internal::NamespaceToken on_demand_task_namespace_; | 143 internal::NamespaceToken on_demand_task_namespace_; |
| 140 | 144 |
| 141 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 145 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 142 }; | 146 }; |
| 143 | 147 |
| 144 } // namespace cc | 148 } // namespace cc |
| 145 | 149 |
| 146 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 150 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |