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" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 virtual bool FlippedFramebuffer(const DrawingFrame* frame) const = 0; | 131 virtual bool FlippedFramebuffer(const DrawingFrame* frame) const = 0; |
132 virtual void EnsureScissorTestEnabled() = 0; | 132 virtual void EnsureScissorTestEnabled() = 0; |
133 virtual void EnsureScissorTestDisabled() = 0; | 133 virtual void EnsureScissorTestDisabled() = 0; |
134 virtual void DiscardBackbuffer() {} | 134 virtual void DiscardBackbuffer() {} |
135 virtual void EnsureBackbuffer() {} | 135 virtual void EnsureBackbuffer() {} |
136 | 136 |
137 virtual void CopyCurrentRenderPassToBitmap( | 137 virtual void CopyCurrentRenderPassToBitmap( |
138 DrawingFrame* frame, | 138 DrawingFrame* frame, |
139 scoped_ptr<CopyOutputRequest> request) = 0; | 139 scoped_ptr<CopyOutputRequest> request) = 0; |
140 | 140 |
141 base::ScopedPtrHashMap<RenderPassId, ScopedResource> render_pass_textures_; | 141 base::ScopedPtrHashMap<RenderPassId, scoped_ptr<ScopedResource>> render_pass_t
extures_; |
142 OutputSurface* output_surface_; | 142 OutputSurface* output_surface_; |
143 ResourceProvider* resource_provider_; | 143 ResourceProvider* resource_provider_; |
144 scoped_ptr<OverlayProcessor> overlay_processor_; | 144 scoped_ptr<OverlayProcessor> overlay_processor_; |
145 | 145 |
146 // For use in coordinate conversion, this stores the output rect, viewport | 146 // For use in coordinate conversion, this stores the output rect, viewport |
147 // rect (= unflipped version of glViewport rect), and the size of target | 147 // rect (= unflipped version of glViewport rect), and the size of target |
148 // framebuffer. During a draw, this stores the values for the current render | 148 // framebuffer. During a draw, this stores the values for the current render |
149 // pass; in between draws, they retain the values for the root render pass of | 149 // pass; in between draws, they retain the values for the root render pass of |
150 // the last draw. | 150 // the last draw. |
151 gfx::Rect current_draw_rect_; | 151 gfx::Rect current_draw_rect_; |
152 gfx::Rect current_viewport_rect_; | 152 gfx::Rect current_viewport_rect_; |
153 gfx::Size current_surface_size_; | 153 gfx::Size current_surface_size_; |
154 | 154 |
155 private: | 155 private: |
156 gfx::Vector2d enlarge_pass_texture_amount_; | 156 gfx::Vector2d enlarge_pass_texture_amount_; |
157 | 157 |
158 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 158 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
159 }; | 159 }; |
160 | 160 |
161 } // namespace cc | 161 } // namespace cc |
162 | 162 |
163 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 163 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
OLD | NEW |