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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2465 .egl_image_external); | 2465 .egl_image_external); |
2466 | 2466 |
2467 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired( | 2467 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired( |
2468 gl_, &highp_threshold_cache_, highp_threshold_min_, | 2468 gl_, &highp_threshold_cache_, highp_threshold_min_, |
2469 quad->shared_quad_state->visible_quad_layer_rect.bottom_right()); | 2469 quad->shared_quad_state->visible_quad_layer_rect.bottom_right()); |
2470 | 2470 |
2471 const VideoStreamTextureProgram* program = | 2471 const VideoStreamTextureProgram* program = |
2472 GetVideoStreamTextureProgram(tex_coord_precision); | 2472 GetVideoStreamTextureProgram(tex_coord_precision); |
2473 SetUseProgram(program->program()); | 2473 SetUseProgram(program->program()); |
2474 | 2474 |
| 2475 bool is_promotable = IsResourcePromotable(quad->resource_id()); |
| 2476 LOG(ERROR) << "AVDA: " << __FUNCTION__ << ": promotable: " << is_promotable; |
| 2477 |
2475 ToGLMatrix(&gl_matrix[0], quad->matrix); | 2478 ToGLMatrix(&gl_matrix[0], quad->matrix); |
2476 | 2479 |
2477 ResourceProvider::ScopedReadLockGL lock(resource_provider_, | 2480 ResourceProvider::ScopedReadLockGL lock(resource_provider_, |
2478 quad->resource_id()); | 2481 quad->resource_id()); |
2479 | 2482 |
2480 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); | 2483 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); |
2481 gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); | 2484 gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); |
2482 | 2485 |
2483 gl_->UniformMatrix4fvStreamTextureMatrixCHROMIUM( | 2486 gl_->UniformMatrix4fvStreamTextureMatrixCHROMIUM( |
2484 program->vertex_shader().tex_matrix_location(), false, gl_matrix); | 2487 program->vertex_shader().tex_matrix_location(), false, gl_matrix); |
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4045 // The alpha has already been applied when copying the RPDQ to an IOSurface. | 4048 // The alpha has already been applied when copying the RPDQ to an IOSurface. |
4046 GLfloat alpha = 1; | 4049 GLfloat alpha = 1; |
4047 gl_->ScheduleCALayerSharedStateCHROMIUM(alpha, is_clipped, clip_rect, | 4050 gl_->ScheduleCALayerSharedStateCHROMIUM(alpha, is_clipped, clip_rect, |
4048 sorting_context_id, gl_transform); | 4051 sorting_context_id, gl_transform); |
4049 gl_->ScheduleCALayerCHROMIUM( | 4052 gl_->ScheduleCALayerCHROMIUM( |
4050 texture_id, contents_rect, ca_layer_overlay->background_color, | 4053 texture_id, contents_rect, ca_layer_overlay->background_color, |
4051 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); | 4054 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); |
4052 } | 4055 } |
4053 | 4056 |
4054 } // namespace cc | 4057 } // namespace cc |
OLD | NEW |