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

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

Issue 287063009: Revert of remove unused (by clients) SkUnitMapper (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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/animator/SkDrawGradient.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | 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 2012 Google Inc. 3 * Copyright 2012 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 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkErrorInternals.h" 10 #include "SkErrorInternals.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 if (sizeRecorded != sizeRead) { 328 if (sizeRecorded != sizeRead) {
329 // we could try to fix up the offset... 329 // we could try to fix up the offset...
330 sk_throw(); 330 sk_throw();
331 } 331 }
332 } else { 332 } else {
333 // we must skip the remaining data 333 // we must skip the remaining data
334 fReader.skip(sizeRecorded); 334 fReader.skip(sizeRecorded);
335 } 335 }
336 return obj; 336 return obj;
337 } 337 }
338
339 /**
340 * Needs to follow the same pattern as readFlattenable(), but explicitly skip w hatever data
341 * has been written.
342 */
343 void SkReadBuffer::skipFlattenable() {
344 if (fFactoryCount > 0) {
345 if (0 == fReader.readU32()) {
346 return;
347 }
348 } else if (fFactoryTDArray) {
349 if (0 == fReader.readU32()) {
350 return;
351 }
352 } else {
353 if (NULL == this->readFunctionPtr()) {
354 return;
355 }
356 }
357 uint32_t sizeRecorded = fReader.readU32();
358 fReader.skip(sizeRecorded);
359 }
OLDNEW
« no previous file with comments | « src/animator/SkDrawGradient.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698