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

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

Issue 2572833002: stop using exotic clipops (Closed)
Patch Set: cleaner SkUserConfig.h edit 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/output/software_renderer.cc ('k') | cc/proto/skia_conversions.cc » ('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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « cc/output/software_renderer.cc ('k') | cc/proto/skia_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698