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

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

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 the specified paint, but will not retain a reference to the paint 74 the specified paint, but will not retain a reference to the paint
75 object itself, so it may be reused without danger of side-effects. 75 object itself, so it may be reused without danger of side-effects.
76 */ 76 */
77 void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy); 77 void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy);
78 #endif 78 #endif
79 79
80 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerRasterizer) 80 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerRasterizer)
81 81
82 protected: 82 protected:
83 SkLayerRasterizer(SkDeque* layers); 83 SkLayerRasterizer(SkDeque* layers);
84 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
84 SkLayerRasterizer(SkReadBuffer&); 85 SkLayerRasterizer(SkReadBuffer&);
86 #endif
85 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 87 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
86 88
87 // override from SkRasterizer 89 // override from SkRasterizer
88 virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix, 90 virtual bool onRasterize(const SkPath& path, const SkMatrix& matrix,
89 const SkIRect* clipBounds, 91 const SkIRect* clipBounds,
90 SkMask* mask, SkMask::CreateMode mode) const; 92 SkMask* mask, SkMask::CreateMode mode) const;
91 93
92 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API 94 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
93 public: 95 public:
94 #endif 96 #endif
95 SkLayerRasterizer(); 97 SkLayerRasterizer();
96 98
97 private: 99 private:
98 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API 100 #ifdef SK_SUPPORT_LEGACY_LAYERRASTERIZER_API
99 SkDeque* fLayers; 101 SkDeque* fLayers;
100 #else 102 #else
101 const SkDeque* const fLayers; 103 const SkDeque* const fLayers;
102 #endif 104 #endif
103 105
104 static SkDeque* ReadLayers(SkReadBuffer& buffer); 106 static SkDeque* ReadLayers(SkReadBuffer& buffer);
105 107
106 friend class LayerRasterizerTester; 108 friend class LayerRasterizerTester;
107 109
108 typedef SkRasterizer INHERITED; 110 typedef SkRasterizer INHERITED;
109 }; 111 };
110 112
111 #endif 113 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698