OLD | NEW |
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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 EXPECT_EQ(DrawQuad::YUV_VIDEO_CONTENT, copy_quad->material); | 851 EXPECT_EQ(DrawQuad::YUV_VIDEO_CONTENT, copy_quad->material); |
852 EXPECT_EQ(y_plane_resource_id, quad_new->y_plane_resource_id); | 852 EXPECT_EQ(y_plane_resource_id, quad_new->y_plane_resource_id); |
853 EXPECT_EQ(u_plane_resource_id, quad_new->u_plane_resource_id); | 853 EXPECT_EQ(u_plane_resource_id, quad_new->u_plane_resource_id); |
854 EXPECT_EQ(v_plane_resource_id, quad_new->v_plane_resource_id); | 854 EXPECT_EQ(v_plane_resource_id, quad_new->v_plane_resource_id); |
855 EXPECT_EQ(3, IterateAndCount(quad_new.get())); | 855 EXPECT_EQ(3, IterateAndCount(quad_new.get())); |
856 EXPECT_EQ(y_plane_resource_id + 1, quad_new->y_plane_resource_id); | 856 EXPECT_EQ(y_plane_resource_id + 1, quad_new->y_plane_resource_id); |
857 EXPECT_EQ(u_plane_resource_id + 1, quad_new->u_plane_resource_id); | 857 EXPECT_EQ(u_plane_resource_id + 1, quad_new->u_plane_resource_id); |
858 EXPECT_EQ(v_plane_resource_id + 1, quad_new->v_plane_resource_id); | 858 EXPECT_EQ(v_plane_resource_id + 1, quad_new->v_plane_resource_id); |
859 } | 859 } |
860 | 860 |
861 TEST_F(DrawQuadIteratorTest, PictureDrawQuad) { | 861 // Disabled until picture draw quad is supported for ubercomp: crbug.com/231715 |
| 862 TEST_F(DrawQuadIteratorTest, DISABLED_PictureDrawQuad) { |
862 gfx::Rect opaque_rect(33, 44, 22, 33); | 863 gfx::Rect opaque_rect(33, 44, 22, 33); |
863 gfx::RectF tex_coord_rect(31.f, 12.f, 54.f, 20.f); | 864 gfx::RectF tex_coord_rect(31.f, 12.f, 54.f, 20.f); |
864 gfx::Size texture_size(85, 32); | 865 gfx::Size texture_size(85, 32); |
865 bool swizzle_contents = true; | 866 bool swizzle_contents = true; |
866 gfx::Rect content_rect(30, 40, 20, 30); | 867 gfx::Rect content_rect(30, 40, 20, 30); |
867 float contents_scale = 3.141592f; | 868 float contents_scale = 3.141592f; |
868 scoped_refptr<PicturePileImpl> picture_pile = PicturePileImpl::Create(false); | 869 scoped_refptr<PicturePileImpl> picture_pile = PicturePileImpl::Create(false); |
869 | 870 |
870 CREATE_SHARED_STATE(); | 871 CREATE_SHARED_STATE(); |
871 CREATE_QUAD_7_NEW(PictureDrawQuad, | 872 CREATE_QUAD_7_NEW(PictureDrawQuad, |
872 opaque_rect, | 873 opaque_rect, |
873 tex_coord_rect, | 874 tex_coord_rect, |
874 texture_size, | 875 texture_size, |
875 swizzle_contents, | 876 swizzle_contents, |
876 content_rect, | 877 content_rect, |
877 contents_scale, | 878 contents_scale, |
878 picture_pile); | 879 picture_pile); |
879 EXPECT_EQ(0, IterateAndCount(quad_new.get())); | 880 EXPECT_EQ(0, IterateAndCount(quad_new.get())); |
880 } | 881 } |
881 | 882 |
882 } // namespace | 883 } // namespace |
883 } // namespace cc | 884 } // namespace cc |
OLD | NEW |