OLD | NEW |
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 const SkPaint&) override; | 119 const SkPaint&) override; |
120 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk
Color[], | 120 void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const Sk
Color[], |
121 int count, SkXfermode::Mode, const SkRect* cull, const SkPa
int*) override; | 121 int count, SkXfermode::Mode, const SkRect* cull, const SkPa
int*) override; |
122 | 122 |
123 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; | 123 void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; |
124 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; |
125 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; | 125 void onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle
) override; |
126 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; | 126 void onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) override; |
127 | 127 |
128 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri
de; | 128 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri
de; |
| 129 void onDrawShadowedPicture(const SkPicture*, sk_sp<SkLights>) override; |
129 void onDrawAnnotation(const SkRect&, const char[], SkData*) override; | 130 void onDrawAnnotation(const SkRect&, const char[], SkData*) override; |
130 | 131 |
131 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove
rride; | 132 sk_sp<SkSurface> onNewSurface(const SkImageInfo&, const SkSurfaceProps&) ove
rride; |
132 | 133 |
133 void flushMiniRecorder(); | 134 void flushMiniRecorder(); |
134 | 135 |
135 private: | 136 private: |
136 template <typename T> | 137 template <typename T> |
137 T* copy(const T*); | 138 T* copy(const T*); |
138 | 139 |
139 template <typename T> | 140 template <typename T> |
140 T* copy(const T[], size_t count); | 141 T* copy(const T[], size_t count); |
141 | 142 |
142 SkIRect devBounds() const { | 143 SkIRect devBounds() const { |
143 SkIRect devBounds; | 144 SkIRect devBounds; |
144 this->getClipDeviceBounds(&devBounds); | 145 this->getClipDeviceBounds(&devBounds); |
145 return devBounds; | 146 return devBounds; |
146 } | 147 } |
147 | 148 |
148 DrawPictureMode fDrawPictureMode; | 149 DrawPictureMode fDrawPictureMode; |
149 size_t fApproxBytesUsedBySubPictures; | 150 size_t fApproxBytesUsedBySubPictures; |
150 SkRecord* fRecord; | 151 SkRecord* fRecord; |
151 SkAutoTDelete<SkDrawableList> fDrawableList; | 152 SkAutoTDelete<SkDrawableList> fDrawableList; |
152 | 153 |
153 SkMiniRecorder* fMiniRecorder; | 154 SkMiniRecorder* fMiniRecorder; |
154 }; | 155 }; |
155 | 156 |
156 #endif//SkRecorder_DEFINED | 157 #endif//SkRecorder_DEFINED |
OLD | NEW |