OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 break; | 341 break; |
342 case DrawQuad::RENDER_PASS: | 342 case DrawQuad::RENDER_PASS: |
343 DrawRenderPassQuad(frame, RenderPassDrawQuad::MaterialCast(quad)); | 343 DrawRenderPassQuad(frame, RenderPassDrawQuad::MaterialCast(quad)); |
344 break; | 344 break; |
345 case DrawQuad::SOLID_COLOR: | 345 case DrawQuad::SOLID_COLOR: |
346 DrawSolidColorQuad(frame, SolidColorDrawQuad::MaterialCast(quad)); | 346 DrawSolidColorQuad(frame, SolidColorDrawQuad::MaterialCast(quad)); |
347 break; | 347 break; |
348 case DrawQuad::STREAM_VIDEO_CONTENT: | 348 case DrawQuad::STREAM_VIDEO_CONTENT: |
349 DrawStreamVideoQuad(frame, StreamVideoDrawQuad::MaterialCast(quad)); | 349 DrawStreamVideoQuad(frame, StreamVideoDrawQuad::MaterialCast(quad)); |
350 break; | 350 break; |
| 351 case DrawQuad::SURFACE_CONTENT: |
| 352 // Surface content should be fully resolved to other quad types before |
| 353 // reaching a direct renderer. |
| 354 NOTREACHED(); |
| 355 break; |
351 case DrawQuad::TEXTURE_CONTENT: | 356 case DrawQuad::TEXTURE_CONTENT: |
352 EnqueueTextureQuad(frame, TextureDrawQuad::MaterialCast(quad)); | 357 EnqueueTextureQuad(frame, TextureDrawQuad::MaterialCast(quad)); |
353 break; | 358 break; |
354 case DrawQuad::TILED_CONTENT: | 359 case DrawQuad::TILED_CONTENT: |
355 DrawTileQuad(frame, TileDrawQuad::MaterialCast(quad)); | 360 DrawTileQuad(frame, TileDrawQuad::MaterialCast(quad)); |
356 break; | 361 break; |
357 case DrawQuad::YUV_VIDEO_CONTENT: | 362 case DrawQuad::YUV_VIDEO_CONTENT: |
358 DrawYUVVideoQuad(frame, YUVVideoDrawQuad::MaterialCast(quad)); | 363 DrawYUVVideoQuad(frame, YUVVideoDrawQuad::MaterialCast(quad)); |
359 break; | 364 break; |
360 } | 365 } |
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3006 is_scissor_enabled_ = false; | 3011 is_scissor_enabled_ = false; |
3007 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); | 3012 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); |
3008 scissor_rect_needs_reset_ = true; | 3013 scissor_rect_needs_reset_ = true; |
3009 } | 3014 } |
3010 | 3015 |
3011 bool GLRenderer::IsContextLost() { | 3016 bool GLRenderer::IsContextLost() { |
3012 return output_surface_->context_provider()->IsContextLost(); | 3017 return output_surface_->context_provider()->IsContextLost(); |
3013 } | 3018 } |
3014 | 3019 |
3015 } // namespace cc | 3020 } // namespace cc |
OLD | NEW |