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 #include "cc/output/software_renderer.h" | 5 #include "cc/output/software_renderer.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 break; | 274 break; |
275 case DrawQuad::SOLID_COLOR: | 275 case DrawQuad::SOLID_COLOR: |
276 DrawSolidColorQuad(frame, SolidColorDrawQuad::MaterialCast(quad)); | 276 DrawSolidColorQuad(frame, SolidColorDrawQuad::MaterialCast(quad)); |
277 break; | 277 break; |
278 case DrawQuad::TEXTURE_CONTENT: | 278 case DrawQuad::TEXTURE_CONTENT: |
279 DrawTextureQuad(frame, TextureDrawQuad::MaterialCast(quad)); | 279 DrawTextureQuad(frame, TextureDrawQuad::MaterialCast(quad)); |
280 break; | 280 break; |
281 case DrawQuad::TILED_CONTENT: | 281 case DrawQuad::TILED_CONTENT: |
282 DrawTileQuad(frame, TileDrawQuad::MaterialCast(quad)); | 282 DrawTileQuad(frame, TileDrawQuad::MaterialCast(quad)); |
283 break; | 283 break; |
| 284 case DrawQuad::SURFACE_CONTENT: |
| 285 // Surface content should be fully resolved to other quad types before |
| 286 // reaching a direct renderer. |
| 287 NOTREACHED(); |
| 288 break; |
284 case DrawQuad::INVALID: | 289 case DrawQuad::INVALID: |
285 case DrawQuad::IO_SURFACE_CONTENT: | 290 case DrawQuad::IO_SURFACE_CONTENT: |
286 case DrawQuad::YUV_VIDEO_CONTENT: | 291 case DrawQuad::YUV_VIDEO_CONTENT: |
287 case DrawQuad::STREAM_VIDEO_CONTENT: | 292 case DrawQuad::STREAM_VIDEO_CONTENT: |
288 DrawUnsupportedQuad(frame, quad); | 293 DrawUnsupportedQuad(frame, quad); |
289 NOTREACHED(); | 294 NOTREACHED(); |
290 break; | 295 break; |
291 } | 296 } |
292 | 297 |
293 current_canvas_->resetMatrix(); | 298 current_canvas_->resetMatrix(); |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 return; | 610 return; |
606 visible_ = visible; | 611 visible_ = visible; |
607 | 612 |
608 if (visible_) | 613 if (visible_) |
609 EnsureBackbuffer(); | 614 EnsureBackbuffer(); |
610 else | 615 else |
611 DiscardBackbuffer(); | 616 DiscardBackbuffer(); |
612 } | 617 } |
613 | 618 |
614 } // namespace cc | 619 } // namespace cc |
OLD | NEW |