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

Side by Side Diff: cc/playback/display_item_list_unittest.cc

Issue 2575583002: Remove ClipPathDisplayItem::clip_op_ (Closed)
Patch Set: rebase Created 4 years 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/playback/clip_path_display_item.cc ('k') | cc/proto/skia_conversions.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 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 settings.use_cached_picture = true; 193 settings.use_cached_picture = true;
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>(path, false);
204 path, SkClipOp::kIntersect, false);
205 204
206 // Build the second DrawingDisplayItem. 205 // Build the second DrawingDisplayItem.
207 AppendSecondSerializationTestPicture(list, layer_size); 206 AppendSecondSerializationTestPicture(list, layer_size);
208 207
209 // Build the EndClipPathDisplayItem. 208 // Build the EndClipPathDisplayItem.
210 list->CreateAndAppendPairedEndItem<EndClipPathDisplayItem>(); 209 list->CreateAndAppendPairedEndItem<EndClipPathDisplayItem>();
211 210
212 ValidateDisplayItemListSerialization(layer_size, list); 211 ValidateDisplayItemListSerialization(layer_size, list);
213 } 212 }
214 213
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 list->CreateAndAppendPairedEndItem<EndClipDisplayItem>(); 943 list->CreateAndAppendPairedEndItem<EndClipDisplayItem>();
945 944
946 EXPECT_EQ(4u, list->size()); 945 EXPECT_EQ(4u, list->size());
947 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(0)); 946 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(0));
948 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(1)); 947 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(1));
949 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(2)); 948 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(2));
950 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(3)); 949 EXPECT_RECT_EQ(filter_bounds, list->VisualRectForTesting(3));
951 } 950 }
952 951
953 } // namespace cc 952 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/clip_path_display_item.cc ('k') | cc/proto/skia_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698