Searched defs:dstInfo (Results 1 - 25 of 41) sorted by relevance

12

/external/skia/tests/
H A DRenderTargetContextTest.cpp86 SkImageInfo dstInfo = SkImageInfo::MakeN32Premul(kSize, kSize); local
90 bool result = rtCtx->readPixels(dstInfo, dstBuffer.get(), kRowBytes, 0, 0);
/external/skia/src/codec/
H A DSkBmpMaskCodec.cpp27 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 DSkIcoCodec.cpp248 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 DSkMaskSwizzler.cpp387 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 DSkWbmpCodec.cpp33 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 DSkBmpRLECodec.cpp34 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 DSkBmpStandardCodec.cpp38 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 DSkCodec.cpp380 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 DSkCodecPriv.h154 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 DSkWebpCodec.cpp194 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 DSkBmpCodec.cpp616 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 DSkGifCodec.cpp155 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 DSkSwizzler.cpp810 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 Dencode-srgb.cpp105 SkImageInfo dstInfo = codec->getInfo().makeColorType(colorType) local
108 bitmap->allocPixels(dstInfo);
109 codec->getPixels(dstInfo, bitmap->getPixels(), bitmap->rowBytes());
H A Dreadpixels.cpp133 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 DSkBitmapRegionCodec.cpp136 SkImageInfo dstInfo = fCodec->getInfo().makeColorType(colorType); local
137 return conversion_possible(dstInfo, fCodec->getInfo());
/external/skia/src/gpu/
H A DGrSurfaceContext.h67 * @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 DGrTextureContext.cpp111 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 DSkImage_Generator.cpp51 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 DSkSurface.cpp173 bool SkSurface::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, argument
175 return this->getCanvas()->readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
H A DSkImage_Raster.cpp168 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 DSkPixmap.h185 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 DSkConvertPixels.cpp21 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 DSkPixmap.cpp87 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 DSkCodec.h402 * @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...]

Completed in 545 milliseconds

12