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

Side by Side Diff: tests/LayerRasterizerTest.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 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/KtxTest.cpp ('k') | tests/LazyPtrTest.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 2014 Google Inc. 2 * Copyright 2014 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 "SkDeque.h" 8 #include "SkDeque.h"
9 #include "SkLayerRasterizer.h" 9 #include "SkLayerRasterizer.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 25 matching lines...) Expand all
36 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DummyRasterizer); 36 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DummyRasterizer);
37 37
38 private: 38 private:
39 static int gCount; 39 static int gCount;
40 40
41 typedef SkRasterizer INHERITED; 41 typedef SkRasterizer INHERITED;
42 }; 42 };
43 43
44 int DummyRasterizer::gCount; 44 int DummyRasterizer::gCount;
45 45
46 SkFlattenable* DummyRasterizer::CreateProc(SkReadBuffer&) { 46 SkFlattenable* DummyRasterizer::CreateProc(SkReadBuffer&) { return new DummyRast erizer; }
47 return SkNEW(DummyRasterizer);
48 }
49 47
50 // Check to make sure that the SkPaint in the layer has its destructor called. 48 // Check to make sure that the SkPaint in the layer has its destructor called.
51 DEF_TEST(LayerRasterizer_destructor, reporter) { 49 DEF_TEST(LayerRasterizer_destructor, reporter) {
52 { 50 {
53 SkPaint paint; 51 SkPaint paint;
54 paint.setRasterizer(SkNEW(DummyRasterizer))->unref(); 52 paint.setRasterizer(new DummyRasterizer)->unref();
55 REPORTER_ASSERT(reporter, DummyRasterizer::GetCount() == 1); 53 REPORTER_ASSERT(reporter, DummyRasterizer::GetCount() == 1);
56 54
57 SkLayerRasterizer::Builder builder; 55 SkLayerRasterizer::Builder builder;
58 builder.addLayer(paint); 56 builder.addLayer(paint);
59 } 57 }
60 REPORTER_ASSERT(reporter, DummyRasterizer::GetCount() == 0); 58 REPORTER_ASSERT(reporter, DummyRasterizer::GetCount() == 0);
61 } 59 }
62 60
63 class LayerRasterizerTester { 61 class LayerRasterizerTester {
64 public: 62 public:
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } else { 135 } else {
138 REPORTER_ASSERT(reporter, equals(*recFirstCopy, *recOneLarger)); 136 REPORTER_ASSERT(reporter, equals(*recFirstCopy, *recOneLarger));
139 } 137 }
140 } 138 }
141 } 139 }
142 140
143 DEF_TEST(LayerRasterizer_detachEmpty, reporter) { 141 DEF_TEST(LayerRasterizer_detachEmpty, reporter) {
144 SkLayerRasterizer::Builder builder; 142 SkLayerRasterizer::Builder builder;
145 REPORTER_ASSERT(reporter, NULL == builder.detachRasterizer()); 143 REPORTER_ASSERT(reporter, NULL == builder.detachRasterizer());
146 } 144 }
OLDNEW
« no previous file with comments | « tests/KtxTest.cpp ('k') | tests/LazyPtrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698