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/CanvasTest.cpp

Issue 1008883002: Handle paths that do not report empty, but have no edges. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix uninit warning? Created 5 years, 9 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 | « src/core/SkRegion_path.cpp ('k') | tests/RegionTest.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 /* Description: 8 /* Description:
9 * This test defines a series of elementatry test steps that perform 9 * This test defines a series of elementatry test steps that perform
10 * a single or a small group of canvas API calls. Each test step is 10 * a single or a small group of canvas API calls. Each test step is
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 740
741 n = canvas.saveLayer(NULL, NULL); 741 n = canvas.saveLayer(NULL, NULL);
742 REPORTER_ASSERT(reporter, 2 == n); 742 REPORTER_ASSERT(reporter, 2 == n);
743 REPORTER_ASSERT(reporter, 3 == canvas.getSaveCount()); 743 REPORTER_ASSERT(reporter, 3 == canvas.getSaveCount());
744 744
745 canvas.restore(); 745 canvas.restore();
746 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount()); 746 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount());
747 canvas.restore(); 747 canvas.restore();
748 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount()); 748 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount());
749 } 749 }
750
751 DEF_TEST(Canvas_ClipEmptyPath, reporter) {
752 SkCanvas canvas(10, 10);
753 canvas.save();
754 SkPath path;
755 canvas.clipPath(path);
756 canvas.restore();
757 canvas.save();
758 path.moveTo(5, 5);
759 canvas.clipPath(path);
760 canvas.restore();
761 canvas.save();
762 path.moveTo(7, 7);
763 canvas.clipPath(path); // should not assert here
764 canvas.restore();
765 }
OLDNEW
« no previous file with comments | « src/core/SkRegion_path.cpp ('k') | tests/RegionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698