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

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

Issue 14741007: Revert "Allow supporting 1 older PICTURE_VERSION." (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
« no previous file with comments | « 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);
541 540
542 fFactoryPlayback->setupBuffer(buffer); 541 fFactoryPlayback->setupBuffer(buffer);
543 fTFPlayback.setupBuffer(buffer); 542 fTFPlayback.setupBuffer(buffer);
544 buffer.setBitmapDecoder(proc); 543 buffer.setBitmapDecoder(proc);
545 544
546 while (!buffer.eof()) { 545 while (!buffer.eof()) {
547 tag = buffer.readUInt(); 546 tag = buffer.readUInt();
548 size = buffer.readUInt(); 547 size = buffer.readUInt();
549 this->parseBufferTag(buffer, tag, size); 548 this->parseBufferTag(buffer, tag, size);
550 } 549 }
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 for (index = 0; index < fRegionCount; index++) 1587 for (index = 0; index < fRegionCount; index++)
1589 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ), 1588 bufferPtr += snprintf(bufferPtr, DUMP_BUFFER_SIZE - (bufferPtr - pBuffer ),
1590 "region%p, ", &fRegions[index]); 1589 "region%p, ", &fRegions[index]);
1591 if (fRegionCount > 0) 1590 if (fRegionCount > 0)
1592 SkDebugf("%s0};\n", pBuffer); 1591 SkDebugf("%s0};\n", pBuffer);
1593 1592
1594 const_cast<SkPicturePlayback*>(this)->dumpStream(); 1593 const_cast<SkPicturePlayback*>(this)->dumpStream();
1595 } 1594 }
1596 1595
1597 #endif 1596 #endif
OLDNEW
« no previous file with comments | « src/core/SkPicture.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698