Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: src/core/SkPicturePlayback.cpp

Issue 14158015: Allow supporting older PICTURE_VERSIONs. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/core/SkPicture.cpp ('K') | « src/core/SkPicture.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« src/core/SkPicture.cpp ('K') | « src/core/SkPicture.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698