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

Side by Side Diff: cc/test/render_pass_test_common.cc

Issue 92703003: Support videos with JPEG color range in GPU YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yuv_v2
Patch Set: Add missing 'f' to float literal to make VS happy Created 6 years, 7 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/test/data/dark_grey.png ('k') | content/common/cc_messages.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/test/render_pass_test_common.h" 5 #include "cc/test/render_pass_test_common.h"
6 6
7 #include "cc/quads/checkerboard_draw_quad.h" 7 #include "cc/quads/checkerboard_draw_quad.h"
8 #include "cc/quads/debug_border_draw_quad.h" 8 #include "cc/quads/debug_border_draw_quad.h"
9 #include "cc/quads/io_surface_draw_quad.h" 9 #include "cc/quads/io_surface_draw_quad.h"
10 #include "cc/quads/render_pass_draw_quad.h" 10 #include "cc/quads/render_pass_draw_quad.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 ResourceProvider::ResourceId plane_resources[4]; 218 ResourceProvider::ResourceId plane_resources[4];
219 for (int i = 0; i < 4; ++i) { 219 for (int i = 0; i < 4; ++i) {
220 plane_resources[i] = 220 plane_resources[i] =
221 resource_provider->CreateResource( 221 resource_provider->CreateResource(
222 gfx::Size(20, 12), 222 gfx::Size(20, 12),
223 GL_CLAMP_TO_EDGE, 223 GL_CLAMP_TO_EDGE,
224 ResourceProvider::TextureUsageAny, 224 ResourceProvider::TextureUsageAny,
225 resource_provider->best_texture_format()); 225 resource_provider->best_texture_format());
226 resource_provider->AllocateForTesting(plane_resources[i]); 226 resource_provider->AllocateForTesting(plane_resources[i]);
227 } 227 }
228 YUVVideoDrawQuad::ColorSpace color_space = YUVVideoDrawQuad::REC_601;
228 scoped_ptr<YUVVideoDrawQuad> yuv_quad = YUVVideoDrawQuad::Create(); 229 scoped_ptr<YUVVideoDrawQuad> yuv_quad = YUVVideoDrawQuad::Create();
229 yuv_quad->SetNew(shared_state2.get(), 230 yuv_quad->SetNew(shared_state2.get(),
230 rect, 231 rect,
231 opaque_rect, 232 opaque_rect,
232 visible_rect, 233 visible_rect,
233 gfx::RectF(0, 0, 100, 100), 234 gfx::RectF(0, 0, 100, 100),
234 plane_resources[0], 235 plane_resources[0],
235 plane_resources[1], 236 plane_resources[1],
236 plane_resources[2], 237 plane_resources[2],
237 plane_resources[3]); 238 plane_resources[3],
239 color_space);
238 AppendQuad(yuv_quad.PassAs<DrawQuad>()); 240 AppendQuad(yuv_quad.PassAs<DrawQuad>());
239 241
240 AppendSharedQuadState(shared_state.Pass()); 242 AppendSharedQuadState(shared_state.Pass());
241 AppendSharedQuadState(transformed_state.Pass()); 243 AppendSharedQuadState(transformed_state.Pass());
242 AppendSharedQuadState(shared_state2.Pass()); 244 AppendSharedQuadState(shared_state2.Pass());
243 } 245 }
244 246
245 } // namespace cc 247 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/data/dark_grey.png ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698