Home | History | Annotate | Download | only in gpu

Lines Matching refs:bitmap

14  based bitmap. [palette (colortable) + indices].
24 static void build_compressed_data(void* buffer, const SkBitmap& bitmap) {
25 SkASSERT(SkBitmap::kIndex8_Config == bitmap.config());
27 SkAutoLockPixels apl(bitmap);
28 if (!bitmap.readyToDraw()) {
29 SkDEBUGFAIL("bitmap not ready to draw!");
33 SkColorTable* ctable = bitmap.getColorTable();
42 if (bitmap.width() == bitmap.rowBytes()) {
43 memcpy(dst, bitmap.getPixels(), bitmap.getSize());
46 size_t width = bitmap.width();
47 size_t rowBytes = bitmap.rowBytes();
48 const char* src = (const char*)bitmap.getPixels();
49 for (int y = 0; y < bitmap.height(); y++) {
59 static void generate_bitmap_cache_id(const SkBitmap& bitmap, GrCacheID* id) {
62 uint32_t genID = bitmap.getGenerationID();
63 size_t offset = bitmap.pixelRefOffset();
64 int16_t width = static_cast<int16_t>(bitmap.width());
65 int16_t height = static_cast<int16_t>(bitmap.height());
79 static void generate_bitmap_texture_desc(const SkBitmap& bitmap, GrTextureDesc* desc) {
81 desc->fWidth = bitmap.width();
82 desc->fHeight = bitmap.height();
83 desc->fConfig = SkBitmapConfig2GrPixelConfig(bitmap.config());
99 const SkBitmap* bitmap = &origBitmap;
102 generate_bitmap_texture_desc(*bitmap, &desc);
104 if (SkBitmap::kIndex8_Config == bitmap->config()) {
108 bitmap->width(), bitmap->height())) {
109 size_t imagesize = bitmap->width() * bitmap->height() +
121 return ctx->createTexture(params, desc, cacheID, storage.get(), bitmap->width());
125 result->writePixels(0, 0, bitmap->width(),
126 bitmap->height(), desc.fConfig,
132 // now bitmap points to our temp, which has been promoted to 32bits
133 bitmap = &tmpBitmap;
134 desc.fConfig = SkBitmapConfig2GrPixelConfig(bitmap->config());
142 return ctx->createTexture(params, desc, cacheID, bitmap->getPixels(), bitmap->rowBytes());
148 // likely be available for this volatile bitmap the next time around.
151 bitmap->width(), bitmap->height(),
153 bitmap->getPixels(),
154 bitmap->rowBytes());
160 const SkBitmap& bitmap,
163 generate_bitmap_cache_id(bitmap, &cacheID);
166 generate_bitmap_texture_desc(bitmap, &desc);
171 const SkBitmap& bitmap,
175 bool cache = !bitmap.isVolatile();
178 // If the bitmap isn't changing try to find a cached copy first.
181 generate_bitmap_cache_id(bitmap, &cacheID);
184 generate_bitmap_texture_desc(bitmap, &desc);
189 result = sk_gr_create_bitmap_texture(ctx, cache, params, bitmap);
193 bitmap.width(), bitmap.height());