Chromium Code Reviews| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 } | 178 } |
| 179 | 179 |
| 180 const RendererSettings* const settings_; | 180 const RendererSettings* const settings_; |
| 181 OutputSurface* const output_surface_; | 181 OutputSurface* const output_surface_; |
| 182 ResourceProvider* const resource_provider_; | 182 ResourceProvider* const resource_provider_; |
| 183 // This can be replaced by test implementations. | 183 // This can be replaced by test implementations. |
| 184 std::unique_ptr<OverlayProcessor> overlay_processor_; | 184 std::unique_ptr<OverlayProcessor> overlay_processor_; |
| 185 | 185 |
| 186 // Whether it's valid to SwapBuffers with an empty rect. Trivially true when | 186 // Whether it's valid to SwapBuffers with an empty rect. Trivially true when |
| 187 // using partial swap. | 187 // using partial swap. |
| 188 bool allow_empty_swap_; | 188 bool allow_empty_swap_; |
|
sunnyps
2017/01/28 01:33:58
nit: can you initialize these too?
| |
| 189 // Whether partial swap can be used. | 189 // Whether partial swap can be used. |
| 190 bool use_partial_swap_; | 190 bool use_partial_swap_; |
| 191 | 191 |
| 192 // Whether the SetDrawRectangle command is in use. | |
| 193 bool use_set_draw_rectangle_ = false; | |
| 194 | |
| 192 // TODO(danakj): Just use a vector of pairs here? Hash map is way overkill. | 195 // TODO(danakj): Just use a vector of pairs here? Hash map is way overkill. |
| 193 std::unordered_map<int, std::unique_ptr<ScopedResource>> | 196 std::unordered_map<int, std::unique_ptr<ScopedResource>> |
| 194 render_pass_textures_; | 197 render_pass_textures_; |
| 195 std::unordered_map<int, TileDrawQuad> render_pass_bypass_quads_; | 198 std::unordered_map<int, TileDrawQuad> render_pass_bypass_quads_; |
| 196 | 199 |
| 197 RenderPassFilterList render_pass_filters_; | 200 RenderPassFilterList render_pass_filters_; |
| 198 RenderPassFilterList render_pass_background_filters_; | 201 RenderPassFilterList render_pass_background_filters_; |
| 199 | 202 |
| 200 bool visible_ = false; | 203 bool visible_ = false; |
| 201 | 204 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 218 float reshape_device_scale_factor_ = 0.f; | 221 float reshape_device_scale_factor_ = 0.f; |
| 219 gfx::ColorSpace reshape_device_color_space_; | 222 gfx::ColorSpace reshape_device_color_space_; |
| 220 bool reshape_has_alpha_ = false; | 223 bool reshape_has_alpha_ = false; |
| 221 | 224 |
| 222 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 225 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 223 }; | 226 }; |
| 224 | 227 |
| 225 } // namespace cc | 228 } // namespace cc |
| 226 | 229 |
| 227 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 230 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |