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

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

Issue 715233005: cleanup comments (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 SkBitmap subsetBm; 252 SkBitmap subsetBm;
253 SkIRect subset = SkIRect::MakeXYWH(xOffset, yOffset, width, heig ht); 253 SkIRect subset = SkIRect::MakeXYWH(xOffset, yOffset, width, heig ht);
254 if (bitmap->extractSubset(&subsetBm, subset)) { 254 if (bitmap->extractSubset(&subsetBm, subset)) {
255 bitmap->swap(subsetBm); 255 bitmap->swap(subsetBm);
256 return true; 256 return true;
257 } 257 }
258 } 258 }
259 // This bitmap was encoded when written, but we are unable to decode , possibly due to 259 // This bitmap was encoded when written, but we are unable to decode , possibly due to
260 // not having a decoder. 260 // not having a decoder.
261 SkErrorInternals::SetError(kParseError_SkError, 261 SkErrorInternals::SetError(kParseError_SkError,
262 "Could not decode bitmap. Resulting bitma p will be red."); 262 "Could not decode bitmap. Resulting bitma p will be empty.");
263 // Even though we weren't able to decode the pixels, the readbuffer should still be 263 // Even though we weren't able to decode the pixels, the readbuffer should still be
264 // intact, so we return true with an empty bitmap, so we don't for a n abort of the 264 // intact, so we return true with an empty bitmap, so we don't force an abort of the
265 // larger deserialize. 265 // larger deserialize.
266 bitmap->setInfo(SkImageInfo::MakeUnknown(width, height)); 266 bitmap->setInfo(SkImageInfo::MakeUnknown(width, height));
267 return true; 267 return true;
268 } else { 268 } else {
269 // A size of zero means the SkBitmap was simply flattened. 269 // A size of zero means the SkBitmap was simply flattened.
270 if (this->isVersionLT(kNoMoreBitmapFlatten_Version)) { 270 if (this->isVersionLT(kNoMoreBitmapFlatten_Version)) {
271 SkBitmap tmp; 271 SkBitmap tmp;
272 tmp.legacyUnflatten(*this); 272 tmp.legacyUnflatten(*this);
273 // just throw this guy away 273 // just throw this guy away
274 } else { 274 } else {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 return; 360 return;
361 } 361 }
362 } else { 362 } else {
363 if (NULL == this->readFunctionPtr()) { 363 if (NULL == this->readFunctionPtr()) {
364 return; 364 return;
365 } 365 }
366 } 366 }
367 uint32_t sizeRecorded = fReader.readU32(); 367 uint32_t sizeRecorded = fReader.readU32();
368 fReader.skip(sizeRecorded); 368 fReader.skip(sizeRecorded);
369 } 369 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698