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

Side by Side Diff: tests/CanvasTest.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/CachedDataTest.cpp ('k') | tests/ClipBoundsTest.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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 SkCanvas canvas(10, 10); 693 SkCanvas canvas(10, 10);
694 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount()); 694 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount());
695 695
696 int n = canvas.save(); 696 int n = canvas.save();
697 REPORTER_ASSERT(reporter, 1 == n); 697 REPORTER_ASSERT(reporter, 1 == n);
698 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount()); 698 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount());
699 699
700 n = canvas.saveLayer(nullptr, nullptr); 700 n = canvas.saveLayer(nullptr, nullptr);
701 REPORTER_ASSERT(reporter, 2 == n); 701 REPORTER_ASSERT(reporter, 2 == n);
702 REPORTER_ASSERT(reporter, 3 == canvas.getSaveCount()); 702 REPORTER_ASSERT(reporter, 3 == canvas.getSaveCount());
703 703
704 canvas.restore(); 704 canvas.restore();
705 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount()); 705 REPORTER_ASSERT(reporter, 2 == canvas.getSaveCount());
706 canvas.restore(); 706 canvas.restore();
707 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount()); 707 REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount());
708 } 708 }
709 709
710 DEF_TEST(Canvas_ClipEmptyPath, reporter) { 710 DEF_TEST(Canvas_ClipEmptyPath, reporter) {
711 SkCanvas canvas(10, 10); 711 SkCanvas canvas(10, 10);
712 canvas.save(); 712 canvas.save();
713 SkPath path; 713 SkPath path;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa trix()); 750 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa trix());
751 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl ipBounds(&clip2)); 751 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl ipBounds(&clip2));
752 REPORTER_ASSERT(reporter, clip1 == clip2); 752 REPORTER_ASSERT(reporter, clip1 == clip2);
753 753
754 filterCanvas.clipRect(SkRect::MakeXYWH(30.5f, 30.7f, 100, 100)); 754 filterCanvas.clipRect(SkRect::MakeXYWH(30.5f, 30.7f, 100, 100));
755 filterCanvas.scale(0.75f, 0.5f); 755 filterCanvas.scale(0.75f, 0.5f);
756 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa trix()); 756 REPORTER_ASSERT(reporter, canvas.getTotalMatrix() == filterCanvas.getTotalMa trix());
757 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl ipBounds(&clip2)); 757 REPORTER_ASSERT(reporter, canvas.getClipBounds(&clip1) == filterCanvas.getCl ipBounds(&clip2));
758 REPORTER_ASSERT(reporter, clip1 == clip2); 758 REPORTER_ASSERT(reporter, clip1 == clip2);
759 } 759 }
OLDNEW
« no previous file with comments | « tests/CachedDataTest.cpp ('k') | tests/ClipBoundsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698