OLD | NEW |
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...) Loading... |
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...) Loading... |
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 } |
OLD | NEW |