Home | History | Annotate | Download | only in images

Lines Matching refs:bm

58     virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
147 const SkBitmap& bm, const char msg[]) {
151 bm.width(), bm.height());
156 bool SkJPEGImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) {
174 return return_false(cinfo, *bm, "setjmp");
189 return return_false(cinfo, *bm, "read_header");
238 bm->setConfig(config, cinfo.image_width, cinfo.image_height);
239 bm->setIsOpaque(true);
261 bm->setConfig(config, smpl.scaledWidth(), smpl.scaledHeight());
262 bm->setIsOpaque(true);
265 return return_false(cinfo, *bm, "start_decompress");
273 return return_false(cinfo, *bm, "chooseFromOneChoice");
286 bm->setConfig(config, cinfo.output_width, cinfo.output_height);
287 bm->setIsOpaque(true);
291 if (!this->allocPixelRef(bm, NULL)) {
292 return return_false(cinfo, *bm, "allocPixelRef");
294 SkAutoLockPixels alp(*bm);
295 JSAMPLE* rowptr = (JSAMPLE*)bm->getPixels();
296 INT32 const bpr = bm->rowBytes();
303 return return_false(cinfo, *bm, "read_scanlines");
306 return return_false(cinfo, *bm, "shouldCancelDecode");
329 return return_false(cinfo, *bm, "jpeg colorspace");
335 bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight());
337 bm->setIsOpaque(true);
342 if (!this->allocPixelRef(bm, NULL)) {
343 return return_false(cinfo, *bm, "allocPixelRef");
346 SkAutoLockPixels alp(*bm);
347 if (!sampler.begin(bm, sc, this->getDitherImage())) {
348 return return_false(cinfo, *bm, "sampler.begin");
355 return return_false(cinfo, *bm, "skip rows");
358 // now loop through scanlines until y == bm->height() - 1
363 return return_false(cinfo, *bm, "read_scanlines");
366 return return_false(cinfo, *bm, "shouldCancelDecode");
370 if (bm->height() - 1 == y) {
376 return return_false(cinfo, *bm, "skip rows");
383 return return_false(cinfo, *bm, "skip rows");
387 // SkDebugf("------------------- bm2 size %d [%d %d] %d\n", bm->getSize(), bm->width(), bm->height(), bm->config());
542 static WriteScanline ChooseWriter(const SkBitmap& bm) {
543 switch (bm.config()) {
559 virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) {
564 const WriteScanline writer = ChooseWriter(bm);
569 SkAutoLockPixels alp(bm);
570 if (NULL == bm.getPixels()) {
590 cinfo.image_width = bm.width();
591 cinfo.image_height = bm.height();
606 const int width = bm.width();
609 const SkPMColor* colors = ctLocker.lockColors(bm);
610 const void* srcRow = bm.getPixels();
618 srcRow = (const void*)((const char*)srcRow + bm.rowBytes());