Home
last modified time | relevance | path

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

1234567

/external/skqp/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 …]
/external/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.cpp338 bool SkJpegCodec::conversionSupported(const SkImageInfo& dstInfo, bool srcIsOpaque, in conversionSupported() argument
342 if (kUnknown_SkAlphaType == dstInfo.alphaType()) { in conversionSupported()
346 if (kOpaque_SkAlphaType != dstInfo.alphaType()) { in conversionSupported()
354 switch (dstInfo.colorType()) { in conversionSupported()
445 int SkJpegCodec::readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, in readRows() argument
465 int dstWidth = opts.fSubset ? opts.fSubset->width() : dstInfo.width(); in readRows()
525 SkCodec::Result SkJpegCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
553 this->initializeSwizzler(dstInfo, options, true); in onGetPixels()
556 if (!this->allocateStorage(dstInfo)) { in onGetPixels()
560 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,
/external/skqp/src/codec/
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 …]
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 …]
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 …]
DSkHeifCodec.cpp164 bool SkHeifCodec::conversionSupported(const SkImageInfo& dstInfo, bool srcIsOpaque, in conversionSupported() argument
168 if (kUnknown_SkAlphaType == dstInfo.alphaType()) { in conversionSupported()
172 if (kOpaque_SkAlphaType != dstInfo.alphaType()) { in conversionSupported()
177 switch (dstInfo.colorType()) { in conversionSupported()
200 int SkHeifCodec::readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, in readRows() argument
213 int dstWidth = opts.fSubset ? opts.fSubset->width() : dstInfo.width(); in readRows()
255 SkCodec::Result SkHeifCodec::onGetPixels(const SkImageInfo& dstInfo, in onGetPixels() argument
271 this->allocateStorage(dstInfo); in onGetPixels()
273 int rows = this->readRows(dstInfo, dst, dstRowBytes, dstInfo.height(), options); in onGetPixels()
274 if (rows < dstInfo.height()) { in onGetPixels()
[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 …]
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);
DSkHeifCodec.h35 const SkImageInfo& dstInfo,
53 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options);
54 void allocateStorage(const SkImageInfo& dstInfo);
55 int readRows(const SkImageInfo& dstInfo, void* dst,
62 Result onStartScanlineDecode(const SkImageInfo& dstInfo,
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 …]
DSkCodec.cpp198 bool zero_rect(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in zero_rect() argument
200 const auto dimensions = dstInfo.dimensions(); in zero_rect()
217 if (!prevRect.intersect(dstInfo.bounds())) { in zero_rect()
223 const SkImageInfo info = dstInfo.makeWH(prevRect.width(), prevRect.height()); in zero_rect()
224 const size_t bpp = dstInfo.bytesPerPixel(); in zero_rect()
308 SkCodec::Result SkCodec::getPixels(const SkImageInfo& dstInfo, void* pixels, size_t rowBytes, in getPixels() argument
310 SkImageInfo info = dstInfo; in getPixels()
383 SkCodec::Result SkCodec::startIncrementalDecode(const SkImageInfo& dstInfo, void* pixels, in startIncrementalDecode() argument
387 SkImageInfo info = dstInfo; in startIncrementalDecode()
456 SkCodec::Result SkCodec::startScanlineDecode(const SkImageInfo& dstInfo, in startScanlineDecode() argument
[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 …]
/external/skia/third_party/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 …]
/external/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 …]
/external/skqp/tests/
DGrUploadPixelsTests.cpp37 SkImageInfo dstInfo = SkImageInfo::Make(kWidth, kHeight, ct, kPremul_SkAlphaType); in basic_texture_test() local
39 bool result = sContext->readPixels(dstInfo, dstBuffer, 0, 0, 0); in basic_texture_test()
46 dstInfo = SkImageInfo::Make(10, 2, ct, kPremul_SkAlphaType); in basic_texture_test()
47 result = sContext->writePixels(dstInfo, srcBuffer, 0, 2, 10); in basic_texture_test()
52 result = sContext->readPixels(dstInfo, dstBuffer, 0, 2, 10); in basic_texture_test()
67 SkImageInfo dstInfo = SkImageInfo::Make(kWidth, kHeight, ct, kPremul_SkAlphaType); in basic_texture_test() local
69 bool result = sContext->readPixels(dstInfo, dstBuffer, 0, 0, 0); in basic_texture_test()
76 dstInfo = SkImageInfo::Make(4, 5, ct, kPremul_SkAlphaType); in basic_texture_test()
77 result = sContext->writePixels(dstInfo, srcBuffer, 0, 5, 4); in basic_texture_test()
82 result = sContext->readPixels(dstInfo, dstBuffer, 0, 5, 4); in basic_texture_test()
/external/skqp/src/gpu/
DGrSurfaceContext.cpp39 bool GrSurfaceContext::readPixels(const SkImageInfo& dstInfo, void* dstBuffer, in readPixels() argument
47 if (kUnpremul_SkAlphaType == dstInfo.alphaType() && in readPixels()
51 auto colorType = SkColorTypeToGrColorType(dstInfo.colorType()); in readPixels()
55 return fContext->contextPriv().readSurfacePixels(this, x, y, dstInfo.width(), dstInfo.height(), in readPixels()
56 colorType, dstInfo.colorSpace(), dstBuffer, in readPixels()

1234567