OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <string.h> | 6 #include <string.h> |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 for (size_t i = 0; i < a->filters.size(); ++i) { | 131 for (size_t i = 0; i < a->filters.size(); ++i) { |
132 if (a->filters.at(i).type() != cc::FilterOperation::REFERENCE) { | 132 if (a->filters.at(i).type() != cc::FilterOperation::REFERENCE) { |
133 EXPECT_EQ(a->filters.at(i), b->filters.at(i)); | 133 EXPECT_EQ(a->filters.at(i), b->filters.at(i)); |
134 } else { | 134 } else { |
135 EXPECT_EQ(b->filters.at(i).type(), cc::FilterOperation::REFERENCE); | 135 EXPECT_EQ(b->filters.at(i).type(), cc::FilterOperation::REFERENCE); |
136 EXPECT_EQ(a->filters.at(i).image_filter()->countInputs(), | 136 EXPECT_EQ(a->filters.at(i).image_filter()->countInputs(), |
137 b->filters.at(i).image_filter()->countInputs()); | 137 b->filters.at(i).image_filter()->countInputs()); |
138 } | 138 } |
139 } | 139 } |
140 EXPECT_EQ(a->filters_scale, b->filters_scale); | 140 EXPECT_EQ(a->filters_scale, b->filters_scale); |
| 141 EXPECT_EQ(a->filters_origin, b->filters_origin); |
141 EXPECT_EQ(a->background_filters, b->background_filters); | 142 EXPECT_EQ(a->background_filters, b->background_filters); |
142 } | 143 } |
143 | 144 |
144 void Compare(const SolidColorDrawQuad* a, const SolidColorDrawQuad* b) { | 145 void Compare(const SolidColorDrawQuad* a, const SolidColorDrawQuad* b) { |
145 EXPECT_EQ(a->color, b->color); | 146 EXPECT_EQ(a->color, b->color); |
146 EXPECT_EQ(a->force_anti_aliasing_off, b->force_anti_aliasing_off); | 147 EXPECT_EQ(a->force_anti_aliasing_off, b->force_anti_aliasing_off); |
147 } | 148 } |
148 | 149 |
149 void Compare(const StreamVideoDrawQuad* a, const StreamVideoDrawQuad* b) { | 150 void Compare(const StreamVideoDrawQuad* a, const StreamVideoDrawQuad* b) { |
150 EXPECT_EQ(a->resource_id(), b->resource_id()); | 151 EXPECT_EQ(a->resource_id(), b->resource_id()); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 SharedQuadState* shared_state2_cmp = | 320 SharedQuadState* shared_state2_cmp = |
320 pass_cmp->CreateAndAppendSharedQuadState(); | 321 pass_cmp->CreateAndAppendSharedQuadState(); |
321 *shared_state2_cmp = *shared_state2_in; | 322 *shared_state2_cmp = *shared_state2_in; |
322 | 323 |
323 RenderPassDrawQuad* renderpass_in = | 324 RenderPassDrawQuad* renderpass_in = |
324 pass_in->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 325 pass_in->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
325 renderpass_in->SetAll( | 326 renderpass_in->SetAll( |
326 shared_state2_in, arbitrary_rect1, arbitrary_rect2_inside_rect1, | 327 shared_state2_in, arbitrary_rect1, arbitrary_rect2_inside_rect1, |
327 arbitrary_rect1_inside_rect1, arbitrary_bool1, child_id, | 328 arbitrary_rect1_inside_rect1, arbitrary_bool1, child_id, |
328 arbitrary_resourceid2, arbitrary_vector2df1, arbitrary_size1, | 329 arbitrary_resourceid2, arbitrary_vector2df1, arbitrary_size1, |
329 arbitrary_filters1, arbitrary_vector2df2, arbitrary_filters2); | 330 arbitrary_filters1, arbitrary_vector2df2, arbitrary_pointf2, |
| 331 arbitrary_filters2); |
330 pass_cmp->CopyFromAndAppendRenderPassDrawQuad( | 332 pass_cmp->CopyFromAndAppendRenderPassDrawQuad( |
331 renderpass_in, renderpass_in->shared_quad_state, | 333 renderpass_in, renderpass_in->shared_quad_state, |
332 renderpass_in->render_pass_id); | 334 renderpass_in->render_pass_id); |
333 | 335 |
334 SharedQuadState* shared_state3_in = pass_in->CreateAndAppendSharedQuadState(); | 336 SharedQuadState* shared_state3_in = pass_in->CreateAndAppendSharedQuadState(); |
335 shared_state3_in->SetAll(arbitrary_matrix1, arbitrary_size3, arbitrary_rect3, | 337 shared_state3_in->SetAll(arbitrary_matrix1, arbitrary_size3, arbitrary_rect3, |
336 arbitrary_rect1, arbitrary_bool1, arbitrary_float3, | 338 arbitrary_rect1, arbitrary_bool1, arbitrary_float3, |
337 arbitrary_blend_mode3, arbitrary_context_id3); | 339 arbitrary_blend_mode3, arbitrary_context_id3); |
338 SharedQuadState* shared_state3_cmp = | 340 SharedQuadState* shared_state3_cmp = |
339 pass_cmp->CreateAndAppendSharedQuadState(); | 341 pass_cmp->CreateAndAppendSharedQuadState(); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 EXPECT_TRUE( | 605 EXPECT_TRUE( |
604 IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out)); | 606 IPC::ParamTraits<DelegatedFrameData>::Read(&msg, &iter, &frame_out)); |
605 | 607 |
606 ASSERT_EQ(2u, frame_out.resource_list.size()); | 608 ASSERT_EQ(2u, frame_out.resource_list.size()); |
607 Compare(arbitrary_resource1, frame_out.resource_list[0]); | 609 Compare(arbitrary_resource1, frame_out.resource_list[0]); |
608 Compare(arbitrary_resource2, frame_out.resource_list[1]); | 610 Compare(arbitrary_resource2, frame_out.resource_list[1]); |
609 } | 611 } |
610 | 612 |
611 } // namespace | 613 } // namespace |
612 } // namespace content | 614 } // namespace content |
OLD | NEW |