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

Side by Side Diff: src/core/SkPictureRecord.h

Issue 2146073003: Creating framework for drawShadowedPicture (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Made changes to better hide changes from public Created 4 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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 #ifndef SkPictureRecord_DEFINED 8 #ifndef SkPictureRecord_DEFINED
9 #define SkPictureRecord_DEFINED 9 #define SkPictureRecord_DEFINED
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride; 152 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride;
153 bool onPeekPixels(SkPixmap*) override { return false; } 153 bool onPeekPixels(SkPixmap*) override { return false; }
154 154
155 void willSave() override; 155 void willSave() override;
156 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; 156 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override;
157 void willRestore() override; 157 void willRestore() override;
158 158
159 void didConcat(const SkMatrix&) override; 159 void didConcat(const SkMatrix&) override;
160 void didSetMatrix(const SkMatrix&) override; 160 void didSetMatrix(const SkMatrix&) override;
161 161
162 void didTranslateZ(SkScalar) override; 162 void didTranslateZ(SkScalar)
jvanverth1 2016/07/21 13:56:53 I think it would be cleaner-looking to duplicate t
vjiaoblack 2016/07/21 15:11:20 Done.
163 #ifdef SK_USE_SHADOWS
164 override
165 #endif
166 ;
163 167
164 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; 168 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override;
165 169
166 void onDrawText(const void* text, size_t, SkScalar x, SkScalar y, const SkPa int&) override; 170 void onDrawText(const void* text, size_t, SkScalar x, SkScalar y, const SkPa int&) override;
167 void onDrawPosText(const void* text, size_t, const SkPoint pos[], const SkPa int&) override; 171 void onDrawPosText(const void* text, size_t, const SkPoint pos[], const SkPa int&) override;
168 void onDrawPosTextH(const void* text, size_t, const SkScalar xpos[], SkScala r constY, 172 void onDrawPosTextH(const void* text, size_t, const SkScalar xpos[], SkScala r constY,
169 const SkPaint&) override; 173 const SkPaint&) override;
170 void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& pat h, 174 void onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& pat h,
171 const SkMatrix* matrix, const SkPaint&) overri de; 175 const SkMatrix* matrix, const SkPaint&) overri de;
172 void onDrawTextRSXform(const void* text, size_t byteLength, const SkRSXform xform[], 176 void onDrawTextRSXform(const void* text, size_t byteLength, const SkRSXform xform[],
(...skipping 28 matching lines...) Expand all
201 const SkColor colors[], SkXfermode* xmode, 205 const SkColor colors[], SkXfermode* xmode,
202 const uint16_t indices[], int indexCount, 206 const uint16_t indices[], int indexCount,
203 const SkPaint&) override; 207 const SkPaint&) override;
204 208
205 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; 209 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override;
206 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; 210 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override;
207 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; 211 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override;
208 void onClipRegion(const SkRegion&, SkRegion::Op) override; 212 void onClipRegion(const SkRegion&, SkRegion::Op) override;
209 213
210 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri de; 214 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri de;
215 void onDrawShadowedPicture(const SkPicture*,
jvanverth1 2016/07/21 13:56:53 Same here.
vjiaoblack 2016/07/21 15:11:20 Done.
216 const SkMatrix*,
217 const SkPaint*)
218 #ifdef SK_USE_SHADOWS
219 override
220 #endif
221 ;
222
211 void onDrawDrawable(SkDrawable*, const SkMatrix*) override; 223 void onDrawDrawable(SkDrawable*, const SkMatrix*) override;
212 void onDrawAnnotation(const SkRect&, const char[], SkData*) override; 224 void onDrawAnnotation(const SkRect&, const char[], SkData*) override;
213 225
214 int addPathToHeap(const SkPath& path); // does not write to ops stream 226 int addPathToHeap(const SkPath& path); // does not write to ops stream
215 227
216 // These entry points allow the writing of matrices, clips, saves & 228 // These entry points allow the writing of matrices, clips, saves &
217 // restores to be deferred (e.g., if the MC state is being collapsed and 229 // restores to be deferred (e.g., if the MC state is being collapsed and
218 // only written out as needed). 230 // only written out as needed).
219 void recordConcat(const SkMatrix& matrix); 231 void recordConcat(const SkMatrix& matrix);
220 void recordTranslate(const SkMatrix& matrix); 232 void recordTranslate(const SkMatrix& matrix);
(...skipping 27 matching lines...) Expand all
248 260
249 uint32_t fRecordFlags; 261 uint32_t fRecordFlags;
250 int fInitialSaveCount; 262 int fInitialSaveCount;
251 263
252 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor 264 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c onstructor
253 265
254 typedef SkCanvas INHERITED; 266 typedef SkCanvas INHERITED;
255 }; 267 };
256 268
257 #endif 269 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698