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 "SkBigPicture.h" | 8 #include "SkBigPicture.h" |
9 #include "SkPatchUtils.h" | 9 #include "SkPatchUtils.h" |
10 #include "SkPicture.h" | 10 #include "SkPicture.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 void SkRecorder::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 293 void SkRecorder::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
294 const SkPoint texCoords[4], SkXfermode* xmode, cons
t SkPaint& paint) { | 294 const SkPoint texCoords[4], SkXfermode* xmode, cons
t SkPaint& paint) { |
295 APPEND(DrawPatch, delay_copy(paint), | 295 APPEND(DrawPatch, delay_copy(paint), |
296 cubics ? this->copy(cubics, SkPatchUtils::kNumCtrlPts) : NULL, | 296 cubics ? this->copy(cubics, SkPatchUtils::kNumCtrlPts) : NULL, |
297 colors ? this->copy(colors, SkPatchUtils::kNumCorners) : NULL, | 297 colors ? this->copy(colors, SkPatchUtils::kNumCorners) : NULL, |
298 texCoords ? this->copy(texCoords, SkPatchUtils::kNumCorners) : NULL, | 298 texCoords ? this->copy(texCoords, SkPatchUtils::kNumCorners) : NULL, |
299 xmode); | 299 xmode); |
300 } | 300 } |
301 | 301 |
| 302 void SkRecorder::onDrawAtlas(const SkImage* atlas, const SkRSXform xform[], cons
t SkRect tex[], |
| 303 const SkColor colors[], int count, SkXfermode::Mode
mode, |
| 304 const SkRect* cull, const SkPaint* paint) { |
| 305 APPEND(DrawAtlas, this->copy(paint), |
| 306 atlas, |
| 307 this->copy(xform, count), |
| 308 this->copy(tex, count), |
| 309 this->copy(colors, count), |
| 310 count, |
| 311 mode, |
| 312 this->copy(cull)); |
| 313 } |
| 314 |
302 void SkRecorder::willSave() { | 315 void SkRecorder::willSave() { |
303 APPEND(Save); | 316 APPEND(Save); |
304 } | 317 } |
305 | 318 |
306 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds, | 319 SkCanvas::SaveLayerStrategy SkRecorder::willSaveLayer(const SkRect* bounds, |
307 const SkPaint* paint, | 320 const SkPaint* paint, |
308 SkCanvas::SaveFlags flags)
{ | 321 SkCanvas::SaveFlags flags)
{ |
309 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags); | 322 APPEND(SaveLayer, this->copy(bounds), this->copy(paint), flags); |
310 return SkCanvas::kNoLayer_SaveLayerStrategy; | 323 return SkCanvas::kNoLayer_SaveLayerStrategy; |
311 } | 324 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 INHERITED(onClipPath, path, op, edgeStyle); | 356 INHERITED(onClipPath, path, op, edgeStyle); |
344 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); | 357 SkRecords::RegionOpAndAA opAA(op, kSoft_ClipEdgeStyle == edgeStyle); |
345 APPEND(ClipPath, this->devBounds(), delay_copy(path), opAA); | 358 APPEND(ClipPath, this->devBounds(), delay_copy(path), opAA); |
346 } | 359 } |
347 | 360 |
348 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { | 361 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { |
349 INHERITED(onClipRegion, deviceRgn, op); | 362 INHERITED(onClipRegion, deviceRgn, op); |
350 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); | 363 APPEND(ClipRegion, this->devBounds(), delay_copy(deviceRgn), op); |
351 } | 364 } |
352 | 365 |
OLD | NEW |