OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkLayerRasterizer_DEFINED | 10 #ifndef SkLayerRasterizer_DEFINED |
(...skipping 21 matching lines...) Expand all Loading... | |
32 /** | 32 /** |
33 * Add a new layer (above any previous layers) to the rasterizer. | 33 * Add a new layer (above any previous layers) to the rasterizer. |
34 * The layer will extract those fields that affect the mask from | 34 * The layer will extract those fields that affect the mask from |
35 * the specified paint, but will not retain a reference to the paint | 35 * the specified paint, but will not retain a reference to the paint |
36 * object itself, so it may be reused without danger of side-effects. | 36 * object itself, so it may be reused without danger of side-effects. |
37 */ | 37 */ |
38 void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy); | 38 void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy); |
39 | 39 |
40 /** | 40 /** |
41 * Pass queue of layers on to newly created layer rasterizer and retur n it. The builder | 41 * Pass queue of layers on to newly created layer rasterizer and retur n it. The builder |
42 * cannot be used any more after calling this function. | 42 * *cannot* be used any more after calling this function. |
43 */ | 43 */ |
44 SkLayerRasterizer* detachRasterizer(); | 44 SkLayerRasterizer* detachRasterizer(); |
45 | 45 |
46 /** | |
47 * Copy queue of layers to a newly created layer rasterizer and return it. The builder | |
48 * *may* be used after calling this function. | |
reed1
2014/04/10 19:53:04
Builder b;
b.addLayer(A)
x = b.copyRasterizer
b.ad
scroggo
2014/04/10 20:14:24
Latest patch clarifies things.
| |
49 */ | |
50 SkLayerRasterizer* copyRasterizer(); | |
51 | |
46 private: | 52 private: |
47 SkDeque* fLayers; | 53 SkDeque* fLayers; |
48 }; | 54 }; |
49 | 55 |
50 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API | 56 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API |
51 void addLayer(const SkPaint& paint) { | 57 void addLayer(const SkPaint& paint) { |
52 this->addLayer(paint, 0, 0); | 58 this->addLayer(paint, 0, 0); |
53 } | 59 } |
54 | 60 |
55 /** Add a new layer (above any previous layers) to the rasterizer. | 61 /** Add a new layer (above any previous layers) to the rasterizer. |
(...skipping 23 matching lines...) Expand all Loading... | |
79 | 85 |
80 private: | 86 private: |
81 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API | 87 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API |
82 SkDeque* fLayers; | 88 SkDeque* fLayers; |
83 #else | 89 #else |
84 const SkDeque* const fLayers; | 90 const SkDeque* const fLayers; |
85 #endif | 91 #endif |
86 | 92 |
87 static SkDeque* ReadLayers(SkReadBuffer& buffer); | 93 static SkDeque* ReadLayers(SkReadBuffer& buffer); |
88 | 94 |
95 friend class LayerRasterizerTester; | |
96 | |
89 typedef SkRasterizer INHERITED; | 97 typedef SkRasterizer INHERITED; |
90 }; | 98 }; |
91 | 99 |
92 #endif | 100 #endif |
OLD | NEW |