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

Side by Side Diff: tests/RecordDrawTest.cpp

Issue 1432503003: Comments Style: s/skbug.com/bug.skia.org/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include Created 5 years, 1 month 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 | « tests/ReadPixelsTest.cpp ('k') | tests/SkResourceCacheTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Test.h" 8 #include "Test.h"
9 #include "RecordTestUtils.h" 9 #include "RecordTestUtils.h"
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 SkRecord rerecord; 190 SkRecord rerecord;
191 SkRecorder canvas(&rerecord, kWidth, kHeight); 191 SkRecorder canvas(&rerecord, kWidth, kHeight);
192 SkRecordPartialDraw(record, &canvas, nullptr, 0, 1, 2, SkMatrix::I()); // re play just drawRect of r2 192 SkRecordPartialDraw(record, &canvas, nullptr, 0, 1, 2, SkMatrix::I()); // re play just drawRect of r2
193 193
194 REPORTER_ASSERT(r, 1 == count_instances_of_type<SkRecords::DrawRect>(rerecor d)); 194 REPORTER_ASSERT(r, 1 == count_instances_of_type<SkRecords::DrawRect>(rerecor d));
195 int index = find_first_instances_of_type<SkRecords::DrawRect>(rerecord); 195 int index = find_first_instances_of_type<SkRecords::DrawRect>(rerecord);
196 const SkRecords::DrawRect* drawRect = assert_type<SkRecords::DrawRect>(r, re record, index); 196 const SkRecords::DrawRect* drawRect = assert_type<SkRecords::DrawRect>(r, re record, index);
197 REPORTER_ASSERT(r, drawRect->rect == r2); 197 REPORTER_ASSERT(r, drawRect->rect == r2);
198 } 198 }
199 199
200 // A regression test for crbug.com/415468 and skbug.com/2957. 200 // A regression test for crbug.com/415468 and https://bug.skia.org/2957 .
201 // 201 //
202 // This also now serves as a regression test for crbug.com/418417. We used to a djust the 202 // This also now serves as a regression test for crbug.com/418417. We used to a djust the
203 // bounds for the saveLayer, clip, and restore to be greater than the bounds of the picture. 203 // bounds for the saveLayer, clip, and restore to be greater than the bounds of the picture.
204 // (We were applying the saveLayer paint to the bounds after restore, which make s no sense.) 204 // (We were applying the saveLayer paint to the bounds after restore, which make s no sense.)
205 DEF_TEST(RecordDraw_SaveLayerAffectsClipBounds, r) { 205 DEF_TEST(RecordDraw_SaveLayerAffectsClipBounds, r) {
206 SkRecord record; 206 SkRecord record;
207 SkRecorder recorder(&record, 50, 50); 207 SkRecorder recorder(&record, 50, 50);
208 208
209 // We draw a rectangle with a long drop shadow. We used to not update the c lip 209 // We draw a rectangle with a long drop shadow. We used to not update the c lip
210 // bounds based on SaveLayer paints, so the drop shadow could be cut off. 210 // bounds based on SaveLayer paints, so the drop shadow could be cut off.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 { 297 {
298 SkRecord record; 298 SkRecord record;
299 SkRecorder recorder(&record, 10, 10); 299 SkRecorder recorder(&record, 10, 10);
300 recorder.drawImageRect(image, SkRect::MakeWH(10, 10), nullptr); 300 recorder.drawImageRect(image, SkRect::MakeWH(10, 10), nullptr);
301 SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, 0); 301 SkRecordDraw(record, &canvas, nullptr, nullptr, 0, nullptr, 0);
302 } 302 }
303 REPORTER_ASSERT(r, canvas.fDrawImageRectCalled); 303 REPORTER_ASSERT(r, canvas.fDrawImageRectCalled);
304 304
305 } 305 }
OLDNEW
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/SkResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698