Lines Matching defs:bitmap
651 SkBitmap bitmap;
654 Error err = sink->draw(justOneRect, &bitmap, &stream, &log);
779 static bool dump_png(SkBitmap bitmap, const char* path, const char* md5) {
780 const int w = bitmap.width(),
781 h = bitmap.height();
783 // First get the bitmap into N32 color format. The next step will work only there.
784 if (bitmap.colorType() != kN32_SkColorType) {
786 if (!bitmap.copyTo(&n32, kN32_SkColorType)) {
789 bitmap = n32;
792 // Convert our N32 bitmap into unpremul RGBA for libpng.
794 if (!bitmap.readPixels(SkImageInfo::Make(w,h, kRGBA_8888_SkColorType, kUnpremul_SkAlphaType),
799 // We don't need bitmap anymore. Might as well drop our ref.
800 bitmap.reset();
876 // report any errors, and perhaps write out the output: a .png of the bitmap, or a raw stream.
887 SkBitmap bitmap;
891 Error err = task.sink->draw(*task.src, &bitmap, &stream, &log);
909 gDefinitelyThreadSafeWork.add([task,name,bitmap,data]{
913 bitmap.lockPixels();
926 if (bitmap.colorType() == kBGRA_8888_SkColorType) {
928 SkAssertResult(bitmap.copyTo(&swizzle, kRGBA_8888_SkColorType));
931 hash.write(bitmap.getPixels(), bitmap.getSize());
957 SkASSERT(bitmap.drawsNothing());
958 } else if (!bitmap.drawsNothing()) {
959 WriteToDisk(task, md5, ext, nullptr, 0, &bitmap);
971 const SkBitmap* bitmap) {
1015 if (bitmap) {
1016 if (!dump_png(*bitmap, path.c_str(), result.md5.c_str())) {