Home
last modified time | relevance | path

Searched refs:SkBitmap (Results 1 – 25 of 56) sorted by relevance

123

/frameworks/base/libs/hwui/
DTextureCache.h52 class TextureCache: public OnEntryRemoved<SkBitmap*, Texture*> {
62 void operator()(SkBitmap*& bitmap, Texture*& texture);
68 Texture* get(SkBitmap* bitmap);
73 Texture* getTransient(SkBitmap* bitmap);
78 void remove(SkBitmap* bitmap);
83 void removeDeferred(SkBitmap* bitmap);
125 void generateTexture(SkBitmap* bitmap, Texture* texture, bool regenerate = false);
127 void uploadLoFiTexture(bool resize, SkBitmap* bitmap, uint32_t width, uint32_t height);
133 LruCache<SkBitmap*, Texture*> mCache;
143 Vector<SkBitmap*> mGarbage;
DResourceCache.h74 void incrementRefcount(SkBitmap* resource);
81 void incrementRefcountLocked(SkBitmap* resource);
87 void decrementRefcount(SkBitmap* resource);
94 void decrementRefcountLocked(SkBitmap* resource);
102 void destructor(SkBitmap* resource);
108 void destructorLocked(SkBitmap* resource);
113 bool recycle(SkBitmap* resource);
114 bool recycleLocked(SkBitmap* resource);
DTextureCache.cpp37 mCache(LruCache<SkBitmap*, Texture*>::kUnlimitedCapacity), in TextureCache()
61 mCache(LruCache<SkBitmap*, Texture*>::kUnlimitedCapacity), in TextureCache()
106 void TextureCache::operator()(SkBitmap*& bitmap, Texture*& texture) { in operator ()()
124 Texture* TextureCache::get(SkBitmap* bitmap) { in get()
164 Texture* TextureCache::getTransient(SkBitmap* bitmap) { in getTransient()
174 void TextureCache::remove(SkBitmap* bitmap) { in remove()
178 void TextureCache::removeDeferred(SkBitmap* bitmap) { in removeDeferred()
212 void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool regenerate) { in generateTexture()
241 case SkBitmap::kA8_Config: in generateTexture()
247 case SkBitmap::kRGB_565_Config: in generateTexture()
[all …]
DPathCache.h31 class SkBitmap; variable
81 sp<Task<SkBitmap*> > task() const { in task()
85 void setTask(const sp<Task<SkBitmap*> >& task) { in setTask()
96 sp<Task<SkBitmap*> > mTask;
255 PathTexture* addTexture(const PathDescription& entry, SkBitmap* bitmap);
260 void generateTexture(SkBitmap& bitmap, Texture* texture);
261 void generateTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture,
293 class PathTask: public Task<SkBitmap*> {
308 class PathProcessor: public TaskProcessor<SkBitmap*> {
313 virtual void onProcess(const sp<Task<SkBitmap*> >& task);
DAssetAtlas.h55 SkBitmap* bitmap;
96 Entry(SkBitmap* bitmap, int x, int y, bool rotated, in Entry()
163 Entry* getEntry(SkBitmap* const bitmap) const;
169 Texture* getEntryTexture(SkBitmap* const bitmap) const;
189 KeyedVector<SkBitmap*, Entry*> mEntries;
DDisplayListRenderer.h98 virtual status_t drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
99 virtual status_t drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
100 virtual status_t drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
103 virtual status_t drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
104 virtual status_t drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
106 virtual status_t drawPatch(SkBitmap* bitmap, Res_png_9patch* patch,
147 const Vector<SkBitmap*>& getBitmapResources() const { in getBitmapResources()
151 const Vector<SkBitmap*>& getOwnedBitmapResources() const { in getOwnedBitmapResources()
288 inline SkBitmap* refBitmap(SkBitmap* bitmap) { in refBitmap()
298 inline SkBitmap* refBitmapData(SkBitmap* bitmap) { in refBitmapData()
[all …]
DResourceCache.cpp64 void ResourceCache::incrementRefcount(SkBitmap* bitmapResource) { in incrementRefcount()
102 void ResourceCache::incrementRefcountLocked(SkBitmap* bitmapResource) { in incrementRefcountLocked()
135 void ResourceCache::decrementRefcount(SkBitmap* bitmapResource) { in decrementRefcount()
176 void ResourceCache::decrementRefcountLocked(SkBitmap* bitmapResource) { in decrementRefcountLocked()
226 void ResourceCache::destructor(SkBitmap* resource) { in destructor()
231 void ResourceCache::destructorLocked(SkBitmap* resource) { in destructorLocked()
314 bool ResourceCache::recycle(SkBitmap* resource) { in recycle()
323 bool ResourceCache::recycleLocked(SkBitmap* resource) { in recycleLocked()
350 ((SkBitmap*) resource)->setPixels(NULL, NULL); in deleteResourceReferenceLocked()
355 SkBitmap* bitmap = (SkBitmap*) resource; in deleteResourceReferenceLocked()
DPathCache.cpp110 static void initBitmap(SkBitmap& bitmap, uint32_t width, uint32_t height) { in initBitmap()
111 bitmap.setConfig(SkBitmap::kA8_Config, width, height); in initBitmap()
128 static void drawPath(const SkPath *path, const SkPaint* paint, SkBitmap& bitmap, in drawPath()
220 const sp<Task<SkBitmap*> >& task = texture->task(); in removeTexture()
222 SkBitmap* bitmap = task->getResult(); in removeTexture()
275 SkBitmap bitmap; in addTexture()
285 void PathCache::generateTexture(const PathDescription& entry, SkBitmap* bitmap, in generateTexture()
314 void PathCache::generateTexture(SkBitmap& bitmap, Texture* texture) { in generateTexture()
340 TaskProcessor<SkBitmap*>(&caches.tasks), mMaxTextureSize(caches.maxTextureSize) { in PathProcessor()
343 void PathCache::PathProcessor::onProcess(const sp<Task<SkBitmap*> >& task) { in onProcess()
[all …]
DAssetAtlas.cpp77 AssetAtlas::Entry* AssetAtlas::getEntry(SkBitmap* const bitmap) const { in getEntry()
82 Texture* AssetAtlas::getEntryTexture(SkBitmap* const bitmap) const { in getEntryTexture()
116 SkBitmap* bitmap = (SkBitmap*) map[i++]; in createEntries()
/frameworks/base/core/jni/android/graphics/
DBitmap.cpp100 static FromColorProc ChooseFromColorProc(SkBitmap::Config config, bool isPremultiplied) { in ChooseFromColorProc()
102 case SkBitmap::kARGB_8888_Config: in ChooseFromColorProc()
104 case SkBitmap::kARGB_4444_Config: in ChooseFromColorProc()
106 case SkBitmap::kRGB_565_Config: in ChooseFromColorProc()
116 const SkBitmap& dstBitmap, bool isPremultiplied) { in SetPixels()
260 static ToColorProc ChooseToColorProc(const SkBitmap& src, bool isPremultiplied) { in ChooseToColorProc()
262 case SkBitmap::kARGB_8888_Config: in ChooseToColorProc()
265 case SkBitmap::kARGB_4444_Config: in ChooseToColorProc()
268 case SkBitmap::kRGB_565_Config: in ChooseToColorProc()
270 case SkBitmap::kIndex8_Config: in ChooseToColorProc()
[all …]
DNinePatchPeeker.cpp44 table.fPrefFor_8Index_NoAlpha_src = SkBitmap::kIndex8_Config; in peek()
45 table.fPrefFor_8Index_YesAlpha_src = SkBitmap::kIndex8_Config; in peek()
46 table.fPrefFor_8Gray_src = SkBitmap::kARGB_8888_Config; in peek()
47 table.fPrefFor_8bpc_NoAlpha_src = SkBitmap::kARGB_8888_Config; in peek()
48 table.fPrefFor_8bpc_YesAlpha_src = SkBitmap::kARGB_8888_Config; in peek()
DGraphicsJNI.h49 static SkBitmap* getNativeBitmap(JNIEnv*, jobject bitmap);
56 static SkBitmap::Config getNativeBitmapConfig(JNIEnv*, jobject jconfig);
62 static jobject createBitmap(JNIEnv* env, SkBitmap* bitmap, jbyteArray buffer,
65 static jobject createBitmap(JNIEnv* env, SkBitmap* bitmap, int bitmapCreateFlags,
71 static void reinitBitmap(JNIEnv* env, jobject javaBitmap, SkBitmap* bitmap,
80 static jbyteArray allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap,
88 const SkBitmap& dstBitmap, bool isPremultiplied);
147 JavaHeapBitmapRef(JNIEnv *env, SkBitmap* nativeBitmap, jbyteArray buffer);
152 SkBitmap* fNativeBitmap;
161 class JavaPixelAllocator : public SkBitmap::Allocator {
[all …]
DBitmapFactory.cpp125 static SkPixelRef* installPixelRef(SkBitmap* bitmap, SkStreamRewindable* stream, in installPixelRef()
147 static SkBitmap::Config configForScaledOutput(SkBitmap::Config config) { in configForScaledOutput()
149 case SkBitmap::kNo_Config: in configForScaledOutput()
150 case SkBitmap::kIndex8_Config: in configForScaledOutput()
151 return SkBitmap::kARGB_8888_Config; in configForScaledOutput()
158 class ScaleCheckingAllocator : public SkBitmap::HeapAllocator {
164 virtual bool allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) { in allocPixelRef()
166 const int bytesPerPixel = SkBitmap::ComputeBytesPerPixel( in allocPixelRef()
176 return SkBitmap::HeapAllocator::allocPixelRef(bitmap, ctable); in allocPixelRef()
183 class RecyclingPixelAllocator : public SkBitmap::Allocator {
[all …]
DBitmapRegionDecoder.cpp62 bool decodeRegion(SkBitmap* bitmap, const SkIRect& rect, in decodeRegion()
63 SkBitmap::Config pref, int sampleSize) { in decodeRegion()
177 SkBitmap::Config prefConfig = SkBitmap::kNo_Config; in nativeDecodeRegion()
216 SkBitmap* bitmap = NULL; in nativeDecodeRegion()
217 SkAutoTDelete<SkBitmap> adb; in nativeDecodeRegion()
224 bitmap = new SkBitmap; in nativeDecodeRegion()
DNinePatch.cpp32 extern void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, const SkBitmap& bitmap,
89 static void draw(JNIEnv* env, SkCanvas* canvas, SkRect& bounds, const SkBitmap* bitmap, in draw()
119 const SkBitmap* bitmap, Res_png_9patch* chunk, const SkPaint* paint, in drawF()
134 const SkBitmap* bitmap, Res_png_9patch* chunk, const SkPaint* paint, in drawI()
147 static jint getTransparentRegion(JNIEnv* env, jobject, const SkBitmap* bitmap, in getTransparentRegion()
DGraphics.cpp286 SkBitmap* GraphicsJNI::getNativeBitmap(JNIEnv* env, jobject bitmap) { in getNativeBitmap()
290 SkBitmap* b = (SkBitmap*)env->GetIntField(bitmap, gBitmap_nativeInstanceID); in getNativeBitmap()
295 SkBitmap::Config GraphicsJNI::getNativeBitmapConfig(JNIEnv* env, in getNativeBitmapConfig()
299 return SkBitmap::kNo_Config; in getNativeBitmapConfig()
303 if (c < 0 || c >= SkBitmap::kConfigCount) { in getNativeBitmapConfig()
304 c = SkBitmap::kNo_Config; in getNativeBitmapConfig()
306 return static_cast<SkBitmap::Config>(c); in getNativeBitmapConfig()
350 static void assert_premultiplied(const SkBitmap& bitmap, bool isPremultiplied) { in assert_premultiplied()
361 jobject GraphicsJNI::createBitmap(JNIEnv* env, SkBitmap* bitmap, jbyteArray buffer, in createBitmap()
381 jobject GraphicsJNI::createBitmap(JNIEnv* env, SkBitmap* bitmap, int bitmapCreateFlags, in createBitmap()
[all …]
DNinePatchImpl.cpp40 static bool getColor(const SkBitmap& bitmap, int x, int y, SkColor* c) { in getColor()
42 case SkBitmap::kARGB_8888_Config: in getColor()
45 case SkBitmap::kRGB_565_Config: in getColor()
48 case SkBitmap::kARGB_4444_Config: in getColor()
52 case SkBitmap::kIndex8_Config: { in getColor()
71 const SkBitmap& bitmap, const SkPaint& paint, in drawStretchyPatch()
106 const SkBitmap& bitmap, const android::Res_png_9patch& chunk, in NinePatch_Draw()
/frameworks/base/media/tests/omxjpegdecoder/
Domx_jpeg_decoder.h33 extern int storeBitmapToFile(SkBitmap* bitmap, const char* filename);
45 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode mode);
51 SkBitmap* bm);
53 SkBitmap* bm);
54 void configBitmapSize(SkBitmap* bm, SkBitmap::Config pref, int width,
56 SkBitmap::Config getColorSpaceConfig(SkBitmap::Config pref);
Djpeg_decoder_bench.cpp35 virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
53 SkBitmap* bitmap) { in testDecodeBounds()
55 SkBitmap::Config prefConfig = SkBitmap::kARGB_8888_Config; in testDecodeBounds()
70 SkBitmap* bitmap) { in testDecodePixels()
72 SkBitmap::Config prefConfig = SkBitmap::kARGB_8888_Config; in testDecodePixels()
89 SkBitmap* bitmap = new SkBitmap; in testDecoder()
95 bitmap = new SkBitmap; in testDecoder()
Domx_jpeg_decoder.cpp63 extern int storeBitmapToFile(SkBitmap* bitmap, const char* filename) { in storeBitmapToFile()
101 SkBitmap* bm, Mode mode) { in onDecode()
142 const sp<MediaSource>& source, SkBitmap* bm) { in decodeSource()
176 SkBitmap* bm) { in installPixelRef()
186 void OmxJpegImageDecoder::configBitmapSize(SkBitmap* bm, SkBitmap::Config pref, in configBitmapSize()
191 SkBitmap::Config OmxJpegImageDecoder::getColorSpaceConfig( in getColorSpaceConfig()
192 SkBitmap::Config pref) { in getColorSpaceConfig()
196 return SkBitmap::kARGB_8888_Config; in getColorSpaceConfig()
/frameworks/base/native/graphics/jni/
Dbitmap.cpp26 SkBitmap* bm = GraphicsJNI::getNativeBitmap(env, jbitmap); in AndroidBitmap_getInfo()
38 case SkBitmap::kARGB_8888_Config: in AndroidBitmap_getInfo()
41 case SkBitmap::kRGB_565_Config: in AndroidBitmap_getInfo()
44 case SkBitmap::kARGB_4444_Config: in AndroidBitmap_getInfo()
47 case SkBitmap::kA8_Config: in AndroidBitmap_getInfo()
63 SkBitmap* bm = GraphicsJNI::getNativeBitmap(env, jbitmap); in AndroidBitmap_lockPixels()
86 SkBitmap* bm = GraphicsJNI::getNativeBitmap(env, jbitmap); in AndroidBitmap_unlockPixels()
/frameworks/base/core/jni/android/opengl/
Dutil.cpp565 static int checkFormat(SkBitmap::Config config, int format, int type) in checkFormat()
568 case SkBitmap::kIndex8_Config: in checkFormat()
571 case SkBitmap::kARGB_8888_Config: in checkFormat()
572 case SkBitmap::kA8_Config: in checkFormat()
575 case SkBitmap::kARGB_4444_Config: in checkFormat()
576 case SkBitmap::kRGB_565_Config: in checkFormat()
593 static int getInternalFormat(SkBitmap::Config config) in getInternalFormat()
596 case SkBitmap::kA8_Config: in getInternalFormat()
598 case SkBitmap::kARGB_4444_Config: in getInternalFormat()
600 case SkBitmap::kARGB_8888_Config: in getInternalFormat()
[all …]
/frameworks/base/services/jni/
Dcom_android_server_AssetAtlasService.cpp76 static SkBitmap* com_android_server_AssetAtlasService_acquireCanvas(JNIEnv* env, jobject, in com_android_server_AssetAtlasService_acquireCanvas()
79 SkBitmap* bitmap = new SkBitmap; in com_android_server_AssetAtlasService_acquireCanvas()
80 bitmap->setConfig(SkBitmap::kARGB_8888_Config, width, height); in com_android_server_AssetAtlasService_acquireCanvas()
91 jobject canvas, SkBitmap* bitmap) { in com_android_server_AssetAtlasService_releaseCanvas()
111 jobject graphicBuffer, SkBitmap* bitmap) { in com_android_server_AssetAtlasService_upload()
/frameworks/base/core/jni/
Dandroid_view_TextureView.cpp73 static inline SkBitmap::Config convertPixelFormat(int32_t format) { in convertPixelFormat()
76 return SkBitmap::kARGB_8888_Config; in convertPixelFormat()
78 return SkBitmap::kARGB_8888_Config; in convertPixelFormat()
80 return SkBitmap::kRGB_565_Config; in convertPixelFormat()
82 return SkBitmap::kNo_Config; in convertPixelFormat()
156 SkBitmap bitmap; in android_view_TextureView_lockCanvas()
/frameworks/base/cmds/screencap/
Dscreencap.cpp55 static SkBitmap::Config flinger2skia(PixelFormat f) in flinger2skia()
59 return SkBitmap::kRGB_565_Config; in flinger2skia()
61 return SkBitmap::kARGB_8888_Config; in flinger2skia()
177 SkBitmap b; in main()

123