Home | History | Annotate | Download | only in gpu

Lines Matching defs:bitmap

31  based bitmap. [palette (colortable) + indices].
41 static void build_index8_data(void* buffer, const SkBitmap& bitmap) {
42 SkASSERT(kIndex_8_SkColorType == bitmap.colorType());
44 SkAutoLockPixels alp(bitmap);
45 if (!bitmap.readyToDraw()) {
46 SkDEBUGFAIL("bitmap not ready to draw!");
50 SkColorTable* ctable = bitmap.getColorTable();
72 if ((unsigned)bitmap.width() == bitmap.rowBytes()) {
73 memcpy(dst, bitmap.getPixels(), bitmap.getSize());
76 size_t width = bitmap.width();
77 size_t rowBytes = bitmap.rowBytes();
78 const char* src = (const char*)bitmap.getPixels();
79 for (int y = 0; y < bitmap.height(); y++) {
124 static void make_unstretched_key(const SkBitmap& bitmap, GrUniqueKey* key) {
127 uint32_t genID = bitmap.getGenerationID();
128 SkIPoint origin = bitmap.pixelRefOrigin();
129 uint32_t width = SkToU16(bitmap.width());
130 uint32_t height = SkToU16(bitmap.height());
140 static void make_bitmap_keys(const SkBitmap& bitmap,
144 make_unstretched_key(bitmap, key);
150 static void generate_bitmap_texture_desc(const SkBitmap& bitmap, GrSurfaceDesc* desc) {
152 desc->fWidth = bitmap.width();
153 desc->fHeight = bitmap.height();
154 desc->fConfig = SkImageInfo2GrPixelConfig(bitmap.info());
270 // Does the data match the dimensions of the bitmap? If not,
288 // Does the data match the dimensions of the bitmap? If not,
411 const SkBitmap* bitmap = &origBitmap;
414 generate_bitmap_texture_desc(*bitmap, &desc);
416 if (kIndex_8_SkColorType == bitmap->colorType()) {
419 bitmap->width(), bitmap->height());
426 storage.get(), bitmap->width());
429 // now bitmap
430 bitmap = &tmpBitmap;
431 desc.fConfig = SkImageInfo2GrPixelConfig(bitmap->info());
440 // If the bitmap had compressed data and was then uncompressed, it'll still return
442 // the bitmap has available pixels, then they might not be what the decompressed
444 && !(bitmap->readyToDraw())) {
445 GrTexture *texture = load_etc1_texture(ctx, optionalKey, *bitmap, desc);
452 GrTexture *texture = load_yuv_texture(ctx, optionalKey, *bitmap, desc);
457 SkAutoLockPixels alp(*bitmap);
458 if (!bitmap->readyToDraw()) {
463 bitmap->getPixels(), bitmap->rowBytes());
493 const SkBitmap& bitmap,
495 Stretch stretch = get_stretch_type(ctx, bitmap.width(), bitmap.height(), params);
497 // Handle the case where the bitmap is explicitly texture backed.
498 GrTexture* texture = bitmap.getTexture();
504 if (bitmap.isVolatile()) {
517 if (bitmap.isVolatile()) {
522 make_bitmap_keys(bitmap, stretch, &key, &stretchedKey);
528 const SkBitmap& bitmap,
531 Stretch stretch = get_stretch_type(ctx, bitmap.width(), bitmap.height(), params);
533 GrTexture* result = bitmap.getTexture();
540 if (!bitmap.isVolatile()) {
551 return stretch_texture_to_next_pot(result, stretch, bitmap.pixelRef(), stretchedKey);
556 if (!bitmap.isVolatile()) {
557 // If the bitmap isn't changing try to find a cached copy first.
558 make_bitmap_keys(bitmap, stretch, &key, &resizedKey);
567 result = create_bitmap_texture(ctx, bitmap, stretch, key, resizedKey);
574 bitmap.width(), bitmap.height());