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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 mask_resource_id, | 763 mask_resource_id, |
764 contents_changed_since_last_frame, | 764 contents_changed_since_last_frame, |
765 mask_u_v_rect, | 765 mask_u_v_rect, |
766 filters, | 766 filters, |
767 filter, | 767 filter, |
768 background_filters, | 768 background_filters, |
769 copied_render_pass_id); | 769 copied_render_pass_id); |
770 EXPECT_EQ(mask_resource_id, quad_new->mask_resource_id); | 770 EXPECT_EQ(mask_resource_id, quad_new->mask_resource_id); |
771 EXPECT_EQ(1, IterateAndCount(quad_new.get())); | 771 EXPECT_EQ(1, IterateAndCount(quad_new.get())); |
772 EXPECT_EQ(mask_resource_id + 1, quad_new->mask_resource_id); | 772 EXPECT_EQ(mask_resource_id + 1, quad_new->mask_resource_id); |
| 773 quad_new->mask_resource_id = 0; |
| 774 EXPECT_EQ(0, IterateAndCount(quad_new.get())); |
| 775 EXPECT_EQ(0u, quad_new->mask_resource_id); |
773 } | 776 } |
774 | 777 |
775 TEST_F(DrawQuadIteratorTest, SolidColorDrawQuad) { | 778 TEST_F(DrawQuadIteratorTest, SolidColorDrawQuad) { |
776 SkColor color = 0x49494949; | 779 SkColor color = 0x49494949; |
777 | 780 |
778 CREATE_SHARED_STATE(); | 781 CREATE_SHARED_STATE(); |
779 CREATE_QUAD_1_NEW(SolidColorDrawQuad, color); | 782 CREATE_QUAD_1_NEW(SolidColorDrawQuad, color); |
780 EXPECT_EQ(0, IterateAndCount(quad_new.get())); | 783 EXPECT_EQ(0, IterateAndCount(quad_new.get())); |
781 } | 784 } |
782 | 785 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 texture_size, | 878 texture_size, |
876 swizzle_contents, | 879 swizzle_contents, |
877 content_rect, | 880 content_rect, |
878 contents_scale, | 881 contents_scale, |
879 picture_pile); | 882 picture_pile); |
880 EXPECT_EQ(0, IterateAndCount(quad_new.get())); | 883 EXPECT_EQ(0, IterateAndCount(quad_new.get())); |
881 } | 884 } |
882 | 885 |
883 } // namespace | 886 } // namespace |
884 } // namespace cc | 887 } // namespace cc |
OLD | NEW |