/external/skia/tests/ |
H A D | RenderTargetContextTest.cpp | 86 SkImageInfo dstInfo = SkImageInfo::MakeN32Premul(kSize, kSize); local 90 bool result = rtCtx->readPixels(dstInfo, dstBuffer.get(), kRowBytes, 0, 0);
|
/external/skia/src/codec/ |
H A D | SkBmpMaskCodec.cpp | 27 SkCodec::Result SkBmpMaskCodec::onGetPixels(const SkImageInfo& dstInfo, argument 37 if (dstInfo.dimensions() != this->getInfo().dimensions()) { 42 Result result = this->prepareToDecode(dstInfo, opts, inputColorPtr, inputColorCount); 47 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); 48 if (rows != dstInfo.height()) { 55 SkCodec::Result SkBmpMaskCodec::onPrepareToDecode(const SkImageInfo& dstInfo, argument 58 this->resetXformBuffer(dstInfo.width()); 61 SkImageInfo swizzlerInfo = dstInfo; 64 if (kPremul_SkAlphaType == dstInfo.alphaType()) { 80 int SkBmpMaskCodec::decodeRows(const SkImageInfo& dstInfo, argument [all...] |
H A D | SkIcoCodec.cpp | 248 SkCodec::Result SkIcoCodec::onGetPixels(const SkImageInfo& dstInfo, argument 260 index = this->chooseCodec(dstInfo.dimensions(), index); 266 result = embeddedCodec->getPixels(dstInfo, dst, dstRowBytes, &opts, colorTable, colorCount); 272 *rowsDecoded = dstInfo.height(); 286 SkCodec::Result SkIcoCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, argument 291 index = this->chooseCodec(dstInfo.dimensions(), index); 297 result = embeddedCodec->startScanlineDecode(dstInfo, &options, colorTable, colorCount); 321 SkCodec::Result SkIcoCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo, argument 326 index = this->chooseCodec(dstInfo.dimensions(), index); 332 switch (embeddedCodec->startIncrementalDecode(dstInfo, [all...] |
H A D | SkMaskSwizzler.cpp | 387 SkMaskSwizzler* SkMaskSwizzler::CreateMaskSwizzler(const SkImageInfo& dstInfo, argument 395 switch (dstInfo.colorType()) { 400 switch (dstInfo.alphaType()) { 416 switch (dstInfo.alphaType()) { 436 switch (dstInfo.colorType()) { 441 switch (dstInfo.alphaType()) { 457 switch (dstInfo.alphaType()) { 477 switch (dstInfo.colorType()) { 482 switch (dstInfo.alphaType()) { 498 switch (dstInfo [all...] |
H A D | SkWbmpCodec.cpp | 33 static inline bool valid_color_type(const SkImageInfo& dstInfo) { argument 34 switch (dstInfo.colorType()) { 42 return dstInfo.colorSpace() && dstInfo.colorSpace()->gammaIsLinear(); 191 SkCodec::Result SkWbmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, argument 198 if (!valid_color_type(dstInfo) || 199 !valid_alpha(dstInfo.alphaType(), this->getInfo().alphaType())) 205 setup_color_table(dstInfo.colorType(), inputColorTable, inputColorCount); 208 if (kIndex_8_SkColorType == dstInfo.colorType()) { 213 fSwizzler.reset(this->initializeSwizzler(dstInfo, get_color_pt [all...] |
H A D | SkBmpRLECodec.cpp | 34 SkCodec::Result SkBmpRLECodec::onGetPixels(const SkImageInfo& dstInfo, argument 45 Result result = this->prepareToDecode(dstInfo, opts, inputColorPtr, inputColorCount); 51 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); 52 if (rows != dstInfo.height()) { 56 *rowsDecoded = dstInfo.height(); 176 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, 178 if (dst && is_coord_necessary(x, fSampleX, dstInfo.width())) { 180 uint32_t row = this->getDstRow(y, dstInfo.height()); 184 switch (dstInfo.colorType()) { 209 const SkImageInfo& dstInfo, uint32_ 175 setPixel(void* dst, size_t dstRowBytes, const SkImageInfo& dstInfo, uint32_t x, uint32_t y, uint8_t index) argument 208 setRGBPixel(void* dst, size_t dstRowBytes, const SkImageInfo& dstInfo, uint32_t x, uint32_t y, uint8_t red, uint8_t green, uint8_t blue) argument 243 onPrepareToDecode(const SkImageInfo& dstInfo, const SkCodec::Options& options, SkPMColor inputColorPtr[], int* inputColorCount) argument 292 SkImageInfo dstInfo = info.makeWH(get_scaled_dimension(width, fSampleX), height); local 343 decodeRLE(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes) argument [all...] |
H A D | SkBmpStandardCodec.cpp | 38 SkCodec::Result SkBmpStandardCodec::onGetPixels(const SkImageInfo& dstInfo, argument 48 if (dstInfo.dimensions() != this->getInfo().dimensions()) { 53 Result result = this->prepareToDecode(dstInfo, opts, inputColorPtr, inputColorCount); 57 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); 58 if (rows != dstInfo.height()) { 165 void SkBmpStandardCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts) { argument 183 SkImageInfo swizzlerInfo = dstInfo; 187 if (kPremul_SkAlphaType == dstInfo.alphaType()) { 200 SkCodec::Result SkBmpStandardCodec::onPrepareToDecode(const SkImageInfo& dstInfo, argument 204 fXformOnDecode = apply_xform_on_decode(dstInfo 228 decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, const Options& opts) argument 304 decodeIcoMask(SkStream* stream, const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes) argument [all...] |
H A D | SkCodec.cpp | 380 this->fillIncompleteImage(this->dstInfo(), dst, rowBytes, this->options().fZeroInitialized, 423 uint64_t SkCodec::onGetFillValue(const SkImageInfo& dstInfo) const { 424 switch (dstInfo.colorType()) { 477 bool SkCodec::initializeColorXform(const SkImageInfo& dstInfo, argument 480 bool needsColorCorrectPremul = needs_premul(dstInfo, fEncodedInfo) && 482 if (needs_color_xform(dstInfo, fSrcInfo, needsColorCorrectPremul)) { 483 fColorXform = SkColorSpaceXform_Base::New(fSrcInfo.colorSpace(), dstInfo.colorSpace(),
|
H A D | SkCodecPriv.h | 154 static inline void copy_color_table(const SkImageInfo& dstInfo, SkColorTable* colorTable, argument 156 if (kIndex_8_SkColorType == dstInfo.colorType()) { 301 static inline bool needs_premul(const SkImageInfo& dstInfo, const SkEncodedInfo& encodedInfo) { argument 302 return kPremul_SkAlphaType == dstInfo.alphaType() && 306 static inline bool needs_color_xform(const SkImageInfo& dstInfo, const SkImageInfo& srcInfo, argument 309 if (!dstInfo.colorSpace()) { 314 bool isF16 = kRGBA_F16_SkColorType == dstInfo.colorType(); 317 bool srcDstNotEqual = !SkColorSpace::Equals(srcInfo.colorSpace(), dstInfo.colorSpace());
|
H A D | SkWebpCodec.cpp | 194 SkCodec::Result SkWebpCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, argument 197 if (!conversion_possible(dstInfo, this->getInfo()) || 198 !this->initializeColorXform(dstInfo, options.fPremulBehavior)) 224 SkSampler::Fill(dstInfo, dst, rowBytes, 0, options.fZeroInitialized); 269 if (srcSize != dstInfo.dimensions()) { 273 float scaleX = ((float) dstInfo.width()) / srcSize.width(); 274 float scaleY = ((float) dstInfo.height()) / srcSize.height(); 286 scaledWidth = dstInfo.width(); 287 scaledHeight = dstInfo.height(); 300 webp_decode_mode(dstInfo [all...] |
H A D | SkBmpCodec.cpp | 616 SkCodec::Result SkBmpCodec::prepareToDecode(const SkImageInfo& dstInfo, argument 618 if (!conversion_possible(dstInfo, this->getInfo()) || 619 !this->initializeColorXform(dstInfo, options.fPremulBehavior)) 624 return this->onPrepareToDecode(dstInfo, options, inputColorPtr, inputColorCount); 627 SkCodec::Result SkBmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, argument 629 return prepareToDecode(dstInfo, options, inputColorPtr, inputColorCount); 634 SkImageInfo rowInfo = this->dstInfo().makeWH(this->dstInfo().width(), count); 649 void SkBmpCodec::applyColorXform(const SkImageInfo& dstInfo, void* dst, void* src) const { argument 652 const SkColorSpaceXform::ColorFormat dstFormat = select_xform_format(dstInfo [all...] |
H A D | SkGifCodec.cpp | 155 void SkGifCodec::initializeColorTable(const SkImageInfo& dstInfo, size_t frameIndex) { argument 156 SkColorType colorTableColorType = dstInfo.colorType(); 170 select_xform_format_ct(dstInfo.colorType()); 172 const SkAlphaType xformAlphaType = select_xform_alpha(dstInfo.alphaType(), 184 SkCodec::Result SkGifCodec::prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr, argument 187 if (!conversion_possible(dstInfo, this->getInfo()) || 188 !this->initializeColorXform(dstInfo, opts.fPremulBehavior)) 195 fXformOnDecode = apply_xform_on_decode(dstInfo.colorType(), this->getEncodedInfo().color()); 197 fXformBuffer.reset(new uint32_t[dstInfo.width()]); 198 sk_bzero(fXformBuffer.get(), dstInfo 267 initializeSwizzler(const SkImageInfo& dstInfo, size_t frameIndex) argument 303 onGetPixels(const SkImageInfo& dstInfo, void* pixels, size_t dstRowBytes, const Options& opts, SkPMColor* inputColorPtr, int* inputColorCount, int* rowsDecoded) argument 335 onStartIncrementalDecode(const SkImageInfo& dstInfo, void* pixels, size_t dstRowBytes, const SkCodec::Options& opts, SkPMColor* inputColorPtr, int* inputColorCount) argument 365 const SkImageInfo& dstInfo = this->dstInfo(); local 507 applyXformRow(const SkImageInfo& dstInfo, void* dst, const uint8_t* src) const argument 607 const auto dstInfo = this->dstInfo(); local [all...] |
H A D | SkSwizzler.cpp | 810 const SkImageInfo& dstInfo, 821 const int dstBPP = SkColorTypeBytesPerPixel(dstInfo.colorType()); 828 switch (dstInfo.colorType()) { 879 (kPremul_SkAlphaType == dstInfo.alphaType()); 885 switch (dstInfo.colorType()) { 907 switch (dstInfo.colorType()) { 929 switch (dstInfo.colorType()) { 965 switch (dstInfo.colorType()) { 981 switch (dstInfo.colorType()) { 1006 switch (dstInfo 808 CreateSwizzler(const SkEncodedInfo& encodedInfo, const SkPMColor* ctable, const SkImageInfo& dstInfo, const SkCodec::Options& options, const SkIRect* frame, bool skipFormatConversion) argument [all...] |
/external/skia/gm/ |
H A D | encode-srgb.cpp | 105 SkImageInfo dstInfo = codec->getInfo().makeColorType(colorType) local 108 bitmap->allocPixels(dstInfo); 109 codec->getPixels(dstInfo, bitmap->getPixels(), bitmap->rowBytes());
|
H A D | readpixels.cpp | 133 SkImageInfo dstInfo = SkImageInfo::Make(image->width(), image->height(), dstColorType, local 135 if (!image->readPixels(dstInfo, data->writable_data(), rowBytes, 0, 0, hint)) { 147 dstInfo = dstInfo.makeAlphaType(kPremul_SkAlphaType); 151 clamp_if_necessary(dstInfo, data->writable_data()); 156 sk_sp<SkImage> raw = SkImage::MakeRasterData(dstInfo.makeColorSpace(srgb), data, rowBytes);
|
/external/skia/src/android/ |
H A D | SkBitmapRegionCodec.cpp | 136 SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType); local 137 return conversion_possible(dstInfo, fCodec->getInfo());
|
/external/skia/src/gpu/ |
H A D | GrSurfaceContext.h | 67 * @param dstInfo image info for the destination 76 bool readPixels(const SkImageInfo& dstInfo, void* dstBuffer, size_t dstRowBytes, argument 78 return this->onReadPixels(dstInfo, dstBuffer, dstRowBytes, x, y, flags); 139 virtual bool onReadPixels(const SkImageInfo& dstInfo, void* dstBuffer,
|
H A D | GrTextureContext.cpp | 111 bool GrTextureContext::onReadPixels(const SkImageInfo& dstInfo, void* dstBuffer, argument 114 GrPixelConfig config = SkImageInfo2GrPixelConfig(dstInfo, *fContext->caps()); 120 if (kUnpremul_SkAlphaType == dstInfo.alphaType()) { 130 return tex->readPixels(this->getColorSpace(), x, y, dstInfo.width(), dstInfo.height(), 131 config, dstInfo.colorSpace(), dstBuffer, dstRowBytes, flags);
|
/external/skia/src/image/ |
H A D | SkImage_Generator.cpp | 51 bool SkImage_Generator::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, argument 53 SkColorSpace* dstColorSpace = dstInfo.colorSpace(); 58 return bm.readPixels(dstInfo, dstPixels, dstRB, srcX, srcY); 63 if (fCache.directGeneratePixels(dstInfo, dstPixels, dstRB, srcX, srcY)) { 71 return bm.readPixels(dstInfo, dstPixels, dstRB, srcX, srcY); 107 SkImageInfo dstInfo = fCache.info().makeColorSpace(target); local 108 if (kIndex_8_SkColorType == dstInfo.colorType() || 109 kGray_8_SkColorType == dstInfo.colorType()) { 110 dstInfo = dstInfo [all...] |
H A D | SkSurface.cpp | 173 bool SkSurface::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, argument 175 return this->getCanvas()->readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
|
H A D | SkImage_Raster.cpp | 168 bool SkImage_Raster::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, argument 171 return shallowCopy.readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY); 404 SkImageInfo dstInfo = fBitmap.info().makeColorType(kN32_SkColorType).makeColorSpace(target); local 406 dst.allocPixels(dstInfo);
|
/external/skia/include/core/ |
H A D | SkPixmap.h | 185 bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, 187 bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes) const { argument 188 return this->readPixels(dstInfo, dstPixels, dstRowBytes, 0, 0);
|
/external/skia/src/core/ |
H A D | SkConvertPixels.cpp | 21 static inline bool can_memcpy(const SkImageInfo& dstInfo, const SkImageInfo& srcInfo) { argument 22 if (dstInfo.colorType() != srcInfo.colorType()) { 26 if (kAlpha_8_SkColorType == dstInfo.colorType()) { 30 if (dstInfo.alphaType() != srcInfo.alphaType() && 31 kOpaque_SkAlphaType != dstInfo.alphaType() && 38 return !dstInfo.colorSpace() || 39 SkColorSpace::Equals(dstInfo.colorSpace(), srcInfo.colorSpace()); 54 void swizzle_and_multiply(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, argument 57 const bool swapRB = dstInfo.colorType() != srcInfo.colorType(); 59 if (kPremul_SkAlphaType == dstInfo 90 optimized_color_xform(const SkImageInfo& dstInfo, const SkImageInfo& srcInfo, SkTransferFunctionBehavior behavior) argument 120 apply_color_xform(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, const SkImageInfo& srcInfo, const void* srcPixels, size_t srcRB, SkTransferFunctionBehavior behavior) argument 163 do_index8(const SkImageInfo& dstInfo, T* dstPixels, size_t dstRB, const SkImageInfo& srcInfo, const uint8_t* srcPixels, size_t srcRB, SkColorTable* ctable, SkTransferFunctionBehavior behavior) argument 183 convert_from_index8(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, const SkImageInfo& srcInfo, const uint8_t* srcPixels, size_t srcRB, SkColorTable* ctable, SkTransferFunctionBehavior behavior) argument 276 convert_with_pipeline(const SkImageInfo& dstInfo, void* dstRow, size_t dstRB, const SkImageInfo& srcInfo, const void* srcRow, size_t srcRB, bool isColorAware, SkTransferFunctionBehavior behavior) argument 378 SkConvertPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, const SkImageInfo& srcInfo, const void* srcPixels, size_t srcRB, SkColorTable* ctable, SkTransferFunctionBehavior behavior) argument [all...] |
H A D | SkPixmap.cpp | 87 bool SkPixmap::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, int x, int y) argument 89 if (!SkImageInfoValidConversion(dstInfo, fInfo)) { 93 SkReadPixelsRec rec(dstInfo, dstPixels, dstRB, x, y);
|
/external/skia/include/codec/ |
H A D | SkCodec.h | 402 * @param dstInfo Info of the destination. If the dimensions do not match 405 * if present, or the full image as described in dstInfo. 408 * @param ctable A pointer to a color table. When dstInfo.colorType() is 412 * dstInfo.colorType() is kIndex8, this should be non-NULL. It will 417 Result startIncrementalDecode(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, 420 Result startIncrementalDecode(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, argument 422 return this->startIncrementalDecode(dstInfo, dst, rowBytes, options, nullptr, nullptr); 425 Result startIncrementalDecode(const SkImageInfo& dstInfo, void* dst, size_t rowBytes) { argument 426 return this->startIncrementalDecode(dstInfo, dst, rowBytes, nullptr, nullptr, nullptr); 473 * @param dstInfo Inf 779 const SkImageInfo& dstInfo() const { return fDstInfo; } function in class:SkCodec [all...] |