| 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 3383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3394 if (!program->initialized()) { | 3394 if (!program->initialized()) { |
| 3395 TRACE_EVENT0("cc", "GLRenderer::videoYUVAProgram::initialize"); | 3395 TRACE_EVENT0("cc", "GLRenderer::videoYUVAProgram::initialize"); |
| 3396 program->Initialize(output_surface_->context_provider(), precision, | 3396 program->Initialize(output_surface_->context_provider(), precision, |
| 3397 sampler); | 3397 sampler); |
| 3398 } | 3398 } |
| 3399 return program; | 3399 return program; |
| 3400 } | 3400 } |
| 3401 | 3401 |
| 3402 const GLRenderer::VideoStreamTextureProgram* | 3402 const GLRenderer::VideoStreamTextureProgram* |
| 3403 GLRenderer::GetVideoStreamTextureProgram(TexCoordPrecision precision) { | 3403 GLRenderer::GetVideoStreamTextureProgram(TexCoordPrecision precision) { |
| 3404 if (!Capabilities().using_egl_image) | |
| 3405 return NULL; | |
| 3406 DCHECK_GE(precision, 0); | 3404 DCHECK_GE(precision, 0); |
| 3407 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION); | 3405 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION); |
| 3408 VideoStreamTextureProgram* program = | 3406 VideoStreamTextureProgram* program = |
| 3409 &video_stream_texture_program_[precision]; | 3407 &video_stream_texture_program_[precision]; |
| 3410 if (!program->initialized()) { | 3408 if (!program->initialized()) { |
| 3411 TRACE_EVENT0("cc", "GLRenderer::streamTextureProgram::initialize"); | 3409 TRACE_EVENT0("cc", "GLRenderer::streamTextureProgram::initialize"); |
| 3412 program->Initialize(output_surface_->context_provider(), precision, | 3410 program->Initialize(output_surface_->context_provider(), precision, |
| 3413 SAMPLER_TYPE_EXTERNAL_OES); | 3411 SAMPLER_TYPE_EXTERNAL_OES); |
| 3414 } | 3412 } |
| 3415 return program; | 3413 return program; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3543 texture_id = pending_overlay_resources_.back()->texture_id(); | 3541 texture_id = pending_overlay_resources_.back()->texture_id(); |
| 3544 } | 3542 } |
| 3545 | 3543 |
| 3546 context_support_->ScheduleOverlayPlane( | 3544 context_support_->ScheduleOverlayPlane( |
| 3547 overlay.plane_z_order, overlay.transform, texture_id, | 3545 overlay.plane_z_order, overlay.transform, texture_id, |
| 3548 ToNearestRect(overlay.display_rect), overlay.uv_rect); | 3546 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
| 3549 } | 3547 } |
| 3550 } | 3548 } |
| 3551 | 3549 |
| 3552 } // namespace cc | 3550 } // namespace cc |
| OLD | NEW |