| 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/renderer.h" | 12 #include "cc/output/renderer.h" |
| 13 #include "cc/resources/resource_provider.h" | 13 #include "cc/resources/resource_provider.h" |
| 14 #include "cc/resources/scoped_resource.h" | 14 #include "cc/resources/scoped_resource.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 class ResourceProvider; | 18 class ResourceProvider; |
| 19 class OverlayRenderer; |
| 19 | 20 |
| 20 // This is the base class for code shared between the GL and software | 21 // This is the base class for code shared between the GL and software |
| 21 // renderer implementations. "Direct" refers to the fact that it does not | 22 // renderer implementations. "Direct" refers to the fact that it does not |
| 22 // delegate rendering to another compositor. | 23 // delegate rendering to another compositor. |
| 23 class CC_EXPORT DirectRenderer : public Renderer { | 24 class CC_EXPORT DirectRenderer : public Renderer { |
| 24 public: | 25 public: |
| 25 virtual ~DirectRenderer(); | 26 virtual ~DirectRenderer(); |
| 26 | 27 |
| 27 ResourceProvider* resource_provider() const { return resource_provider_; } | 28 ResourceProvider* resource_provider() const { return resource_provider_; } |
| 28 | 29 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // rect (= unflipped version of glViewport rect), and the size of target | 129 // rect (= unflipped version of glViewport rect), and the size of target |
| 129 // framebuffer. During a draw, this stores the values for the current render | 130 // 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 | 131 // pass; in between draws, they retain the values for the root render pass of |
| 131 // the last draw. | 132 // the last draw. |
| 132 gfx::Rect current_draw_rect_; | 133 gfx::Rect current_draw_rect_; |
| 133 gfx::Rect current_viewport_rect_; | 134 gfx::Rect current_viewport_rect_; |
| 134 gfx::Size current_surface_size_; | 135 gfx::Size current_surface_size_; |
| 135 | 136 |
| 136 private: | 137 private: |
| 137 gfx::Vector2d enlarge_pass_texture_amount_; | 138 gfx::Vector2d enlarge_pass_texture_amount_; |
| 139 scoped_ptr<OverlayRenderer> overlay_renderer_; |
| 138 | 140 |
| 139 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 141 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 } // namespace cc | 144 } // namespace cc |
| 143 | 145 |
| 144 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 146 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |