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 #include "SkPicturePlayback.h" | 8 #include "SkPicturePlayback.h" |
9 #include "SkPictureRecord.h" | 9 #include "SkPictureRecord.h" |
10 #include "SkTypeface.h" | 10 #include "SkTypeface.h" |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // picture to begin with, which will be alerted to here. | 530 // picture to begin with, which will be alerted to here. |
531 SkASSERT(success); | 531 SkASSERT(success); |
532 } | 532 } |
533 } break; | 533 } break; |
534 case PICT_BUFFER_SIZE_TAG: { | 534 case PICT_BUFFER_SIZE_TAG: { |
535 SkAutoMalloc storage(size); | 535 SkAutoMalloc storage(size); |
536 stream->read(storage.get(), size); | 536 stream->read(storage.get(), size); |
537 | 537 |
538 SkOrderedReadBuffer buffer(storage.get(), size); | 538 SkOrderedReadBuffer buffer(storage.get(), size); |
539 buffer.setFlags(pictInfoFlagsToReadBufferFlags(info.fFlags)); | 539 buffer.setFlags(pictInfoFlagsToReadBufferFlags(info.fFlags)); |
| 540 buffer.setPictureVersion(info.fVersion); |
540 | 541 |
541 fFactoryPlayback->setupBuffer(buffer); | 542 fFactoryPlayback->setupBuffer(buffer); |
542 fTFPlayback.setupBuffer(buffer); | 543 fTFPlayback.setupBuffer(buffer); |
543 buffer.setBitmapDecoder(proc); | 544 buffer.setBitmapDecoder(proc); |
544 | 545 |
545 while (!buffer.eof()) { | 546 while (!buffer.eof()) { |
546 tag = buffer.readUInt(); | 547 tag = buffer.readUInt(); |
547 size = buffer.readUInt(); | 548 size = buffer.readUInt(); |
548 this->parseBufferTag(buffer, tag, size); | 549 this->parseBufferTag(buffer, tag, size); |
549 } | 550 } |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 for (index = 0; index < fRegionCount; index++) | 1588 for (index = 0; index < fRegionCount; index++) |
1588 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), | 1589 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer
), |
1589 "region%p, ", &fRegions[index]); | 1590 "region%p, ", &fRegions[index]); |
1590 if (fRegionCount > 0) | 1591 if (fRegionCount > 0) |
1591 SkDebugf("%s0};\n", pBuffer); | 1592 SkDebugf("%s0};\n", pBuffer); |
1592 | 1593 |
1593 const_cast<SkPicturePlayback*>(this)->dumpStream(); | 1594 const_cast<SkPicturePlayback*>(this)->dumpStream(); |
1594 } | 1595 } |
1595 | 1596 |
1596 #endif | 1597 #endif |
OLD | NEW |