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

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

Issue 1818073002: Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase [If you wait by the river long enough, the bodies of your gyp files will float by] Created 4 years, 4 months 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 | « cc/layers/video_layer_impl.cc ('k') | cc/output/shader.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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 SetUseProgram(program->program()); 2401 SetUseProgram(program->program());
2402 2402
2403 ToGLMatrix(&gl_matrix[0], quad->matrix); 2403 ToGLMatrix(&gl_matrix[0], quad->matrix);
2404 2404
2405 ResourceProvider::ScopedReadLockGL lock(resource_provider_, 2405 ResourceProvider::ScopedReadLockGL lock(resource_provider_,
2406 quad->resource_id()); 2406 quad->resource_id());
2407 2407
2408 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); 2408 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
2409 gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); 2409 gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
2410 2410
2411 // TODO(liberato): stream_texture_android should stop sending |gl_matrix| to
2412 // the video frame provider with this change (and to us), but it should
2413 // start reporting the current matrix via
2414 // GLStreamTextureImage::GetTextureMatrix. Until then, though, this will use
2415 // the matrix that we provide to it, unless the GLStreamTextureImage
2416 // overrides it. This lets it also work with AVDACodecImage, which provides
2417 // the correct custom matrix and supplies a default one to us.
2418 gl_->UniformMatrix4fvStreamTextureMatrixCHROMIUM( 2411 gl_->UniformMatrix4fvStreamTextureMatrixCHROMIUM(
2419 program->vertex_shader().tex_matrix_location(), false, gl_matrix); 2412 program->vertex_shader().tex_matrix_location(), false, gl_matrix);
2420 2413
2421 gl_->Uniform1i(program->fragment_shader().sampler_location(), 0); 2414 gl_->Uniform1i(program->fragment_shader().sampler_location(), 0);
2422 2415
2423 SetShaderOpacity(quad->shared_quad_state->opacity, 2416 SetShaderOpacity(quad->shared_quad_state->opacity,
2424 program->fragment_shader().alpha_location()); 2417 program->fragment_shader().alpha_location());
2425 if (!clip_region) { 2418 if (!clip_region) {
2426 DrawQuadGeometry(frame, quad->shared_quad_state->quad_to_target_transform, 2419 DrawQuadGeometry(frame, quad->shared_quad_state->quad_to_target_transform,
2427 gfx::RectF(quad->rect), 2420 gfx::RectF(quad->rect),
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
3865 resource_provider_, contents_texture->id())); 3858 resource_provider_, contents_texture->id()));
3866 source_texture = source->texture_id(); 3859 source_texture = source->texture_id();
3867 } 3860 }
3868 gl_->CopySubTextureCHROMIUM(source_texture, destination.texture_id(), 0, 0, 0, 3861 gl_->CopySubTextureCHROMIUM(source_texture, destination.texture_id(), 0, 0, 0,
3869 0, contents_texture->size().width(), 3862 0, contents_texture->size().width(),
3870 contents_texture->size().height(), GL_TRUE, 3863 contents_texture->size().height(), GL_TRUE,
3871 GL_FALSE, GL_FALSE); 3864 GL_FALSE, GL_FALSE);
3872 } 3865 }
3873 3866
3874 } // namespace cc 3867 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/shader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698