Home
last modified time | relevance | path

Searched refs:dstInfo (Results 1 – 25 of 172) sorted by relevance

1234567

/third_party/flutter/skia/src/core/
DSkConvertPixels.cpp17 static bool rect_memcpy(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, in rect_memcpy() argument
21 if (dstInfo.colorType() != srcInfo.colorType()) { in rect_memcpy()
24 if (dstInfo.colorType() != kAlpha_8_SkColorType in rect_memcpy()
30 srcPixels, srcRB, dstInfo.minRowBytes(), dstInfo.height()); in rect_memcpy()
34 static bool swizzle_or_premul(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, in swizzle_or_premul() argument
40 if (!is_8888(dstInfo.colorType()) || in swizzle_or_premul()
49 const bool swapRB = dstInfo.colorType() != srcInfo.colorType(); in swizzle_or_premul()
62 for (int y = 0; y < dstInfo.height(); y++) { in swizzle_or_premul()
63 fn((uint32_t*)dstPixels, (const uint32_t*)srcPixels, dstInfo.width()); in swizzle_or_premul()
70 static bool convert_to_alpha8(const SkImageInfo& dstInfo, void* vdst, size_t dstRB, in convert_to_alpha8() argument
[all …]
/third_party/skia/third_party/externals/libgifcodec/
DSkLibGifCodec.cpp156 void SkLibGifCodec::initializeColorTable(const SkImageInfo& dstInfo, int frameIndex) { in initializeColorTable() argument
157 SkColorType colorTableColorType = dstInfo.colorType(); in initializeColorTable()
179 SkCodec::Result SkLibGifCodec::prepareToDecode(const SkImageInfo& dstInfo, const Options& opts) { in prepareToDecode() argument
185 if (frameIndex > 0 && kRGB_565_SkColorType == dstInfo.colorType()) { in prepareToDecode()
222 fXformBuffer.reset(new uint32_t[dstInfo.width()]); in prepareToDecode()
223 sk_bzero(fXformBuffer.get(), dstInfo.width() * sizeof(uint32_t)); in prepareToDecode()
226 fTmpBuffer.reset(new uint8_t[dstInfo.minRowBytes()]); in prepareToDecode()
228 this->initializeColorTable(dstInfo, frameIndex); in prepareToDecode()
229 this->initializeSwizzler(dstInfo, frameIndex); in prepareToDecode()
235 void SkLibGifCodec::initializeSwizzler(const SkImageInfo& dstInfo, int frameIndex) { in initializeSwizzler() argument
[all …]
/third_party/flutter/skia/src/codec/
DSkGifCodec.cpp151 void SkGifCodec::initializeColorTable(const SkImageInfo& dstInfo, int frameIndex) { in initializeColorTable() argument
152 SkColorType colorTableColorType = dstInfo.colorType(); in initializeColorTable()
174 SkCodec::Result SkGifCodec::prepareToDecode(const SkImageInfo& dstInfo, const Options& opts) { in prepareToDecode() argument
180 if (frameIndex > 0 && kRGB_565_SkColorType == dstInfo.colorType()) { in prepareToDecode()
217 fXformBuffer.reset(new uint32_t[dstInfo.width()]); in prepareToDecode()
218 sk_bzero(fXformBuffer.get(), dstInfo.width() * sizeof(uint32_t)); in prepareToDecode()
221 fTmpBuffer.reset(new uint8_t[dstInfo.minRowBytes()]); in prepareToDecode()
223 this->initializeColorTable(dstInfo, frameIndex); in prepareToDecode()
224 this->initializeSwizzler(dstInfo, frameIndex); in prepareToDecode()
230 void SkGifCodec::initializeSwizzler(const SkImageInfo& dstInfo, int frameIndex) { in initializeSwizzler() argument
[all …]
DSkBmpRLECodec.cpp35 SkCodec::Result SkBmpRLECodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
44 Result result = this->prepareToDecode(dstInfo, opts); in onGetPixels()
50 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); in onGetPixels()
51 if (rows != dstInfo.height()) { in onGetPixels()
55 *rowsDecoded = dstInfo.height(); in onGetPixels()
169 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, in setPixel() argument
171 if (dst && is_coord_necessary(x, fSampleX, dstInfo.width())) { in setPixel()
173 uint32_t row = this->getDstRow(y, dstInfo.height()); in setPixel()
177 switch (dstInfo.colorType()) { in setPixel()
202 const SkImageInfo& dstInfo, uint32_t x, in setRGBPixel() argument
[all …]
DSkBmpStandardCodec.cpp37 SkCodec::Result SkBmpStandardCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
45 if (dstInfo.dimensions() != this->dimensions()) { in onGetPixels()
50 Result result = this->prepareToDecode(dstInfo, opts); in onGetPixels()
54 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); in onGetPixels()
55 if (rows != dstInfo.height()) { in onGetPixels()
172 void SkBmpStandardCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts) { in initializeSwizzler() argument
181 SkImageInfo swizzlerInfo = dstInfo; in initializeSwizzler()
185 if (kPremul_SkAlphaType == dstInfo.alphaType()) { in initializeSwizzler()
196 SkCodec::Result SkBmpStandardCodec::onPrepareToDecode(const SkImageInfo& dstInfo, in onPrepareToDecode() argument
199 this->resetXformBuffer(dstInfo.width()); in onPrepareToDecode()
[all …]
DSkBmpMaskCodec.cpp27 SkCodec::Result SkBmpMaskCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
35 if (dstInfo.dimensions() != this->dimensions()) { in onGetPixels()
40 Result result = this->prepareToDecode(dstInfo, opts); in onGetPixels()
45 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); in onGetPixels()
46 if (rows != dstInfo.height()) { in onGetPixels()
53 SkCodec::Result SkBmpMaskCodec::onPrepareToDecode(const SkImageInfo& dstInfo, in onPrepareToDecode() argument
56 this->resetXformBuffer(dstInfo.width()); in onPrepareToDecode()
59 SkImageInfo swizzlerInfo = dstInfo; in onPrepareToDecode()
62 if (kPremul_SkAlphaType == dstInfo.alphaType()) { in onPrepareToDecode()
78 int SkBmpMaskCodec::decodeRows(const SkImageInfo& dstInfo, in decodeRows() argument
[all …]
DSkHeifCodec.cpp201 bool SkHeifCodec::conversionSupported(const SkImageInfo& dstInfo, bool srcIsOpaque, in conversionSupported() argument
205 if (kUnknown_SkAlphaType == dstInfo.alphaType()) { in conversionSupported()
209 if (kOpaque_SkAlphaType != dstInfo.alphaType()) { in conversionSupported()
214 switch (dstInfo.colorType()) { in conversionSupported()
237 int SkHeifCodec::readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, in readRows() argument
250 int dstWidth = opts.fSubset ? opts.fSubset->width() : dstInfo.width(); in readRows()
365 SkCodec::Result SkHeifCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
394 this->allocateStorage(dstInfo); in onGetPixels()
396 int rows = this->readRows(dstInfo, dst, dstRowBytes, dstInfo.height(), options); in onGetPixels()
397 if (rows < dstInfo.height()) { in onGetPixels()
[all …]
DSkBmpRLECodec.h48 Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
52 SkCodec::Result onPrepareToDecode(const SkImageInfo& dstInfo,
78 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
84 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
90 int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
92 int decodeRLE(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes);
DSkBmpStandardCodec.h49 Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
57 SkCodec::Result onPrepareToDecode(const SkImageInfo& dstInfo,
68 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts);
70 int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
78 void decodeIcoMask(SkStream* stream, const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes);
DSkIcoCodec.cpp247 SkCodec::Result SkIcoCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
259 index = this->chooseCodec(dstInfo.dimensions(), index); in onGetPixels()
265 result = embeddedCodec->getPixels(dstInfo, dst, dstRowBytes, &opts); in onGetPixels()
271 *rowsDecoded = dstInfo.height(); in onGetPixels()
285 SkCodec::Result SkIcoCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, in onStartScanlineDecode() argument
290 index = this->chooseCodec(dstInfo.dimensions(), index); in onStartScanlineDecode()
296 result = embeddedCodec->startScanlineDecode(dstInfo, &options); in onStartScanlineDecode()
319 SkCodec::Result SkIcoCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo, in onStartIncrementalDecode() argument
323 index = this->chooseCodec(dstInfo.dimensions(), index); in onStartIncrementalDecode()
329 switch (embeddedCodec->startIncrementalDecode(dstInfo, in onStartIncrementalDecode()
[all …]
DSkJpegCodec.cpp388 bool SkJpegCodec::conversionSupported(const SkImageInfo& dstInfo, bool srcIsOpaque, in conversionSupported() argument
392 if (kUnknown_SkAlphaType == dstInfo.alphaType()) { in conversionSupported()
396 if (kOpaque_SkAlphaType != dstInfo.alphaType()) { in conversionSupported()
404 switch (dstInfo.colorType()) { in conversionSupported()
495 int SkJpegCodec::readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, in readRows() argument
515 int dstWidth = opts.fSubset ? opts.fSubset->width() : dstInfo.width(); in readRows()
575 SkCodec::Result SkJpegCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
603 this->initializeSwizzler(dstInfo, options, true); in onGetPixels()
606 this->allocateStorage(dstInfo); in onGetPixels()
608 int rows = this->readRows(dstInfo, dst, dstRowBytes, dstInfo.height(), options); in onGetPixels()
[all …]
DSkCodec.cpp226 bool zero_rect(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in zero_rect() argument
232 const auto dimensions = dstInfo.dimensions(); in zero_rect()
249 const SkImageInfo info = dstInfo.makeWH(prevRect.width(), prevRect.height()); in zero_rect()
250 const size_t bpp = dstInfo.bytesPerPixel(); in zero_rect()
334 SkCodec::Result SkCodec::getPixels(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in getPixels() argument
336 SkImageInfo info = dstInfo; in getPixels()
409 SkCodec::Result SkCodec::startIncrementalDecode(const SkImageInfo& dstInfo, void* pixels, in startIncrementalDecode() argument
413 SkImageInfo info = dstInfo; in startIncrementalDecode()
482 SkCodec::Result SkCodec::startScanlineDecode(const SkImageInfo& dstInfo, in startScanlineDecode() argument
487 SkImageInfo info = dstInfo; in startScanlineDecode()
[all …]
/third_party/skia/src/codec/
DSkBmpRLECodec.cpp38 SkCodec::Result SkBmpRLECodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
47 Result result = this->prepareToDecode(dstInfo, opts); in onGetPixels()
53 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); in onGetPixels()
54 if (rows != dstInfo.height()) { in onGetPixels()
58 *rowsDecoded = dstInfo.height(); in onGetPixels()
172 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, in setPixel() argument
174 if (dst && is_coord_necessary(x, fSampleX, dstInfo.width())) { in setPixel()
176 uint32_t row = this->getDstRow(y, dstInfo.height()); in setPixel()
180 switch (dstInfo.colorType()) { in setPixel()
205 const SkImageInfo& dstInfo, uint32_t x, in setRGBPixel() argument
[all …]
DSkBmpStandardCodec.cpp37 SkCodec::Result SkBmpStandardCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
45 if (dstInfo.dimensions() != this->dimensions()) { in onGetPixels()
50 Result result = this->prepareToDecode(dstInfo, opts); in onGetPixels()
54 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); in onGetPixels()
55 if (rows != dstInfo.height()) { in onGetPixels()
172 void SkBmpStandardCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts) { in initializeSwizzler() argument
181 SkImageInfo swizzlerInfo = dstInfo; in initializeSwizzler()
185 if (kPremul_SkAlphaType == dstInfo.alphaType()) { in initializeSwizzler()
196 SkCodec::Result SkBmpStandardCodec::onPrepareToDecode(const SkImageInfo& dstInfo, in onPrepareToDecode() argument
199 this->resetXformBuffer(dstInfo.width()); in onPrepareToDecode()
[all …]
DSkBmpMaskCodec.cpp27 SkCodec::Result SkBmpMaskCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
35 if (dstInfo.dimensions() != this->dimensions()) { in onGetPixels()
40 Result result = this->prepareToDecode(dstInfo, opts); in onGetPixels()
45 int rows = this->decodeRows(dstInfo, dst, dstRowBytes, opts); in onGetPixels()
46 if (rows != dstInfo.height()) { in onGetPixels()
53 SkCodec::Result SkBmpMaskCodec::onPrepareToDecode(const SkImageInfo& dstInfo, in onPrepareToDecode() argument
56 this->resetXformBuffer(dstInfo.width()); in onPrepareToDecode()
59 SkImageInfo swizzlerInfo = dstInfo; in onPrepareToDecode()
62 if (kPremul_SkAlphaType == dstInfo.alphaType()) { in onPrepareToDecode()
78 int SkBmpMaskCodec::decodeRows(const SkImageInfo& dstInfo, in decodeRows() argument
[all …]
DSkHeifCodec.cpp202 bool SkHeifCodec::conversionSupported(const SkImageInfo& dstInfo, bool srcIsOpaque, in conversionSupported() argument
206 if (kUnknown_SkAlphaType == dstInfo.alphaType()) { in conversionSupported()
210 if (kOpaque_SkAlphaType != dstInfo.alphaType()) { in conversionSupported()
215 switch (dstInfo.colorType()) { in conversionSupported()
238 int SkHeifCodec::readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, in readRows() argument
251 int dstWidth = opts.fSubset ? opts.fSubset->width() : dstInfo.width(); in readRows()
364 SkCodec::Result SkHeifCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
389 this->allocateStorage(dstInfo); in onGetPixels()
391 int rows = this->readRows(dstInfo, dst, dstRowBytes, dstInfo.height(), options); in onGetPixels()
392 if (rows < dstInfo.height()) { in onGetPixels()
[all …]
DSkBmpRLECodec.h48 Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
52 SkCodec::Result onPrepareToDecode(const SkImageInfo& dstInfo,
78 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
84 const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
90 int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
92 int decodeRLE(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes);
DSkBmpStandardCodec.h49 Result onGetPixels(const SkImageInfo& dstInfo, void* dst,
57 SkCodec::Result onPrepareToDecode(const SkImageInfo& dstInfo,
68 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& opts);
70 int decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
78 void decodeIcoMask(SkStream* stream, const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes);
DSkIcoCodec.cpp254 SkCodec::Result SkIcoCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
266 index = this->chooseCodec(dstInfo.dimensions(), index); in onGetPixels()
272 result = embeddedCodec->getPixels(dstInfo, dst, dstRowBytes, &opts); in onGetPixels()
278 *rowsDecoded = dstInfo.height(); in onGetPixels()
292 SkCodec::Result SkIcoCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, in onStartScanlineDecode() argument
297 index = this->chooseCodec(dstInfo.dimensions(), index); in onStartScanlineDecode()
303 result = embeddedCodec->startScanlineDecode(dstInfo, &options); in onStartScanlineDecode()
326 SkCodec::Result SkIcoCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo, in onStartIncrementalDecode() argument
330 index = this->chooseCodec(dstInfo.dimensions(), index); in onStartIncrementalDecode()
336 switch (embeddedCodec->startIncrementalDecode(dstInfo, in onStartIncrementalDecode()
[all …]
DSkJpegCodec.cpp337 bool SkJpegCodec::conversionSupported(const SkImageInfo& dstInfo, bool srcIsOpaque, in conversionSupported() argument
341 if (kUnknown_SkAlphaType == dstInfo.alphaType()) { in conversionSupported()
345 if (kOpaque_SkAlphaType != dstInfo.alphaType()) { in conversionSupported()
353 switch (dstInfo.colorType()) { in conversionSupported()
444 int SkJpegCodec::readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, in readRows() argument
464 int dstWidth = opts.fSubset ? opts.fSubset->width() : dstInfo.width(); in readRows()
524 SkCodec::Result SkJpegCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
552 this->initializeSwizzler(dstInfo, options, true); in onGetPixels()
555 if (!this->allocateStorage(dstInfo)) { in onGetPixels()
559 int rows = this->readRows(dstInfo, dst, dstRowBytes, dstInfo.height(), options); in onGetPixels()
[all …]
DSkJpegCodec.h44 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, const Options&,
107 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options,
109 bool SK_WARN_UNUSED_RESULT allocateStorage(const SkImageInfo& dstInfo);
110 int readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, const Options&);
116 Result onStartScanlineDecode(const SkImageInfo& dstInfo,
/third_party/skia/src/core/
DSkConvertPixels.cpp17 static bool rect_memcpy(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, in rect_memcpy() argument
21 if (dstInfo.colorType() != srcInfo.colorType()) { in rect_memcpy()
24 if (dstInfo.colorType() != kAlpha_8_SkColorType in rect_memcpy()
30 srcPixels, srcRB, dstInfo.minRowBytes(), dstInfo.height()); in rect_memcpy()
34 static bool swizzle_or_premul(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB, in swizzle_or_premul() argument
40 if (!is_8888(dstInfo.colorType()) || in swizzle_or_premul()
49 const bool swapRB = dstInfo.colorType() != srcInfo.colorType(); in swizzle_or_premul()
62 for (int y = 0; y < dstInfo.height(); y++) { in swizzle_or_premul()
63 fn((uint32_t*)dstPixels, (const uint32_t*)srcPixels, dstInfo.width()); in swizzle_or_premul()
70 static bool convert_to_alpha8(const SkImageInfo& dstInfo, void* vdst, size_t dstRB, in convert_to_alpha8() argument
[all …]
/third_party/flutter/skia/tests/
DGrUploadPixelsTests.cpp39 SkImageInfo dstInfo = SkImageInfo::Make(kWidth, kHeight, ct, kPremul_SkAlphaType); in basic_texture_test() local
41 bool result = sContext->readPixels(dstInfo, dstBuffer, 0, {0, 0}); in basic_texture_test()
48 dstInfo = SkImageInfo::Make(10, 2, ct, kPremul_SkAlphaType); in basic_texture_test()
49 result = sContext->writePixels(dstInfo, srcBuffer, 0, {2, 10}); in basic_texture_test()
54 result = sContext->readPixels(dstInfo, dstBuffer, 0, {2, 10}); in basic_texture_test()
71 SkImageInfo dstInfo = SkImageInfo::Make(kWidth, kHeight, ct, kPremul_SkAlphaType); in basic_texture_test() local
73 bool result = sContext->readPixels(dstInfo, dstBuffer, 0, {0, 0}); in basic_texture_test()
80 dstInfo = SkImageInfo::Make(4, 5, ct, kPremul_SkAlphaType); in basic_texture_test()
81 result = sContext->writePixels(dstInfo, srcBuffer, 0, {5, 4}); in basic_texture_test()
86 result = sContext->readPixels(dstInfo, dstBuffer, 0, {5, 4}); in basic_texture_test()
/third_party/flutter/skia/src/gpu/
DGrSurfaceContext.cpp96 auto dstInfo = origDstInfo; in readPixels() local
97 if (!dstInfo.clip(this->width(), this->height(), &pt, &dst, rowBytes)) { in readPixels()
101 tightRowBytes = dstInfo.minRowBytes(); in readPixels()
104 dstInfo.alphaType() == kPremul_SkAlphaType; in readPixels()
106 dstInfo.alphaType() == kUnpremul_SkAlphaType; in readPixels()
109 dstInfo.colorSpace()); in readPixels()
120 (GrColorType::kRGBA_8888 == dstInfo.colorType() || in readPixels()
121 GrColorType::kBGRA_8888 == dstInfo.colorType()) && in readPixels()
140 SkBackingFit::kApprox, dstInfo.width(), dstInfo.height(), colorType, std::move(cs), in readPixels()
151 if (dstInfo.colorType() == GrColorType::kBGRA_8888) { in readPixels()
[all …]
DGrDataUtils.cpp491 bool GrConvertPixels(const GrPixelInfo& dstInfo, void* dst, size_t dstRB, in GrConvertPixels() argument
495 if (!srcInfo.isValid() || !dstInfo.isValid()) { in GrConvertPixels()
501 if (dstInfo.width() != srcInfo.width() || srcInfo.height() != dstInfo.height()) { in GrConvertPixels()
504 if (GrColorTypeComponentFlags(dstInfo.colorType()) & kGray_SkColorTypeComponentFlag) { in GrConvertPixels()
508 if (dstRB < dstInfo.minRowBytes() || srcRB < srcInfo.minRowBytes()) { in GrConvertPixels()
513 size_t dstBpp = dstInfo.bpp(); in GrConvertPixels()
520 dstInfo.alphaType() == kPremul_SkAlphaType; in GrConvertPixels()
522 dstInfo.alphaType() == kUnpremul_SkAlphaType; in GrConvertPixels()
524 premul || unpremul || !SkColorSpace::Equals(srcInfo.colorSpace(), dstInfo.colorSpace()); in GrConvertPixels()
526 if (srcInfo.colorType() == dstInfo.colorType() && !alphaOrCSConversion) { in GrConvertPixels()
[all …]

1234567