| 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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
| 9 #include "SkPatchUtils.h" | 9 #include "SkPatchUtils.h" |
| 10 #include "SkPictureData.h" | 10 #include "SkPictureData.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 canvas->drawImage(image, loc.fX, loc.fY, paint); | 309 canvas->drawImage(image, loc.fX, loc.fY, paint); |
| 310 } break; | 310 } break; |
| 311 case DRAW_IMAGE_LATTICE: { | 311 case DRAW_IMAGE_LATTICE: { |
| 312 const SkPaint* paint = fPictureData->getPaint(reader); | 312 const SkPaint* paint = fPictureData->getPaint(reader); |
| 313 const SkImage* image = fPictureData->getImage(reader); | 313 const SkImage* image = fPictureData->getImage(reader); |
| 314 SkCanvas::Lattice lattice; | 314 SkCanvas::Lattice lattice; |
| 315 lattice.fXCount = reader->readInt(); | 315 lattice.fXCount = reader->readInt(); |
| 316 lattice.fXDivs = (const int*) reader->skip(lattice.fXCount * sizeof(
int32_t)); | 316 lattice.fXDivs = (const int*) reader->skip(lattice.fXCount * sizeof(
int32_t)); |
| 317 lattice.fYCount = reader->readInt(); | 317 lattice.fYCount = reader->readInt(); |
| 318 lattice.fYDivs = (const int*) reader->skip(lattice.fYCount * sizeof(
int32_t)); | 318 lattice.fYDivs = (const int*) reader->skip(lattice.fYCount * sizeof(
int32_t)); |
| 319 int flagCount = reader->readInt(); |
| 320 lattice.fFlags = (0 == flagCount) ? nullptr : (const SkCanvas::Latti
ce::Flags*) |
| 321 reader->skip(SkAlign4(flagCount * sizeof(SkCanvas::Lattice::
Flags))); |
| 319 SkRect dst; | 322 SkRect dst; |
| 320 reader->readRect(&dst); | 323 reader->readRect(&dst); |
| 321 canvas->drawImageLattice(image, lattice, dst, paint); | 324 canvas->drawImageLattice(image, lattice, dst, paint); |
| 322 } break; | 325 } break; |
| 323 case DRAW_IMAGE_NINE: { | 326 case DRAW_IMAGE_NINE: { |
| 324 const SkPaint* paint = fPictureData->getPaint(reader); | 327 const SkPaint* paint = fPictureData->getPaint(reader); |
| 325 const SkImage* image = fPictureData->getImage(reader); | 328 const SkImage* image = fPictureData->getImage(reader); |
| 326 SkIRect center; | 329 SkIRect center; |
| 327 reader->readIRect(¢er); | 330 reader->readIRect(¢er); |
| 328 SkRect dst; | 331 SkRect dst; |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 case TRANSLATE_Z: { | 660 case TRANSLATE_Z: { |
| 658 #ifdef SK_EXPERIMENTAL_SHADOWING | 661 #ifdef SK_EXPERIMENTAL_SHADOWING |
| 659 SkScalar dz = reader->readScalar(); | 662 SkScalar dz = reader->readScalar(); |
| 660 canvas->translateZ(dz); | 663 canvas->translateZ(dz); |
| 661 #endif | 664 #endif |
| 662 } break; | 665 } break; |
| 663 default: | 666 default: |
| 664 SkASSERTF(false, "Unknown draw type: %d", op); | 667 SkASSERTF(false, "Unknown draw type: %d", op); |
| 665 } | 668 } |
| 666 } | 669 } |
| OLD | NEW |