Home | History | Annotate | Download | only in images

Lines Matching refs:bm

84     virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
188 const SkBitmap& bm, const char msg[]) {
192 bm.width(), bm.height());
197 bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
215 return return_false(cinfo, *bm, "setjmp");
230 return return_false(cinfo, *bm, "read_header");
279 bm->setConfig(config, cinfo.image_width, cinfo.image_height);
280 bm->setIsOpaque(true);
302 bm->setConfig(config, smpl.scaledWidth(), smpl.scaledHeight());
303 bm->setIsOpaque(true);
306 return return_false(cinfo, *bm, "start_decompress");
314 return return_false(cinfo, *bm, "chooseFromOneChoice");
327 bm->setConfig(config, cinfo.output_width, cinfo.output_height);
328 bm->setIsOpaque(true);
332 if (!this->allocPixelRef(bm, NULL)) {
333 return return_false(cinfo, *bm, "allocPixelRef");
335 SkAutoLockPixels alp(*bm);
336 JSAMPLE* rowptr = (JSAMPLE*)bm->getPixels();
337 INT32 const bpr = bm->rowBytes();
344 return return_false(cinfo, *bm, "read_scanlines");
347 return return_false(cinfo, *bm, "shouldCancelDecode");
370 return return_false(cinfo, *bm, "jpeg colorspace");
376 bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight());
378 bm->setIsOpaque(true);
383 if (!this->allocPixelRef(bm, NULL)) {
384 return return_false(cinfo, *bm, "allocPixelRef");
387 SkAutoLockPixels alp(*bm);
388 if (!sampler.begin(bm, sc, this->getDitherImage())) {
389 return return_false(cinfo, *bm, "sampler.begin");
396 return return_false(cinfo, *bm, "skip rows");
399 // now loop through scanlines until y == bm->height() - 1
404 return return_false(cinfo, *bm, "read_scanlines");
407 return return_false(cinfo, *bm, "shouldCancelDecode");
411 if (bm->height() - 1 == y) {
417 return return_false(cinfo, *bm, "skip rows");
424 return return_false(cinfo, *bm, "skip rows");
428 // SkDebugf("------------------- bm2 size %d [%d %d] %d\n", bm->getSize(), bm->width(), bm->height(), bm->config());
510 bool SkJPEGImageDecoder::onDecodeRegion(SkBitmap* bm, SkIRect region) {
597 cropBitmap(bm, bitmap, actualSampleSize, oriStartX, oriStartY,
614 return return_false(*cinfo, *bm, "jpeg colorspace");
660 cropBitmap(bm, bitmap, actualSampleSize, oriStartX, oriStartY,
816 static WriteScanline ChooseWriter(const SkBitmap& bm) {
817 switch (bm.config()) {
833 virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) {
838 const WriteScanline writer = ChooseWriter(bm);
843 SkAutoLockPixels alp(bm);
844 if (NULL == bm.getPixels()) {
864 cinfo.image_width = bm.width();
865 cinfo.image_height = bm.height();
880 const int width = bm.width();
883 const SkPMColor* colors = ctLocker.lockColors(bm);
884 const void* srcRow = bm.getPixels();
892 srcRow = (const void*)((const char*)srcRow + bm.rowBytes());