| OLD | NEW |
| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 tmp.legacyUnflatten(*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->setInfo(SkImageInfo::MakeUnknown(width, height)); | 279 bitmap->setConfig(SkImageInfo::MakeUnknown(width, height)); |
| 280 return false; | 280 return false; |
| 281 } | 281 } |
| 282 | 282 |
| 283 SkTypeface* SkReadBuffer::readTypeface() { | 283 SkTypeface* SkReadBuffer::readTypeface() { |
| 284 | 284 |
| 285 uint32_t index = fReader.readU32(); | 285 uint32_t index = fReader.readU32(); |
| 286 if (0 == index || index > (unsigned)fTFCount) { | 286 if (0 == index || index > (unsigned)fTFCount) { |
| 287 if (index) { | 287 if (index) { |
| 288 SkDebugf("====== typeface index %d\n", index); | 288 SkDebugf("====== typeface index %d\n", index); |
| 289 } | 289 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |