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

Side by Side Diff: include/effects/SkLayerRasterizer.h

Issue 233673002: Create SkLayerRasterizer w/o destroying Builder. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix a typo Created 6 years, 8 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 | « gyp/tests.gypi ('k') | src/effects/SkLayerRasterizer.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 /* 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
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
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
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | src/effects/SkLayerRasterizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698