Lines Matching full:bitmap
23 void force_all_opaque(const SkBitmap& bitmap) {
24 SkASSERT(kN32_SkColorType == bitmap.colorType());
25 if (kN32_SkColorType == bitmap.colorType()) {
29 SkAutoLockPixels lock(bitmap);
30 for (int y = 0; y < bitmap.height(); y++) {
31 for (int x = 0; x < bitmap.width(); x++) {
32 *bitmap.getAddr32(x, y) |= (SK_A32_MASK << SK_A32_SHIFT);
53 void setup_bitmap(SkBitmap* bitmap, int width, int height) {
54 bitmap->allocN32Pixels(width, height);
55 bitmap->eraseColor(SK_ColorTRANSPARENT);
71 SkDebugf("Failed to write the bitmap to %s.\n", fullPath.c_str());
76 sk_sp<SkData> encode_bitmap_for_png(SkBitmap bitmap) {
77 const int w = bitmap.width(),
78 h = bitmap.height();
86 if (bitmap. colorType() == kN32_SkColorType &&
87 bitmap.colorSpace() == srgbColorSpace.get()) {
90 bitmap.lockPixels();
91 auto px = (const uint32_t*)bitmap.getPixels();
105 } else if (bitmap.colorType() == kRGBA_F16_SkColorType) {
108 bitmap.lockPixels();
109 auto px = (const uint64_t*)bitmap.getPixels();
130 if (bitmap.colorType() != kN32_SkColorType) {
132 if (!bitmap.copyTo(&n32, kN32_SkColorType)) {
135 bitmap = n32;
139 if (!bitmap.readPixels(SkImageInfo::Make(w,h, kRGBA_8888_SkColorType,