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 #include <vector> | 10 #include <vector> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 gfx::Size surface_size_for_swap_buffers() const { | 175 gfx::Size surface_size_for_swap_buffers() const { |
176 return reshape_surface_size_; | 176 return reshape_surface_size_; |
177 } | 177 } |
178 | 178 |
179 const RendererSettings* const settings_; | 179 const RendererSettings* const settings_; |
180 OutputSurface* const output_surface_; | 180 OutputSurface* const output_surface_; |
181 ResourceProvider* const resource_provider_; | 181 ResourceProvider* const resource_provider_; |
182 // This can be replaced by test implementations. | 182 // This can be replaced by test implementations. |
183 std::unique_ptr<OverlayProcessor> overlay_processor_; | 183 std::unique_ptr<OverlayProcessor> overlay_processor_; |
184 | 184 |
| 185 // Whether it's valid to draw with the current damage rect. Trivially |
| 186 // true when using partial swap. |
| 187 bool allow_partial_draw_ = false; |
185 // Whether it's valid to SwapBuffers with an empty rect. Trivially true when | 188 // Whether it's valid to SwapBuffers with an empty rect. Trivially true when |
186 // using partial swap. | 189 // using partial swap. |
187 bool allow_empty_swap_ = false; | 190 bool allow_empty_swap_ = false; |
188 // Whether partial swap can be used. | 191 // Whether partial swap is used. |
189 bool use_partial_swap_ = false; | 192 bool use_partial_swap_ = false; |
190 // Whether overdraw feedback is enabled and can be used. | 193 // Whether overdraw feedback is enabled and can be used. |
191 bool overdraw_feedback_ = false; | 194 bool overdraw_feedback_ = false; |
192 // Whether the SetDrawRectangle and EnableDCLayers commands are in | 195 // Whether the SetDrawRectangle and EnableDCLayers commands are in |
193 // use. | 196 // use. |
194 bool supports_dc_layers_ = false; | 197 bool supports_dc_layers_ = false; |
195 // Whether the output surface is actually using DirectComposition. | 198 // Whether the output surface is actually using DirectComposition. |
196 bool using_dc_layers_ = false; | 199 bool using_dc_layers_ = false; |
197 // This counts the number of draws since the last time | 200 // This counts the number of draws since the last time |
198 // DirectComposition layers needed to be used. | 201 // DirectComposition layers needed to be used. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 gfx::ColorSpace reshape_device_color_space_; | 252 gfx::ColorSpace reshape_device_color_space_; |
250 bool reshape_has_alpha_ = false; | 253 bool reshape_has_alpha_ = false; |
251 bool reshape_use_stencil_ = false; | 254 bool reshape_use_stencil_ = false; |
252 | 255 |
253 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 256 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
254 }; | 257 }; |
255 | 258 |
256 } // namespace cc | 259 } // namespace cc |
257 | 260 |
258 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 261 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
OLD | NEW |