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

Side by Side Diff: tests/DrawFilterTest.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/DrawBitmapRectTest.cpp ('k') | tests/DrawPathTest.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 2015 Google Inc. 2 * Copyright 2015 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkDrawFilter.h" 9 #include "SkDrawFilter.h"
10 #include "SkSurface.h" 10 #include "SkSurface.h"
(...skipping 12 matching lines...) Expand all
23 * canvas.setDrawFilter is defined to be local to the save/restore block, such that if you 23 * canvas.setDrawFilter is defined to be local to the save/restore block, such that if you
24 * do the following: save / modify-drawfilter / restore, the current drawfilter should be what 24 * do the following: save / modify-drawfilter / restore, the current drawfilter should be what
25 * it was before the save. 25 * it was before the save.
26 */ 26 */
27 static void test_saverestore(skiatest::Reporter* reporter) { 27 static void test_saverestore(skiatest::Reporter* reporter) {
28 SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(10, 10)); 28 SkAutoTUnref<SkSurface> surface(SkSurface::NewRasterN32Premul(10, 10));
29 SkCanvas* canvas = surface->getCanvas(); 29 SkCanvas* canvas = surface->getCanvas();
30 30
31 SkAutoTUnref<TestFilter> df(new TestFilter); 31 SkAutoTUnref<TestFilter> df(new TestFilter);
32 32
33 REPORTER_ASSERT(reporter, NULL == canvas->getDrawFilter()); 33 REPORTER_ASSERT(reporter, nullptr == canvas->getDrawFilter());
34 34
35 canvas->save(); 35 canvas->save();
36 canvas->setDrawFilter(df); 36 canvas->setDrawFilter(df);
37 REPORTER_ASSERT(reporter, NULL != canvas->getDrawFilter()); 37 REPORTER_ASSERT(reporter, nullptr != canvas->getDrawFilter());
38 canvas->restore(); 38 canvas->restore();
39 39
40 REPORTER_ASSERT(reporter, NULL == canvas->getDrawFilter()); 40 REPORTER_ASSERT(reporter, nullptr == canvas->getDrawFilter());
41 } 41 }
42 42
43 DEF_TEST(DrawFilter, reporter) { 43 DEF_TEST(DrawFilter, reporter) {
44 test_saverestore(reporter); 44 test_saverestore(reporter);
45 } 45 }
OLDNEW
« no previous file with comments | « tests/DrawBitmapRectTest.cpp ('k') | tests/DrawPathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698