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

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

Issue 2167223002: Revert of Creating framework for drawShadowedPicture (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkRecorder.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 * 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 #ifndef SkRecorder_DEFINED 8 #ifndef SkRecorder_DEFINED
9 #define SkRecorder_DEFINED 9 #define SkRecorder_DEFINED
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor der will fail. 53 // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecor der will fail.
54 void forgetRecord(); 54 void forgetRecord();
55 55
56 void willSave() override; 56 void willSave() override;
57 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; 57 SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override;
58 void willRestore() override {} 58 void willRestore() override {}
59 void didRestore() override; 59 void didRestore() override;
60 60
61 void didConcat(const SkMatrix&) override; 61 void didConcat(const SkMatrix&) override;
62 void didSetMatrix(const SkMatrix&) override; 62 void didSetMatrix(const SkMatrix&) override;
63
64 #ifdef SK_EXPERIMENTAL_SHADOWING
65 void didTranslateZ(SkScalar) override; 63 void didTranslateZ(SkScalar) override;
66 #else
67 void didTranslateZ(SkScalar);
68 #endif
69 64
70 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; 65 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override;
71 void onDrawDrawable(SkDrawable*, const SkMatrix*) override; 66 void onDrawDrawable(SkDrawable*, const SkMatrix*) override;
72 void onDrawText(const void* text, 67 void onDrawText(const void* text,
73 size_t byteLength, 68 size_t byteLength,
74 SkScalar x, 69 SkScalar x,
75 SkScalar y, 70 SkScalar y,
76 const SkPaint& paint) override; 71 const SkPaint& paint) override;
77 void onDrawPosText(const void* text, 72 void onDrawPosText(const void* text,
78 size_t byteLength, 73 size_t byteLength,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const SkPaint&) override; 119 const SkPaint&) override;
125 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk Color[], 120 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk Color[],
126 int count, SkXfermode::Mode, const SkRect* cull, const SkPa int*) override; 121 int count, SkXfermode::Mode, const SkRect* cull, const SkPa int*) override;
127 122
128 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override; 123 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override;
129 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt yle) override; 124 void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle edgeSt yle) override;
130 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override; 125 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle ) override;
131 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; 126 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override;
132 127
133 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri de; 128 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri de;
134
135 #ifdef SK_EXPERIMENTAL_SHADOWING
136 void onDrawShadowedPicture(const SkPicture*,
137 const SkMatrix*,
138 const SkPaint*) override;
139 #else
140 void onDrawShadowedPicture(const SkPicture*,
141 const SkMatrix*,
142 const SkPaint*);
143 #endif
144
145 void onDrawAnnotation(const SkRect&, const char[], SkData*) override; 129 void onDrawAnnotation(const SkRect&, const char[], SkData*) override;
146 130
147 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride; 131 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove rride;
148 132
149 void flushMiniRecorder(); 133 void flushMiniRecorder();
150 134
151 private: 135 private:
152 template <typename T> 136 template <typename T>
153 T* copy(const T*); 137 T* copy(const T*);
154 138
155 template <typename T> 139 template <typename T>
156 T* copy(const T[], size_t count); 140 T* copy(const T[], size_t count);
157 141
158 SkIRect devBounds() const { 142 SkIRect devBounds() const {
159 SkIRect devBounds; 143 SkIRect devBounds;
160 this->getClipDeviceBounds(&devBounds); 144 this->getClipDeviceBounds(&devBounds);
161 return devBounds; 145 return devBounds;
162 } 146 }
163 147
164 DrawPictureMode fDrawPictureMode; 148 DrawPictureMode fDrawPictureMode;
165 size_t fApproxBytesUsedBySubPictures; 149 size_t fApproxBytesUsedBySubPictures;
166 SkRecord* fRecord; 150 SkRecord* fRecord;
167 SkAutoTDelete<SkDrawableList> fDrawableList; 151 SkAutoTDelete<SkDrawableList> fDrawableList;
168 152
169 SkMiniRecorder* fMiniRecorder; 153 SkMiniRecorder* fMiniRecorder;
170 }; 154 };
171 155
172 #endif//SkRecorder_DEFINED 156 #endif//SkRecorder_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698