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

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

Issue 2632533003: Use skia for transform ... but it didnt work (Closed)
Patch Set: Created 3 years, 11 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/output/color_lut_cache.cc ('k') | media/base/media_switches.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 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 ((1 << quad->bits_per_channel) - 1); 2289 ((1 << quad->bits_per_channel) - 1);
2290 2290
2291 for (int i = 0; i < 9; ++i) 2291 for (int i = 0; i < 9; ++i)
2292 yuv_to_rgb_multiplied[i] = yuv_to_rgb[i] * quad->resource_multiplier; 2292 yuv_to_rgb_multiplied[i] = yuv_to_rgb[i] * quad->resource_multiplier;
2293 2293
2294 for (int i = 0; i < 3; ++i) { 2294 for (int i = 0; i < 3; ++i) {
2295 yuv_adjust_with_offset[i] = 2295 yuv_adjust_with_offset[i] =
2296 yuv_adjust[i] * adjustment_multiplier / quad->resource_multiplier - 2296 yuv_adjust[i] * adjustment_multiplier / quad->resource_multiplier -
2297 quad->resource_offset; 2297 quad->resource_offset;
2298 } 2298 }
2299 printf("%f %f %f\n", adjustment_multiplier, quad->resource_multiplier, quad->r esource_offset);
2299 2300
2300 if (lut_texture_location != -1) { 2301 if (lut_texture_location != -1) {
2301 unsigned int lut_texture = color_lut_cache_.GetLUT( 2302 unsigned int lut_texture = color_lut_cache_.GetLUT(
2302 quad->video_color_space, frame->device_color_space, 17); 2303 quad->video_color_space, frame->device_color_space, 17);
2303 gl_->ActiveTexture(GL_TEXTURE5); 2304 gl_->ActiveTexture(GL_TEXTURE5);
2304 gl_->BindTexture(GL_TEXTURE_2D, lut_texture); 2305 gl_->BindTexture(GL_TEXTURE_2D, lut_texture);
2305 gl_->Uniform1i(lut_texture_location, 5); 2306 gl_->Uniform1i(lut_texture_location, 5);
2306 gl_->ActiveTexture(GL_TEXTURE0); 2307 gl_->ActiveTexture(GL_TEXTURE0);
2308 printf("Using LUT\n");
2307 } 2309 }
2308 2310
2311 printf("Adj %f %f %f\n",
2312 yuv_adjust_with_offset[0],
2313 yuv_adjust_with_offset[1],
2314 yuv_adjust_with_offset[2]);
2315
2309 if (resource_multiplier_location != -1) { 2316 if (resource_multiplier_location != -1) {
2310 gl_->Uniform1f(resource_multiplier_location, quad->resource_multiplier); 2317 gl_->Uniform1f(resource_multiplier_location, quad->resource_multiplier);
2311 } 2318 }
2312 2319
2313 if (resource_offset_location != -1) { 2320 if (resource_offset_location != -1) {
2314 gl_->Uniform1f(resource_offset_location, quad->resource_offset); 2321 gl_->Uniform1f(resource_offset_location, quad->resource_offset);
2315 } 2322 }
2316 2323
2317 // The transform and vertex data are used to figure out the extents that the 2324 // The transform and vertex data are used to figure out the extents that the
2318 // un-antialiased quad should have and which vertex this is and the float 2325 // un-antialiased quad should have and which vertex this is and the float
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
3469 // The alpha has already been applied when copying the RPDQ to an IOSurface. 3476 // The alpha has already been applied when copying the RPDQ to an IOSurface.
3470 GLfloat alpha = 1; 3477 GLfloat alpha = 1;
3471 gl_->ScheduleCALayerSharedStateCHROMIUM(alpha, is_clipped, clip_rect, 3478 gl_->ScheduleCALayerSharedStateCHROMIUM(alpha, is_clipped, clip_rect,
3472 sorting_context_id, gl_transform); 3479 sorting_context_id, gl_transform);
3473 gl_->ScheduleCALayerCHROMIUM( 3480 gl_->ScheduleCALayerCHROMIUM(
3474 texture_id, contents_rect, ca_layer_overlay->background_color, 3481 texture_id, contents_rect, ca_layer_overlay->background_color,
3475 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); 3482 ca_layer_overlay->edge_aa_mask, bounds_rect, filter);
3476 } 3483 }
3477 3484
3478 } // namespace cc 3485 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/color_lut_cache.cc ('k') | media/base/media_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698