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

Side by Side Diff: tests/AAClipTest.cpp

Issue 1539553002: Add default ctor to SkMask (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add warning for ignored return values Created 5 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 | « src/effects/SkBlurMaskFilter.cpp ('k') | tests/BlurTest.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 2011 Google Inc. 2 * Copyright 2011 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 "SkAAClip.h" 8 #include "SkAAClip.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkMask.h" 10 #include "SkMask.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 REPORTER_ASSERT(reporter, !clip0.getBounds().isEmpty()); 221 REPORTER_ASSERT(reporter, !clip0.getBounds().isEmpty());
222 REPORTER_ASSERT(reporter, clip0 != clip1); 222 REPORTER_ASSERT(reporter, clip0 != clip1);
223 REPORTER_ASSERT(reporter, clip0.getBounds() == r); 223 REPORTER_ASSERT(reporter, clip0.getBounds() == r);
224 224
225 clip0.setEmpty(); 225 clip0.setEmpty();
226 REPORTER_ASSERT(reporter, clip0.isEmpty()); 226 REPORTER_ASSERT(reporter, clip0.isEmpty());
227 REPORTER_ASSERT(reporter, clip0.getBounds().isEmpty()); 227 REPORTER_ASSERT(reporter, clip0.getBounds().isEmpty());
228 REPORTER_ASSERT(reporter, clip1 == clip0); 228 REPORTER_ASSERT(reporter, clip1 == clip0);
229 229
230 SkMask mask; 230 SkMask mask;
231 mask.fImage = nullptr;
232 clip0.copyToMask(&mask); 231 clip0.copyToMask(&mask);
233 REPORTER_ASSERT(reporter, nullptr == mask.fImage); 232 REPORTER_ASSERT(reporter, nullptr == mask.fImage);
234 REPORTER_ASSERT(reporter, mask.fBounds.isEmpty()); 233 REPORTER_ASSERT(reporter, mask.fBounds.isEmpty());
235 } 234 }
236 235
237 static void rand_irect(SkIRect* r, int N, SkRandom& rand) { 236 static void rand_irect(SkIRect* r, int N, SkRandom& rand) {
238 r->setXYWH(0, 0, rand.nextU() % N, rand.nextU() % N); 237 r->setXYWH(0, 0, rand.nextU() % N, rand.nextU() % N);
239 int dx = rand.nextU() % (2*N); 238 int dx = rand.nextU() % (2*N);
240 int dy = rand.nextU() % (2*N); 239 int dy = rand.nextU() % (2*N);
241 // use int dx,dy to make the subtract be signed 240 // use int dx,dy to make the subtract be signed
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 test_empty(reporter); 438 test_empty(reporter);
440 test_path_bounds(reporter); 439 test_path_bounds(reporter);
441 test_irect(reporter); 440 test_irect(reporter);
442 test_rgn(reporter); 441 test_rgn(reporter);
443 test_path_with_hole(reporter); 442 test_path_with_hole(reporter);
444 test_regressions(); 443 test_regressions();
445 test_nearly_integral(reporter); 444 test_nearly_integral(reporter);
446 test_really_a_rect(reporter); 445 test_really_a_rect(reporter);
447 test_crbug_422693(reporter); 446 test_crbug_422693(reporter);
448 } 447 }
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | tests/BlurTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698