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

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

Issue 1937053002: Remove (almost) unused read/writeFunctionPtr API. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « src/core/SkValidatingReadBuffer.h ('k') | tests/ImageFilterTest.cpp » ('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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkErrorInternals.h" 9 #include "SkErrorInternals.h"
10 #include "SkValidatingReadBuffer.h" 10 #include "SkValidatingReadBuffer.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 size_t offset = fReader.offset(); 274 size_t offset = fReader.offset();
275 obj = (*factory)(*this); 275 obj = (*factory)(*this);
276 // check that we read the amount we expected 276 // check that we read the amount we expected
277 size_t sizeRead = fReader.offset() - offset; 277 size_t sizeRead = fReader.offset() - offset;
278 this->validate(sizeRecorded == sizeRead); 278 this->validate(sizeRecorded == sizeRead);
279 if (fError) { 279 if (fError) {
280 obj = nullptr; 280 obj = nullptr;
281 } 281 }
282 return obj.release(); 282 return obj.release();
283 } 283 }
284
285 void SkValidatingReadBuffer::skipFlattenable() {
286 SkString name;
287 this->readString(&name);
288 if (fError) {
289 return;
290 }
291 uint32_t sizeRecorded = this->readUInt();
292 this->skip(sizeRecorded);
293 }
OLDNEW
« no previous file with comments | « src/core/SkValidatingReadBuffer.h ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698