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

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

Issue 303563002: remove SK_SUPPORT_LEGACY_BITMAPFLATTEN code (Closed) Base URL: https://skia.googlesource.com/skia.git@kill_buildmipmap
Patch Set: Created 6 years, 6 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/SkBitmap.cpp ('k') | src/effects/SkBitmapSource.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 /* 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 259 }
260 } 260 }
261 // This bitmap was encoded when written, but we are unable to decode , possibly due to 261 // This bitmap was encoded when written, but we are unable to decode , possibly due to
262 // not having a decoder. 262 // not having a decoder.
263 SkErrorInternals::SetError(kParseError_SkError, 263 SkErrorInternals::SetError(kParseError_SkError,
264 "Could not decode bitmap. Resulting bitma p will be red."); 264 "Could not decode bitmap. Resulting bitma p will be red.");
265 } else { 265 } else {
266 // A size of zero means the SkBitmap was simply flattened. 266 // A size of zero means the SkBitmap was simply flattened.
267 if (this->isVersionLT(kNoMoreBitmapFlatten_Version)) { 267 if (this->isVersionLT(kNoMoreBitmapFlatten_Version)) {
268 SkBitmap tmp; 268 SkBitmap tmp;
269 tmp.unflatten(*this); 269 tmp.legacyUnflatten(*this);
270 // just throw this guy away 270 // just throw this guy away
271 } else { 271 } else {
272 if (SkBitmap::ReadRawPixels(this, bitmap)) { 272 if (SkBitmap::ReadRawPixels(this, bitmap)) {
273 return true; 273 return true;
274 } 274 }
275 } 275 }
276 } 276 }
277 } 277 }
278 // Could not read the SkBitmap. Use a placeholder bitmap. 278 // Could not read the SkBitmap. Use a placeholder bitmap.
279 bitmap->setConfig(SkImageInfo::MakeUnknown(width, height)); 279 bitmap->setConfig(SkImageInfo::MakeUnknown(width, height));
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return; 357 return;
358 } 358 }
359 } else { 359 } else {
360 if (NULL == this->readFunctionPtr()) { 360 if (NULL == this->readFunctionPtr()) {
361 return; 361 return;
362 } 362 }
363 } 363 }
364 uint32_t sizeRecorded = fReader.readU32(); 364 uint32_t sizeRecorded = fReader.readU32();
365 fReader.skip(sizeRecorded); 365 fReader.skip(sizeRecorded);
366 } 366 }
OLDNEW
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/effects/SkBitmapSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698