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 #include "SkRecorder.h" | 8 #include "SkRecorder.h" |
9 #include "SkPatchUtils.h" | 9 #include "SkPatchUtils.h" |
10 #include "SkPicture.h" | 10 #include "SkPicture.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 void SkRecorder::onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 180 void SkRecorder::onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
181 const SkMatrix* matrix, const SkPaint& paint)
{ | 181 const SkMatrix* matrix, const SkPaint& paint)
{ |
182 APPEND(DrawTextOnPath, | 182 APPEND(DrawTextOnPath, |
183 delay_copy(paint), | 183 delay_copy(paint), |
184 this->copy((const char*)text, byteLength), | 184 this->copy((const char*)text, byteLength), |
185 byteLength, | 185 byteLength, |
186 delay_copy(path), | 186 delay_copy(path), |
187 this->copy(matrix)); | 187 this->copy(matrix)); |
188 } | 188 } |
189 | 189 |
| 190 void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
| 191 const SkPaint& paint) { |
| 192 APPEND(DrawTextBlob, delay_copy(paint), blob, x, y); |
| 193 } |
| 194 |
190 void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con
st SkPaint* paint) { | 195 void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con
st SkPaint* paint) { |
191 APPEND(DrawPicture, this->copy(paint), pic, this->copy(matrix)); | 196 APPEND(DrawPicture, this->copy(paint), pic, this->copy(matrix)); |
192 } | 197 } |
193 | 198 |
194 void SkRecorder::drawVertices(VertexMode vmode, | 199 void SkRecorder::drawVertices(VertexMode vmode, |
195 int vertexCount, const SkPoint vertices[], | 200 int vertexCount, const SkPoint vertices[], |
196 const SkPoint texs[], const SkColor colors[], | 201 const SkPoint texs[], const SkColor colors[], |
197 SkXfermode* xmode, | 202 SkXfermode* xmode, |
198 const uint16_t indices[], int indexCount, const Sk
Paint& paint) { | 203 const uint16_t indices[], int indexCount, const Sk
Paint& paint) { |
199 APPEND(DrawVertices, delay_copy(paint), | 204 APPEND(DrawVertices, delay_copy(paint), |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 269 |
265 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { | 270 void SkRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle e
dgeStyle) { |
266 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is
InverseFillType()); | 271 INHERITED(updateClipConservativelyUsingBounds, path.getBounds(), op, path.is
InverseFillType()); |
267 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft
_ClipEdgeStyle); | 272 APPEND(ClipPath, this->devBounds(), delay_copy(path), op, edgeStyle == kSoft
_ClipEdgeStyle); |
268 } | 273 } |
269 | 274 |
270 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 275 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
271 INHERITED(onClipRegion, deviceRgn, op); | 276 INHERITED(onClipRegion, deviceRgn, op); |
272 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); | 277 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); |
273 } | 278 } |
OLD | NEW |