Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: cc/output/gl_renderer.cc

Issue 1515723002: cc: Avoid crash on Android in GLRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after
3407 if (!program->initialized()) { 3407 if (!program->initialized()) {
3408 TRACE_EVENT0("cc", "GLRenderer::videoYUVAProgram::initialize"); 3408 TRACE_EVENT0("cc", "GLRenderer::videoYUVAProgram::initialize");
3409 program->Initialize(output_surface_->context_provider(), precision, 3409 program->Initialize(output_surface_->context_provider(), precision,
3410 sampler); 3410 sampler);
3411 } 3411 }
3412 return program; 3412 return program;
3413 } 3413 }
3414 3414
3415 const GLRenderer::VideoStreamTextureProgram* 3415 const GLRenderer::VideoStreamTextureProgram*
3416 GLRenderer::GetVideoStreamTextureProgram(TexCoordPrecision precision) { 3416 GLRenderer::GetVideoStreamTextureProgram(TexCoordPrecision precision) {
3417 if (!Capabilities().using_egl_image)
3418 return NULL;
3419 DCHECK_GE(precision, 0); 3417 DCHECK_GE(precision, 0);
3420 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION); 3418 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION);
3421 VideoStreamTextureProgram* program = 3419 VideoStreamTextureProgram* program =
3422 &video_stream_texture_program_[precision]; 3420 &video_stream_texture_program_[precision];
3423 if (!program->initialized()) { 3421 if (!program->initialized()) {
3424 TRACE_EVENT0("cc", "GLRenderer::streamTextureProgram::initialize"); 3422 TRACE_EVENT0("cc", "GLRenderer::streamTextureProgram::initialize");
3425 program->Initialize(output_surface_->context_provider(), precision, 3423 program->Initialize(output_surface_->context_provider(), precision,
3426 SAMPLER_TYPE_EXTERNAL_OES); 3424 SAMPLER_TYPE_EXTERNAL_OES);
3427 } 3425 }
3428 return program; 3426 return program;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
3582 texture_id = pending_overlay_resources_.back()->texture_id(); 3580 texture_id = pending_overlay_resources_.back()->texture_id();
3583 } 3581 }
3584 3582
3585 context_support_->ScheduleOverlayPlane( 3583 context_support_->ScheduleOverlayPlane(
3586 overlay.plane_z_order, overlay.transform, texture_id, 3584 overlay.plane_z_order, overlay.transform, texture_id,
3587 ToNearestRect(overlay.display_rect), overlay.uv_rect); 3585 ToNearestRect(overlay.display_rect), overlay.uv_rect);
3588 } 3586 }
3589 } 3587 }
3590 3588
3591 } // namespace cc 3589 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698