| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 gfx::Size device_viewport_size; | 86 gfx::Size device_viewport_size; |
| 87 | 87 |
| 88 gfx::Transform projection_matrix; | 88 gfx::Transform projection_matrix; |
| 89 gfx::Transform window_matrix; | 89 gfx::Transform window_matrix; |
| 90 | 90 |
| 91 OverlayCandidateList overlay_list; | 91 OverlayCandidateList overlay_list; |
| 92 CALayerOverlayList ca_layer_overlay_list; | 92 CALayerOverlayList ca_layer_overlay_list; |
| 93 DCLayerOverlayList dc_layer_overlay_list; | 93 DCLayerOverlayList dc_layer_overlay_list; |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 void DisableColorChecksForTesting() { |
| 97 disable_color_checks_for_testing_ = true; |
| 98 } |
| 99 |
| 96 protected: | 100 protected: |
| 97 friend class BspWalkActionDrawPolygon; | 101 friend class BspWalkActionDrawPolygon; |
| 98 | 102 |
| 99 enum SurfaceInitializationMode { | 103 enum SurfaceInitializationMode { |
| 100 SURFACE_INITIALIZATION_MODE_PRESERVE, | 104 SURFACE_INITIALIZATION_MODE_PRESERVE, |
| 101 SURFACE_INITIALIZATION_MODE_SCISSORED_CLEAR, | 105 SURFACE_INITIALIZATION_MODE_SCISSORED_CLEAR, |
| 102 SURFACE_INITIALIZATION_MODE_FULL_SURFACE_CLEAR, | 106 SURFACE_INITIALIZATION_MODE_FULL_SURFACE_CLEAR, |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 static gfx::RectF QuadVertexRect(); | 109 static gfx::RectF QuadVertexRect(); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 200 |
| 197 // TODO(danakj): Just use a vector of pairs here? Hash map is way overkill. | 201 // TODO(danakj): Just use a vector of pairs here? Hash map is way overkill. |
| 198 std::unordered_map<int, std::unique_ptr<ScopedResource>> | 202 std::unordered_map<int, std::unique_ptr<ScopedResource>> |
| 199 render_pass_textures_; | 203 render_pass_textures_; |
| 200 std::unordered_map<int, TileDrawQuad> render_pass_bypass_quads_; | 204 std::unordered_map<int, TileDrawQuad> render_pass_bypass_quads_; |
| 201 | 205 |
| 202 RenderPassFilterList render_pass_filters_; | 206 RenderPassFilterList render_pass_filters_; |
| 203 RenderPassFilterList render_pass_background_filters_; | 207 RenderPassFilterList render_pass_background_filters_; |
| 204 | 208 |
| 205 bool visible_ = false; | 209 bool visible_ = false; |
| 210 bool disable_color_checks_for_testing_ = false; |
| 206 | 211 |
| 207 // For use in coordinate conversion, this stores the output rect, viewport | 212 // For use in coordinate conversion, this stores the output rect, viewport |
| 208 // rect (= unflipped version of glViewport rect), the size of target | 213 // rect (= unflipped version of glViewport rect), the size of target |
| 209 // framebuffer, and the current window space viewport. During a draw, this | 214 // framebuffer, and the current window space viewport. During a draw, this |
| 210 // stores the values for the current render pass; in between draws, they | 215 // stores the values for the current render pass; in between draws, they |
| 211 // retain the values for the root render pass of the last draw. | 216 // retain the values for the root render pass of the last draw. |
| 212 gfx::Rect current_draw_rect_; | 217 gfx::Rect current_draw_rect_; |
| 213 gfx::Rect current_viewport_rect_; | 218 gfx::Rect current_viewport_rect_; |
| 214 gfx::Size current_surface_size_; | 219 gfx::Size current_surface_size_; |
| 215 gfx::Rect current_window_space_viewport_; | 220 gfx::Rect current_window_space_viewport_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 244 gfx::ColorSpace reshape_device_color_space_; | 249 gfx::ColorSpace reshape_device_color_space_; |
| 245 bool reshape_has_alpha_ = false; | 250 bool reshape_has_alpha_ = false; |
| 246 bool reshape_use_stencil_ = false; | 251 bool reshape_use_stencil_ = false; |
| 247 | 252 |
| 248 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); | 253 DISALLOW_COPY_AND_ASSIGN(DirectRenderer); |
| 249 }; | 254 }; |
| 250 | 255 |
| 251 } // namespace cc | 256 } // namespace cc |
| 252 | 257 |
| 253 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ | 258 #endif // CC_OUTPUT_DIRECT_RENDERER_H_ |
| OLD | NEW |