| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkImageGenerator.h" | 8 #include "SkImageGenerator.h" |
| 9 | 9 |
| 10 #ifndef SK_SUPPORT_LEGACY_IMAGEGENERATORAPI | 10 #ifndef SK_SUPPORT_LEGACY_IMAGEGENERATORAPI |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t r
owBytes) { | 51 bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t r
owBytes) { |
| 52 SkASSERT(kIndex_8_SkColorType != info.colorType()); | 52 SkASSERT(kIndex_8_SkColorType != info.colorType()); |
| 53 if (kIndex_8_SkColorType == info.colorType()) { | 53 if (kIndex_8_SkColorType == info.colorType()) { |
| 54 return false; | 54 return false; |
| 55 } | 55 } |
| 56 return this->getPixels(info, pixels, rowBytes, NULL, NULL); | 56 return this->getPixels(info, pixels, rowBytes, NULL, NULL); |
| 57 } | 57 } |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 bool SkImageGenerator::getYUV8Planes(SkISize* sizes, void* planes) { |
| 61 return this->onGetYUV8Planes(sizes, planes); |
| 62 } |
| 63 |
| 64 bool SkImageGenerator::onGetYUV8Planes(SkISize*, void*) { |
| 65 return false; |
| 66 } |
| 67 |
| 60 ////////////////////////////////////////////////////////////////////////////////
///////////// | 68 ////////////////////////////////////////////////////////////////////////////////
///////////// |
| 61 | 69 |
| 62 SkData* SkImageGenerator::onRefEncodedData() { | 70 SkData* SkImageGenerator::onRefEncodedData() { |
| 63 return NULL; | 71 return NULL; |
| 64 } | 72 } |
| 65 | 73 |
| 66 bool SkImageGenerator::onGetInfo(SkImageInfo*) { | 74 bool SkImageGenerator::onGetInfo(SkImageInfo*) { |
| 67 return false; | 75 return false; |
| 68 } | 76 } |
| 69 | 77 |
| 70 bool SkImageGenerator::onGetPixels(const SkImageInfo&, void*, size_t, SkPMColor*
, int*) { | 78 bool SkImageGenerator::onGetPixels(const SkImageInfo&, void*, size_t, SkPMColor*
, int*) { |
| 71 return false; | 79 return false; |
| 72 } | 80 } |
| OLD | NEW |