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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 uint32_t p32 = reader->readU32(); | 655 uint32_t p32 = reader->readU32(); |
656 unsigned op = PaintOp_unpackOp(p32); | 656 unsigned op = PaintOp_unpackOp(p32); |
657 unsigned data = PaintOp_unpackData(p32); | 657 unsigned data = PaintOp_unpackData(p32); |
658 | 658 |
659 // SkDebugf(" read %08X op=%d flags=%d data=%d\n", p32, op, done, data); | 659 // SkDebugf(" read %08X op=%d flags=%d data=%d\n", p32, op, done, data); |
660 | 660 |
661 switch (op) { | 661 switch (op) { |
662 case kReset_PaintOp: p->reset(); break; | 662 case kReset_PaintOp: p->reset(); break; |
663 case kFlags_PaintOp: p->setFlags(data); break; | 663 case kFlags_PaintOp: p->setFlags(data); break; |
664 case kColor_PaintOp: p->setColor(reader->readU32()); break; | 664 case kColor_PaintOp: p->setColor(reader->readU32()); break; |
| 665 case kFilterLevel_PaintOp: p->setFilterLevel((SkPaint::FilterLevel)d
ata); break; |
665 case kStyle_PaintOp: p->setStyle((SkPaint::Style)data); break; | 666 case kStyle_PaintOp: p->setStyle((SkPaint::Style)data); break; |
666 case kJoin_PaintOp: p->setStrokeJoin((SkPaint::Join)data); break; | 667 case kJoin_PaintOp: p->setStrokeJoin((SkPaint::Join)data); break; |
667 case kCap_PaintOp: p->setStrokeCap((SkPaint::Cap)data); break; | 668 case kCap_PaintOp: p->setStrokeCap((SkPaint::Cap)data); break; |
668 case kWidth_PaintOp: p->setStrokeWidth(reader->readScalar()); break; | 669 case kWidth_PaintOp: p->setStrokeWidth(reader->readScalar()); break; |
669 case kMiter_PaintOp: p->setStrokeMiter(reader->readScalar()); break; | 670 case kMiter_PaintOp: p->setStrokeMiter(reader->readScalar()); break; |
670 case kEncoding_PaintOp: | 671 case kEncoding_PaintOp: |
671 p->setTextEncoding((SkPaint::TextEncoding)data); | 672 p->setTextEncoding((SkPaint::TextEncoding)data); |
672 break; | 673 break; |
673 case kHinting_PaintOp: p->setHinting((SkPaint::Hinting)data); break; | 674 case kHinting_PaintOp: p->setHinting((SkPaint::Hinting)data); break; |
674 case kAlign_PaintOp: p->setTextAlign((SkPaint::Align)data); break; | 675 case kAlign_PaintOp: p->setTextAlign((SkPaint::Align)data); break; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 status = kReadAtom_Status; | 899 status = kReadAtom_Status; |
899 break; | 900 break; |
900 } | 901 } |
901 } | 902 } |
902 | 903 |
903 if (bytesRead) { | 904 if (bytesRead) { |
904 *bytesRead = reader.offset(); | 905 *bytesRead = reader.offset(); |
905 } | 906 } |
906 return status; | 907 return status; |
907 } | 908 } |
OLD | NEW |