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

Side by Side Diff: cc/quads/draw_quad_unittest.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/quads/draw_polygon.cc ('k') | cc/quads/yuv_video_draw_quad.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/quads/draw_quad.h" 5 #include "cc/quads/draw_quad.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 TEST(DrawQuadTest, CopyYUVVideoDrawQuad) { 637 TEST(DrawQuadTest, CopyYUVVideoDrawQuad) {
638 gfx::Rect opaque_rect(33, 47, 10, 12); 638 gfx::Rect opaque_rect(33, 47, 10, 12);
639 gfx::Rect visible_rect(40, 50, 30, 20); 639 gfx::Rect visible_rect(40, 50, 30, 20);
640 gfx::RectF tex_coord_rect(0.0f, 0.0f, 0.75f, 0.5f); 640 gfx::RectF tex_coord_rect(0.0f, 0.0f, 0.75f, 0.5f);
641 gfx::Size tex_size(32, 68); 641 gfx::Size tex_size(32, 68);
642 ResourceProvider::ResourceId y_plane_resource_id = 45; 642 ResourceProvider::ResourceId y_plane_resource_id = 45;
643 ResourceProvider::ResourceId u_plane_resource_id = 532; 643 ResourceProvider::ResourceId u_plane_resource_id = 532;
644 ResourceProvider::ResourceId v_plane_resource_id = 4; 644 ResourceProvider::ResourceId v_plane_resource_id = 4;
645 ResourceProvider::ResourceId a_plane_resource_id = 63; 645 ResourceProvider::ResourceId a_plane_resource_id = 63;
646 YUVVideoDrawQuad::ColorSpace color_space = YUVVideoDrawQuad::JPEG; 646 YUVVideoDrawQuad::ColorSpace color_space = YUVVideoDrawQuad::REC_601_JPEG;
647 CREATE_SHARED_STATE(); 647 CREATE_SHARED_STATE();
648 648
649 CREATE_QUAD_9_NEW(YUVVideoDrawQuad, opaque_rect, visible_rect, tex_coord_rect, 649 CREATE_QUAD_9_NEW(YUVVideoDrawQuad, opaque_rect, visible_rect, tex_coord_rect,
650 tex_size, y_plane_resource_id, u_plane_resource_id, 650 tex_size, y_plane_resource_id, u_plane_resource_id,
651 v_plane_resource_id, a_plane_resource_id, color_space); 651 v_plane_resource_id, a_plane_resource_id, color_space);
652 EXPECT_EQ(DrawQuad::YUV_VIDEO_CONTENT, copy_quad->material); 652 EXPECT_EQ(DrawQuad::YUV_VIDEO_CONTENT, copy_quad->material);
653 EXPECT_EQ(opaque_rect, copy_quad->opaque_rect); 653 EXPECT_EQ(opaque_rect, copy_quad->opaque_rect);
654 EXPECT_EQ(visible_rect, copy_quad->visible_rect); 654 EXPECT_EQ(visible_rect, copy_quad->visible_rect);
655 EXPECT_EQ(tex_coord_rect, copy_quad->tex_coord_rect); 655 EXPECT_EQ(tex_coord_rect, copy_quad->tex_coord_rect);
656 EXPECT_EQ(tex_size, copy_quad->tex_size); 656 EXPECT_EQ(tex_size, copy_quad->tex_size);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 892
893 TEST_F(DrawQuadIteratorTest, YUVVideoDrawQuad) { 893 TEST_F(DrawQuadIteratorTest, YUVVideoDrawQuad) {
894 gfx::Rect opaque_rect(33, 47, 10, 12); 894 gfx::Rect opaque_rect(33, 47, 10, 12);
895 gfx::Rect visible_rect(40, 50, 30, 20); 895 gfx::Rect visible_rect(40, 50, 30, 20);
896 gfx::RectF tex_coord_rect(0.0f, 0.0f, 0.75f, 0.5f); 896 gfx::RectF tex_coord_rect(0.0f, 0.0f, 0.75f, 0.5f);
897 gfx::Size tex_size(32, 68); 897 gfx::Size tex_size(32, 68);
898 ResourceProvider::ResourceId y_plane_resource_id = 45; 898 ResourceProvider::ResourceId y_plane_resource_id = 45;
899 ResourceProvider::ResourceId u_plane_resource_id = 532; 899 ResourceProvider::ResourceId u_plane_resource_id = 532;
900 ResourceProvider::ResourceId v_plane_resource_id = 4; 900 ResourceProvider::ResourceId v_plane_resource_id = 4;
901 ResourceProvider::ResourceId a_plane_resource_id = 63; 901 ResourceProvider::ResourceId a_plane_resource_id = 63;
902 YUVVideoDrawQuad::ColorSpace color_space = YUVVideoDrawQuad::JPEG; 902 YUVVideoDrawQuad::ColorSpace color_space = YUVVideoDrawQuad::REC_601_JPEG;
903 903
904 CREATE_SHARED_STATE(); 904 CREATE_SHARED_STATE();
905 CREATE_QUAD_9_NEW(YUVVideoDrawQuad, opaque_rect, visible_rect, tex_coord_rect, 905 CREATE_QUAD_9_NEW(YUVVideoDrawQuad, opaque_rect, visible_rect, tex_coord_rect,
906 tex_size, y_plane_resource_id, u_plane_resource_id, 906 tex_size, y_plane_resource_id, u_plane_resource_id,
907 v_plane_resource_id, a_plane_resource_id, color_space); 907 v_plane_resource_id, a_plane_resource_id, color_space);
908 EXPECT_EQ(DrawQuad::YUV_VIDEO_CONTENT, copy_quad->material); 908 EXPECT_EQ(DrawQuad::YUV_VIDEO_CONTENT, copy_quad->material);
909 EXPECT_EQ(y_plane_resource_id, quad_new->y_plane_resource_id); 909 EXPECT_EQ(y_plane_resource_id, quad_new->y_plane_resource_id);
910 EXPECT_EQ(u_plane_resource_id, quad_new->u_plane_resource_id); 910 EXPECT_EQ(u_plane_resource_id, quad_new->u_plane_resource_id);
911 EXPECT_EQ(v_plane_resource_id, quad_new->v_plane_resource_id); 911 EXPECT_EQ(v_plane_resource_id, quad_new->v_plane_resource_id);
912 EXPECT_EQ(a_plane_resource_id, quad_new->a_plane_resource_id); 912 EXPECT_EQ(a_plane_resource_id, quad_new->a_plane_resource_id);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 LOG(ERROR) << "YUVVideoDrawQuad " << sizeof(YUVVideoDrawQuad); 1025 LOG(ERROR) << "YUVVideoDrawQuad " << sizeof(YUVVideoDrawQuad);
1026 break; 1026 break;
1027 case DrawQuad::INVALID: 1027 case DrawQuad::INVALID:
1028 break; 1028 break;
1029 } 1029 }
1030 } 1030 }
1031 } 1031 }
1032 1032
1033 } // namespace 1033 } // namespace
1034 } // namespace cc 1034 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/draw_polygon.cc ('k') | cc/quads/yuv_video_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698