OLD | NEW |
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 "cc/playback/display_item_list.h" | 5 #include "cc/playback/display_item_list.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 scoped_refptr<DisplayItemList> list = DisplayItemList::Create(settings); | 194 scoped_refptr<DisplayItemList> list = DisplayItemList::Create(settings); |
195 list->SetRetainVisualRectsForTesting(true); | 195 list->SetRetainVisualRectsForTesting(true); |
196 | 196 |
197 // Build the DrawingDisplayItem. | 197 // Build the DrawingDisplayItem. |
198 AppendFirstSerializationTestPicture(list, layer_size); | 198 AppendFirstSerializationTestPicture(list, layer_size); |
199 | 199 |
200 // Build the ClipPathDisplayItem. | 200 // Build the ClipPathDisplayItem. |
201 SkPath path; | 201 SkPath path; |
202 path.addCircle(5.f, 5.f, 2.f, SkPath::Direction::kCW_Direction); | 202 path.addCircle(5.f, 5.f, 2.f, SkPath::Direction::kCW_Direction); |
203 list->CreateAndAppendPairedBeginItem<ClipPathDisplayItem>( | 203 list->CreateAndAppendPairedBeginItem<ClipPathDisplayItem>( |
204 path, SkClipOp::kReplace, false); | 204 path, SkClipOp::kIntersect, false); |
205 | 205 |
206 // Build the second DrawingDisplayItem. | 206 // Build the second DrawingDisplayItem. |
207 AppendSecondSerializationTestPicture(list, layer_size); | 207 AppendSecondSerializationTestPicture(list, layer_size); |
208 | 208 |
209 // Build the EndClipPathDisplayItem. | 209 // Build the EndClipPathDisplayItem. |
210 list->CreateAndAppendPairedEndItem<EndClipPathDisplayItem>(); | 210 list->CreateAndAppendPairedEndItem<EndClipPathDisplayItem>(); |
211 | 211 |
212 ValidateDisplayItemListSerialization(layer_size, list); | 212 ValidateDisplayItemListSerialization(layer_size, list); |
213 } | 213 } |
214 | 214 |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 list->CreateAndAppendPairedEndItem<EndClipDisplayItem>(); | 944 list->CreateAndAppendPairedEndItem<EndClipDisplayItem>(); |
945 | 945 |
946 EXPECT_EQ(4u, list->size()); | 946 EXPECT_EQ(4u, list->size()); |
947 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(0)); | 947 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(0)); |
948 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(1)); | 948 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(1)); |
949 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(2)); | 949 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(2)); |
950 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(3)); | 950 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(3)); |
951 } | 951 } |
952 | 952 |
953 } // namespace cc | 953 } // namespace cc |
OLD | NEW |