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

Side by Side Diff: tests/DrawPathTest.cpp

Issue 2355483002: abstract name of clipping ops, to transtion to a more restricted set (Closed)
Patch Set: no need for ifdef for globals Created 4 years, 2 months 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/ClipStackTest.cpp ('k') | tests/GrShapeTest.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 2012 Google Inc. 2 * Copyright 2012 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDashPathEffect.h" 10 #include "SkDashPathEffect.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 static void test_crbug_472147_actual(skiatest::Reporter* reporter) { 332 static void test_crbug_472147_actual(skiatest::Reporter* reporter) {
333 auto surface(SkSurface::MakeRasterN32Premul(1000, 1000)); 333 auto surface(SkSurface::MakeRasterN32Premul(1000, 1000));
334 SkCanvas* canvas = surface->getCanvas(); 334 SkCanvas* canvas = surface->getCanvas();
335 SkPaint p; 335 SkPaint p;
336 SkRect r = SkRect::MakeLTRB(-246.0f, 33.0f, 848.0f, 33554464.0f); 336 SkRect r = SkRect::MakeLTRB(-246.0f, 33.0f, 848.0f, 33554464.0f);
337 SkVector radii[4] = { 337 SkVector radii[4] = {
338 { 13.0f, 8.0f }, { 170.0f, 2.0 }, { 256.0f, 33554430.0f }, { 120.0f, 5.0 f } 338 { 13.0f, 8.0f }, { 170.0f, 2.0 }, { 256.0f, 33554430.0f }, { 120.0f, 5.0 f }
339 }; 339 };
340 SkRRect rr; 340 SkRRect rr;
341 rr.setRectRadii(r, radii); 341 rr.setRectRadii(r, radii);
342 canvas->clipRRect(rr, SkRegion::kIntersect_Op, false); 342 canvas->clipRRect(rr);
343 343
344 SkRect r2 = SkRect::MakeLTRB(0, 33, 1102, 33554464); 344 SkRect r2 = SkRect::MakeLTRB(0, 33, 1102, 33554464);
345 canvas->drawRect(r2, p); 345 canvas->drawRect(r2, p);
346 } 346 }
347 347
348 DEF_TEST(DrawPath, reporter) { 348 DEF_TEST(DrawPath, reporter) {
349 test_giantaa(); 349 test_giantaa();
350 test_bug533(); 350 test_bug533();
351 test_bigcubic(); 351 test_bigcubic();
352 test_crbug_124652(); 352 test_crbug_124652();
353 test_crbug_140642(); 353 test_crbug_140642();
354 test_crbug_140803(); 354 test_crbug_140803();
355 test_inversepathwithclip(); 355 test_inversepathwithclip();
356 // why? 356 // why?
357 if (false) test_crbug131181(); 357 if (false) test_crbug131181();
358 test_infinite_dash(reporter); 358 test_infinite_dash(reporter);
359 test_crbug_165432(reporter); 359 test_crbug_165432(reporter);
360 test_crbug_472147_simple(reporter); 360 test_crbug_472147_simple(reporter);
361 test_crbug_472147_actual(reporter); 361 test_crbug_472147_actual(reporter);
362 test_big_aa_rect(reporter); 362 test_big_aa_rect(reporter);
363 test_halfway(); 363 test_halfway();
364 } 364 }
OLDNEW
« no previous file with comments | « tests/ClipStackTest.cpp ('k') | tests/GrShapeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698