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

Side by Side Diff: tests/LayerRasterizerTest.cpp

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 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/ImageFilterTest.cpp ('k') | no next file » | 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 15 matching lines...) Expand all
26 gCount++; 26 gCount++;
27 } 27 }
28 28
29 ~DummyRasterizer() { 29 ~DummyRasterizer() {
30 // Not threadsafe. Only used in one thread. 30 // Not threadsafe. Only used in one thread.
31 gCount--; 31 gCount--;
32 } 32 }
33 33
34 static int GetCount() { return gCount; } 34 static int GetCount() { return gCount; }
35 35
36 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DummyRasterizer) 36 SK_DECLARE_NOT_FLATTENABLE_PROCS(DummyRasterizer)
37 37
38 private: 38 private:
39 DummyRasterizer(SkReadBuffer&) {}
40
41 static int gCount; 39 static int gCount;
42 40
43 typedef SkRasterizer INHERITED; 41 typedef SkRasterizer INHERITED;
44 }; 42 };
45 43
46 int DummyRasterizer::gCount; 44 int DummyRasterizer::gCount;
47 45
48 // Check to make sure that the SkPaint in the layer has its destructor called. 46 // Check to make sure that the SkPaint in the layer has its destructor called.
49 DEF_TEST(LayerRasterizer_destructor, reporter) { 47 DEF_TEST(LayerRasterizer_destructor, reporter) {
50 { 48 {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } else { 133 } else {
136 REPORTER_ASSERT(reporter, equals(*recFirstCopy, *recOneLarger)); 134 REPORTER_ASSERT(reporter, equals(*recFirstCopy, *recOneLarger));
137 } 135 }
138 } 136 }
139 } 137 }
140 138
141 DEF_TEST(LayerRasterizer_detachEmpty, reporter) { 139 DEF_TEST(LayerRasterizer_detachEmpty, reporter) {
142 SkLayerRasterizer::Builder builder; 140 SkLayerRasterizer::Builder builder;
143 REPORTER_ASSERT(reporter, NULL == builder.detachRasterizer()); 141 REPORTER_ASSERT(reporter, NULL == builder.detachRasterizer());
144 } 142 }
OLDNEW
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698