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

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

Issue 2773103002: cc: Unify all sources of color space for YUVVideoDrawQuad (Closed)
Patch Set: Created 3 years, 9 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/gl_renderer_unittest.cc ('k') | cc/output/renderer_pixeltest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 gfx::Size resource_size_in_pixels = rect.size(); 351 gfx::Size resource_size_in_pixels = rect.size();
352 bool is_overlay_candidate = true; 352 bool is_overlay_candidate = true;
353 ResourceId resource_id = CreateResource( 353 ResourceId resource_id = CreateResource(
354 resource_provider, resource_size_in_pixels, is_overlay_candidate); 354 resource_provider, resource_size_in_pixels, is_overlay_candidate);
355 355
356 YUVVideoDrawQuad* overlay_quad = 356 YUVVideoDrawQuad* overlay_quad =
357 render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); 357 render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>();
358 overlay_quad->SetNew(shared_quad_state, rect, rect, rect, tex_coord_rect, 358 overlay_quad->SetNew(shared_quad_state, rect, rect, rect, tex_coord_rect,
359 tex_coord_rect, resource_size_in_pixels, 359 tex_coord_rect, resource_size_in_pixels,
360 resource_size_in_pixels, resource_id, resource_id, 360 resource_size_in_pixels, resource_id, resource_id,
361 resource_id, resource_id, YUVVideoDrawQuad::REC_601, 361 resource_id, resource_id, 0, 1.0, 8);
362 gfx::ColorSpace(), 0, 1.0, 8);
363 362
364 return overlay_quad; 363 return overlay_quad;
365 } 364 }
366 365
367 void CreateOpaqueQuadAt(ResourceProvider* resource_provider, 366 void CreateOpaqueQuadAt(ResourceProvider* resource_provider,
368 const SharedQuadState* shared_quad_state, 367 const SharedQuadState* shared_quad_state,
369 RenderPass* render_pass, 368 RenderPass* render_pass,
370 const gfx::Rect& rect) { 369 const gfx::Rect& rect) {
371 SolidColorDrawQuad* color_quad = 370 SolidColorDrawQuad* color_quad =
372 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); 371 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2518 kOverlayRect, render_pass_id_, 2, gfx::RectF(), gfx::Size(), 2517 kOverlayRect, render_pass_id_, 2, gfx::RectF(), gfx::Size(),
2519 gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF()); 2518 gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF());
2520 } 2519 }
2521 2520
2522 ProcessForOverlays(); 2521 ProcessForOverlays();
2523 EXPECT_EQ(0U, ca_layer_list_.size()); 2522 EXPECT_EQ(0U, ca_layer_list_.size());
2524 } 2523 }
2525 2524
2526 } // namespace 2525 } // namespace
2527 } // namespace cc 2526 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698