| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkBitmapHeap.h" | 10 #include "SkBitmapHeap.h" |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 | 512 |
| 513 SkPath path; | 513 SkPath path; |
| 514 reader->readPath(&path); | 514 reader->readPath(&path); |
| 515 | 515 |
| 516 SkMatrix matrixStorage; | 516 SkMatrix matrixStorage; |
| 517 const SkMatrix* matrix = NULL; | 517 const SkMatrix* matrix = NULL; |
| 518 if (DrawOp_unpackFlags(op32) & kDrawTextOnPath_HasMatrix_DrawOpFlag) { | 518 if (DrawOp_unpackFlags(op32) & kDrawTextOnPath_HasMatrix_DrawOpFlag) { |
| 519 reader->readMatrix(&matrixStorage); | 519 reader->readMatrix(&matrixStorage); |
| 520 matrix = &matrixStorage; | 520 matrix = &matrixStorage; |
| 521 } | 521 } |
| 522 SkCanvas::TextOnPathMethod method = (SkCanvas::TextOnPathMethod)reader->read
Int(); |
| 522 if (state->shouldDraw()) { | 523 if (state->shouldDraw()) { |
| 523 canvas->drawTextOnPath(text, len, path, matrix, state->paint()); | 524 canvas->drawTextOnPath(text, len, path, matrix, method, state->paint()); |
| 524 } | 525 } |
| 525 } | 526 } |
| 526 | 527 |
| 527 /////////////////////////////////////////////////////////////////////////////// | 528 /////////////////////////////////////////////////////////////////////////////// |
| 528 | 529 |
| 529 class BitmapHolder : SkNoncopyable { | 530 class BitmapHolder : SkNoncopyable { |
| 530 public: | 531 public: |
| 531 BitmapHolder(SkReader32* reader, uint32_t op32, SkGPipeState* state); | 532 BitmapHolder(SkReader32* reader, uint32_t op32, SkGPipeState* state); |
| 532 ~BitmapHolder() { | 533 ~BitmapHolder() { |
| 533 if (fHeapEntry != NULL) { | 534 if (fHeapEntry != NULL) { |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 status = kReadAtom_Status; | 920 status = kReadAtom_Status; |
| 920 break; | 921 break; |
| 921 } | 922 } |
| 922 } | 923 } |
| 923 | 924 |
| 924 if (bytesRead) { | 925 if (bytesRead) { |
| 925 *bytesRead = reader.offset(); | 926 *bytesRead = reader.offset(); |
| 926 } | 927 } |
| 927 return status; | 928 return status; |
| 928 } | 929 } |
| OLD | NEW |