/frameworks/base/opengl/java/android/opengl/ |
D | GLUtils.java | 48 public static int getInternalFormat(Bitmap bitmap) { in getInternalFormat() argument 49 if (bitmap == null) { in getInternalFormat() 52 if (bitmap.isRecycled()) { in getInternalFormat() 55 int result = native_getInternalFormat(bitmap); in getInternalFormat() 70 public static int getType(Bitmap bitmap) { in getType() argument 71 if (bitmap == null) { in getType() 74 if (bitmap.isRecycled()) { in getType() 77 int result = native_getType(bitmap); in getType() 107 Bitmap bitmap, int border) { in texImage2D() argument 108 if (bitmap == null) { in texImage2D() [all …]
|
/frameworks/base/libs/hwui/ |
D | TextureCache.cpp | 106 void TextureCache::operator()(SkBitmap*& bitmap, Texture*& texture) { in operator ()() argument 124 Texture* TextureCache::get(SkBitmap* bitmap) { in get() argument 125 Texture* texture = mCache.get(bitmap); in get() 128 if (bitmap->width() > mMaxTextureSize || bitmap->height() > mMaxTextureSize) { in get() 130 bitmap->width(), bitmap->height(), mMaxTextureSize, mMaxTextureSize); in get() 134 const uint32_t size = bitmap->rowBytes() * bitmap->height(); in get() 144 generateTexture(bitmap, texture, false); in get() 149 bitmap, texture->id, size, mSize); in get() 153 mCache.put(bitmap, texture); in get() 157 } else if (bitmap->getGenerationID() != texture->generation) { in get() [all …]
|
D | TextureCache.h | 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);
|
D | LayerRenderer.cpp | 359 bool LayerRenderer::copyLayer(Layer* layer, SkBitmap* bitmap) { in copyLayer() argument 361 if (layer && bitmap->width() <= caches.maxTextureSize && in copyLayer() 362 bitmap->height() <= caches.maxTextureSize) { in copyLayer() 370 SkAutoLockPixels alp(*bitmap); in copyLayer() 382 switch (bitmap->config()) { in copyLayer() 419 glPixelStorei(GL_PACK_ALIGNMENT, bitmap->bytesPerPixel()); in copyLayer() 427 glTexImage2D(GL_TEXTURE_2D, 0, format, bitmap->width(), bitmap->height(), in copyLayer() 437 renderer.setViewport(bitmap->width(), bitmap->height()); in copyLayer() 439 bitmap->width(), bitmap->height(), !layer->isBlend()); in copyLayer() 442 renderer.translate(0.0f, bitmap->height()); in copyLayer() [all …]
|
D | ShapeCache.h | 339 PathTexture* addTexture(const Entry& entry, SkBitmap* bitmap); 340 void addTexture(const Entry& entry, SkBitmap* bitmap, PathTexture* texture); 348 void initBitmap(SkBitmap& bitmap, uint32_t width, uint32_t height); 371 void generateTexture(SkBitmap& bitmap, Texture* texture); 534 void ShapeCache<Entry>::initBitmap(SkBitmap& bitmap, uint32_t width, uint32_t height) { in initBitmap() argument 535 bitmap.setConfig(SkBitmap::kA8_Config, width, height); in initBitmap() 536 bitmap.allocPixels(); in initBitmap() 537 bitmap.eraseColor(0); in initBitmap() 575 SkBitmap bitmap; in addTexture() local 576 initBitmap(bitmap, width, height); in addTexture() [all …]
|
/frameworks/base/core/jni/android/graphics/ |
D | Bitmap.cpp | 225 SkBitmap bitmap; in Bitmap_creator() local 227 bitmap.setConfig(config, width, height); in Bitmap_creator() 229 jbyteArray buff = GraphicsJNI::allocateJavaPixelRef(env, &bitmap, NULL); in Bitmap_creator() 236 0, 0, width, height, bitmap); in Bitmap_creator() 239 return GraphicsJNI::createBitmap(env, new SkBitmap(bitmap), buff, isMutable, NULL, NULL); in Bitmap_creator() 254 static void Bitmap_destructor(JNIEnv* env, jobject, SkBitmap* bitmap) { in Bitmap_destructor() argument 257 android::uirenderer::Caches::getInstance().resourceCache.destructor(bitmap); in Bitmap_destructor() 261 delete bitmap; in Bitmap_destructor() 264 static jboolean Bitmap_recycle(JNIEnv* env, jobject, SkBitmap* bitmap) { in Bitmap_recycle() argument 267 return android::uirenderer::Caches::getInstance().resourceCache.recycle(bitmap); in Bitmap_recycle() [all …]
|
D | NinePatchImpl.cpp | 40 static bool getColor(const SkBitmap& bitmap, int x, int y, SkColor* c) { in getColor() argument 41 switch (bitmap.getConfig()) { in getColor() 43 *c = SkUnPreMultiply::PMColorToColor(*bitmap.getAddr32(x, y)); in getColor() 46 *c = SkPixel16ToPixel32(*bitmap.getAddr16(x, y)); in getColor() 50 SkPixel4444ToPixel32(*bitmap.getAddr16(x, y))); in getColor() 53 SkColorTable* ctable = bitmap.getColorTable(); in getColor() 55 (*ctable)[*bitmap.getAddr8(x, y)]); in getColor() 71 const SkBitmap& bitmap, const SkPaint& paint, in drawStretchyPatch() argument 80 if (!getColor(bitmap, src.fLeft, src.fTop, &c)) { in drawStretchyPatch() 91 canvas->drawBitmapRect(bitmap, &src, dst, &paint); in drawStretchyPatch() [all …]
|
D | NinePatch.cpp | 31 const SkBitmap& bitmap, const android::Res_png_9patch& chunk, 69 const SkBitmap* bitmap, jbyteArray chunkObj, const SkPaint* paint, in draw() argument 88 NinePatch_Draw(canvas, bounds, *bitmap, *chunk, paint, NULL); in draw() 105 NinePatch_Draw(canvas, bounds, *bitmap, *chunk, paint, NULL); in draw() 113 const SkBitmap* bitmap, jbyteArray chunkObj, const SkPaint* paint, in drawF() argument 118 SkASSERT(bitmap); in drawF() 125 draw(env, canvas, bounds, bitmap, chunkObj, paint, destDensity, srcDensity); in drawF() 129 const SkBitmap* bitmap, jbyteArray chunkObj, const SkPaint* paint, in drawI() argument 134 SkASSERT(bitmap); in drawI() 140 draw(env, canvas, bounds, bitmap, chunkObj, paint, destDensity, srcDensity); in drawI() [all …]
|
D | BitmapFactory.cpp | 139 static SkPixelRef* installPixelRef(SkBitmap* bitmap, SkStream* stream, in installPixelRef() argument 144 if (bitmap->getSize() >= 32 * 1024) { in installPixelRef() 145 pr = new SkImageRef_ashmem(stream, bitmap->config(), sampleSize); in installPixelRef() 147 pr = new SkImageRef_GlobalPool(stream, bitmap->config(), sampleSize); in installPixelRef() 150 bitmap->setPixelRef(pr)->unref(); in installPixelRef() 151 pr->isOpaque(bitmap); in installPixelRef() 212 SkBitmap* bitmap; in doDecode() local 214 bitmap = new SkBitmap; in doDecode() 219 bitmap = (SkBitmap*) env->GetIntField(javaBitmap, gBitmap_nativeBitmapFieldID); in doDecode() 221 prefConfig = bitmap->getConfig(); in doDecode() [all …]
|
/frameworks/ex/photoviewer/src/com/android/ex/photo/loaders/ |
D | PhotoBitmapLoader.java | 53 Bitmap bitmap = ImageUtils.createLocalBitmap(resolver, Uri.parse(mPhotoUri), in loadInBackground() local 55 if (bitmap != null) { in loadInBackground() 56 bitmap.setDensity(DisplayMetrics.DENSITY_MEDIUM); in loadInBackground() 58 return bitmap; in loadInBackground() 70 public void deliverResult(Bitmap bitmap) { in deliverResult() argument 74 if (bitmap != null) { in deliverResult() 75 onReleaseResources(bitmap); in deliverResult() 79 mBitmap = bitmap; in deliverResult() 84 super.deliverResult(bitmap); in deliverResult() 90 if (oldBitmap != null && oldBitmap != bitmap && !oldBitmap.isRecycled()) { in deliverResult() [all …]
|
/frameworks/opt/photoviewer/src/com/android/ex/photo/loaders/ |
D | PhotoBitmapLoader.java | 53 Bitmap bitmap = ImageUtils.createLocalBitmap(resolver, Uri.parse(mPhotoUri), in loadInBackground() local 55 if (bitmap != null) { in loadInBackground() 56 bitmap.setDensity(DisplayMetrics.DENSITY_MEDIUM); in loadInBackground() 58 return bitmap; in loadInBackground() 70 public void deliverResult(Bitmap bitmap) { in deliverResult() argument 74 if (bitmap != null) { in deliverResult() 75 onReleaseResources(bitmap); in deliverResult() 79 mBitmap = bitmap; in deliverResult() 84 super.deliverResult(bitmap); in deliverResult() 90 if (oldBitmap != null && oldBitmap != bitmap && !oldBitmap.isRecycled()) { in deliverResult() [all …]
|
/frameworks/base/media/tests/omxjpegdecoder/ |
D | jpeg_decoder_bench.cpp | 53 SkBitmap* bitmap) { in testDecodeBounds() argument 59 if (!decoder->decode(stream, bitmap, prefConfig, decodeMode)) { in testDecodeBounds() 63 printf("WidthxHeight: %dx%d\n", bitmap->width(), bitmap->height()); in testDecodeBounds() 70 SkBitmap* bitmap) { in testDecodePixels() argument 76 if (!decoder->decode(stream, bitmap, prefConfig, decodeMode)) { in testDecodePixels() 82 return storeBitmapToFile(bitmap, filename); in testDecodePixels() 89 SkBitmap* bitmap = new SkBitmap; in testDecoder() local 90 testDecodePixels(decoder, stream, bitmap); in testDecoder() 91 delete bitmap; in testDecoder() 95 bitmap = new SkBitmap; in testDecoder() [all …]
|
/frameworks/base/core/java/android/view/ |
D | GLES20RecordingCanvas.java | 96 public void drawPatch(Bitmap bitmap, byte[] chunks, RectF dst, Paint paint) { in drawPatch() argument 97 super.drawPatch(bitmap, chunks, dst, paint); in drawPatch() 98 mDisplayList.mBitmaps.add(bitmap); in drawPatch() 103 public void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) { in drawBitmap() argument 104 super.drawBitmap(bitmap, left, top, paint); in drawBitmap() 105 mDisplayList.mBitmaps.add(bitmap); in drawBitmap() 110 public void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) { in drawBitmap() argument 111 super.drawBitmap(bitmap, matrix, paint); in drawBitmap() 112 mDisplayList.mBitmaps.add(bitmap); in drawBitmap() 117 public void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) { in drawBitmap() argument [all …]
|
/frameworks/ex/carousel/java/com/android/ex/carousel/ |
D | CarouselController.java | 370 public void setTextureForItem(int n, Bitmap bitmap) { in setTextureForItem() argument 375 mRenderScript.setTexture(n, bitmap); in setTextureForItem() 395 Bitmap bitmap) { in setDetailTextureForItem() argument 398 mRenderScript.setDetailTexture(n, offx, offy, loffx, loffy, bitmap); in setDetailTextureForItem() 445 public void setDefaultBitmap(Bitmap bitmap) { in setDefaultBitmap() argument 446 mDefaultBitmap = bitmap; in setDefaultBitmap() 448 mRenderScript.setDefaultBitmap(bitmap); in setDefaultBitmap() 460 public void setLoadingBitmap(Bitmap bitmap) { in setLoadingBitmap() argument 461 mLoadingBitmap = bitmap; in setLoadingBitmap() 463 mRenderScript.setLoadingBitmap(bitmap); in setLoadingBitmap() [all …]
|
D | CarouselRS.java | 609 public void setDefaultBitmap(Bitmap bitmap) in setDefaultBitmap() argument 611 mScript.set_defaultTexture(allocationFromBitmap(bitmap, MIPMAP)); in setDefaultBitmap() 614 public void setLoadingBitmap(Bitmap bitmap) in setLoadingBitmap() argument 616 mScript.set_loadingTexture(allocationFromBitmap(bitmap, MIPMAP)); in setLoadingBitmap() 649 private Allocation allocationFromBitmap(Bitmap bitmap, Allocation.MipmapControl mipmap) in allocationFromBitmap() argument 651 if (bitmap == null) return null; in allocationFromBitmap() 652 Allocation allocation = Allocation.createFromBitmap(mRS, bitmap, in allocationFromBitmap() 657 private Allocation allocationFromPool(int n, Bitmap bitmap, Allocation.MipmapControl mipmap) in allocationFromPool() argument 670 allocation = allocationFromBitmap(bitmap, mipmap); in allocationFromPool() 672 } else if (bitmap != null) { in allocationFromPool() [all …]
|
D | CarouselView.java | 349 public void setTextureForItem(int n, Bitmap bitmap) { in setTextureForItem() argument 350 mController.setTextureForItem(n, bitmap); in setTextureForItem() 368 Bitmap bitmap) { in setDetailTextureForItem() argument 369 mController.setDetailTextureForItem(n, offx, offy, loffx, loffy, bitmap); in setDetailTextureForItem() 380 public void setDefaultBitmap(Bitmap bitmap) { in setDefaultBitmap() argument 381 mController.setDefaultBitmap(bitmap); in setDefaultBitmap() 392 public void setLoadingBitmap(Bitmap bitmap) { in setLoadingBitmap() argument 393 mController.setLoadingBitmap(bitmap); in setLoadingBitmap() 415 public void setBackgroundBitmap(Bitmap bitmap) { in setBackgroundBitmap() argument 416 mController.setBackgroundBitmap(bitmap); in setBackgroundBitmap() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | Canvas.java | 125 public Canvas(Bitmap bitmap) { in Canvas() argument 126 if (!bitmap.isMutable()) { in Canvas() 129 throwIfRecycled(bitmap); in Canvas() 130 mNativeCanvas = initRaster(bitmap.ni()); in Canvas() 132 mBitmap = bitmap; in Canvas() 133 mDensity = bitmap.mDensity; in Canvas() 179 public void setBitmap(Bitmap bitmap) { in setBitmap() argument 185 if (bitmap != null) { in setBitmap() 186 if (!bitmap.isMutable()) { in setBitmap() 189 throwIfRecycled(bitmap); in setBitmap() [all …]
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | BitmapDrawable.java | 101 public BitmapDrawable(Bitmap bitmap) { in BitmapDrawable() argument 102 this(new BitmapState(bitmap), null); in BitmapDrawable() 109 public BitmapDrawable(Resources res, Bitmap bitmap) { in BitmapDrawable() argument 110 this(new BitmapState(bitmap), res); in BitmapDrawable() 183 private void setBitmap(Bitmap bitmap) { in setBitmap() argument 184 if (bitmap != mBitmap) { in setBitmap() 185 mBitmap = bitmap; in setBitmap() 186 if (bitmap != null) { in setBitmap() 367 Bitmap bitmap = mBitmap; in draw() local 368 if (bitmap != null) { in draw() [all …]
|
/frameworks/base/media/java/android/media/ |
D | ThumbnailUtils.java | 99 Bitmap bitmap = null; in createImageThumbnail() local 103 bitmap = sizedThumbnailBitmap.mBitmap; in createImageThumbnail() 106 if (bitmap == null) { in createImageThumbnail() 125 bitmap = BitmapFactory.decodeFileDescriptor(fd, null, options); in createImageThumbnail() 144 bitmap = extractThumbnail(bitmap, in createImageThumbnail() 148 return bitmap; in createImageThumbnail() 159 Bitmap bitmap = null; in createVideoThumbnail() local 163 bitmap = retriever.getFrameAtTime(-1); in createVideoThumbnail() 176 if (bitmap == null) return null; in createVideoThumbnail() 180 int width = bitmap.getWidth(); in createVideoThumbnail() [all …]
|
D | FaceDetector.java | 139 public int findFaces(Bitmap bitmap, Face[] faces) in findFaces() argument 144 if (bitmap.getWidth() != mWidth || bitmap.getHeight() != mHeight) { in findFaces() 153 int numFaces = fft_detect(bitmap); in findFaces() 190 native private int fft_detect(Bitmap bitmap); in fft_detect() argument
|
/frameworks/base/tests/DpiTest/src/com/google/android/test/dpi/ |
D | DpiTestActivity.java | 165 Bitmap bitmap; in addBitmapDrawable() local 166 bitmap = loadAndPrintDpi(resource, scale); in addBitmapDrawable() 170 final BitmapDrawable d = new BitmapDrawable(getResources(), bitmap); in addBitmapDrawable() 191 Bitmap bitmap; in addCanvasBitmap() local 192 bitmap = loadAndPrintDpi(resource, scale); in addCanvasBitmap() 194 ScaledBitmapView view = new ScaledBitmapView(this, bitmap); in addCanvasBitmap() 215 Bitmap bitmap; in loadAndPrintDpi() local 217 bitmap = BitmapFactory.decodeResource(getResources(), id); in loadAndPrintDpi() 221 bitmap = BitmapFactory.decodeResource(getResources(), id, opts); in loadAndPrintDpi() 223 return bitmap; in loadAndPrintDpi() [all …]
|
/frameworks/base/services/input/ |
D | SpriteController.h | 59 inline SpriteIcon(const SkBitmap& bitmap, float hotSpotX, float hotSpotY) : in SpriteIcon() 60 bitmap(bitmap), hotSpotX(hotSpotX), hotSpotY(hotSpotY) { } in SpriteIcon() 62 SkBitmap bitmap; member 68 bitmap.copyTo(&bitmapCopy, SkBitmap::kARGB_8888_Config); in copy() 73 bitmap.reset(); in reset() 79 return !bitmap.isNull() && !bitmap.empty(); in isValid()
|
/frameworks/rs/ |
D | rsFont.cpp | 112 uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH) { in drawCachedGlyph() argument 132 bitmap[bY * bitmapW + bX] = tempCol; in drawCachedGlyph() 162 uint8_t *bitmap, uint32_t bitmapW, uint32_t bitmapH) { in renderUTF() argument 206 drawCachedGlyph(cachedGlyph, penX, penY, bitmap, bitmapW, bitmapH); in renderUTF() 250 FT_Bitmap *bitmap = &mFace->glyph->bitmap; in updateGlyphCache() local 258 glyph->mIsValid = state->cacheBitmap(bitmap, &startX, &startY); in updateGlyphCache() 264 uint32_t endX = startX + bitmap->width; in updateGlyphCache() 265 uint32_t endY = startY + bitmap->rows; in updateGlyphCache() 269 glyph->mBitmapWidth = bitmap->width; in updateGlyphCache() 270 glyph->mBitmapHeight = bitmap->rows; in updateGlyphCache() [all …]
|
/frameworks/base/tests/BrowserTestPlugin/jni/event/ |
D | EventPlugin.cpp | 47 void EventPlugin::drawPlugin(const ANPBitmap& bitmap, const ANPRectI& clip) { in drawPlugin() argument 50 inst(), bitmap.width, bitmap.height); in drawPlugin() 58 const float zoomFactorW = static_cast<float>(bitmap.width) / W; in drawPlugin() 59 const float zoomFactorH = static_cast<float>(bitmap.height) / H; in drawPlugin() 71 ANPCanvas* canvas = gCanvasI.newCanvas(&bitmap); in drawPlugin() 147 drawPlugin(evt->data.draw.data.bitmap, evt->data.draw.clip); in handleEvent()
|
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/ |
D | BitmapFactoryTest.java | 41 Bitmap bitmap = BitmapFactory.decodeFileDescriptor(fd); in testBitmapParcelFileDescriptor() local 42 assertNotNull("BitmapFactory returned null", bitmap); in testBitmapParcelFileDescriptor() 43 assertEquals("Bitmap width", 1, bitmap.getWidth()); in testBitmapParcelFileDescriptor() 44 assertEquals("Bitmap height", 1, bitmap.getHeight()); in testBitmapParcelFileDescriptor()
|