| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkBitmapRegionCanvas.h" | 8 #include "SkBitmapRegionCanvas.h" |
| 9 #include "SkBitmapRegionCodec.h" | 9 #include "SkBitmapRegionCodec.h" |
| 10 #include "SkBitmapRegionDecoder.h" | 10 #include "SkBitmapRegionDecoder.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 break; | 42 break; |
| 43 default: | 43 default: |
| 44 SkCodecPrintf("Error: Scanline ordering not supported.\n"); | 44 SkCodecPrintf("Error: Scanline ordering not supported.\n"); |
| 45 return nullptr; | 45 return nullptr; |
| 46 } | 46 } |
| 47 return new SkBitmapRegionCanvas(codec.detach()); | 47 return new SkBitmapRegionCanvas(codec.detach()); |
| 48 } | 48 } |
| 49 case kAndroidCodec_Strategy: { | 49 case kAndroidCodec_Strategy: { |
| 50 SkAutoTDelete<SkAndroidCodec> codec = | 50 SkAutoTDelete<SkAndroidCodec> codec = |
| 51 SkAndroidCodec::NewFromStream(streamDeleter.detach()); | 51 SkAndroidCodec::NewFromStream(streamDeleter.detach()); |
| 52 if (!codec) { | 52 if (NULL == codec) { |
| 53 SkCodecPrintf("Error: Failed to create codec.\n"); | 53 SkCodecPrintf("Error: Failed to create codec.\n"); |
| 54 return nullptr; | 54 return NULL; |
| 55 } | 55 } |
| 56 return new SkBitmapRegionCodec(codec.detach()); | 56 return new SkBitmapRegionCodec(codec.detach()); |
| 57 } | 57 } |
| 58 default: | 58 default: |
| 59 SkASSERT(false); | 59 SkASSERT(false); |
| 60 return nullptr; | 60 return nullptr; |
| 61 } | 61 } |
| 62 } | 62 } |
| OLD | NEW |