/frameworks/base/libs/hwui/ |
H A D | VectorDrawable.cpp | 462 // avoid blurry scaling, we have to draw into a bitmap with exact pixel 463 // size first. This bitmap size is determined by the bounds and the 507 bool redrawNeeded = allocateBitmapIfNeeded(&mStagingCache.bitmap, 509 // draw bitmap cache 511 updateBitmapCache(&mStagingCache.bitmap, true); 517 outCanvas->drawBitmap(mStagingCache.bitmap, 0, 0, 518 mStagingCache.bitmap.width(), mStagingCache.bitmap.height(), 541 bool redrawNeeded = allocateBitmapIfNeeded(&mCache.bitmap, mProperties.getScaledWidth(), 544 updateBitmapCache(&mCache.bitmap, fals 574 canReuseBitmap(const SkBitmap& bitmap, int width, int height) argument [all...] |
H A D | VectorDrawable.h | 60 * VectorDrawables are drawn into bitmap caches first, then the caches are drawn to the given 551 // Draws the VD onto a bitmap cache, then the bitmap cache will be rendered onto the input 552 // canvas. Returns the number of pixels needed for the bitmap cache. 696 // Cap the bitmap size, such that it won't hurt the performance too much 711 SkBitmap bitmap; member in struct:android::uirenderer::VectorDrawable::Tree::Cache
|
/frameworks/base/libs/hwui/font/ |
H A D | Font.cpp | 136 uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) { 158 uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) { 177 uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) { 206 void Font::drawCachedGlyphBitmap(CachedGlyphInfo* glyph, int x, int y, uint8_t* bitmap, argument 227 uint8_t* dst = &(bitmap[bitmapY + dstX + i]); 378 int numGlyphs, int x, int y, RenderMode mode, uint8_t *bitmap, 413 bitmap, bitmapW, bitmapH, bounds, positions); 432 // Get the bitmap for the glyph 135 measureCachedGlyph(CachedGlyphInfo *glyph, int x, int y, uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) argument 157 drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y, uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) argument 176 drawCachedGlyphTransformed(CachedGlyphInfo* glyph, int x, int y, uint8_t* bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* pos) argument 377 render(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs, int x, int y, RenderMode mode, uint8_t *bitmap, uint32_t bitmapW, uint32_t bitmapH, Rect* bounds, const float* positions) argument
|
/frameworks/base/libs/hwui/renderthread/ |
H A D | CanvasContext.cpp | 649 bool CanvasContext::copyLayerInto(DeferredLayerUpdater* layer, SkBitmap* bitmap) { argument 651 return LayerRenderer::copyLayer(mRenderThread.renderState(), layer->backingLayer(), bitmap);
|
H A D | RenderProxy.cpp | 310 SkBitmap* bitmap) { 311 bool success = args->context->copyLayerInto(args->layer, args->bitmap); 315 bool RenderProxy::copyLayerInto(DeferredLayerUpdater* layer, SkBitmap& bitmap) { argument 319 args->bitmap = &bitmap; 621 Surface* surface, SkBitmap* bitmap) { 623 *args->surface, args->bitmap); 626 int RenderProxy::copySurfaceInto(sp<Surface>& surface, SkBitmap* bitmap) { argument 628 args->bitmap = bitmap; 309 CREATE_BRIDGE3(copyLayerInto, CanvasContext* context, DeferredLayerUpdater* layer, SkBitmap* bitmap) argument 620 CREATE_BRIDGE3(copySurfaceInto, RenderThread* thread, Surface* surface, SkBitmap* bitmap) argument [all...] |
/frameworks/base/libs/hwui/tests/common/ |
H A D | TestUtils.h | 137 SkBitmap bitmap; local 140 bitmap.setInfo(info); 141 bitmap.allocPixels(info); 142 return bitmap;
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
H A D | ListViewAnimation.cpp | 84 SkBitmap bitmap = TestUtils::createSkBitmap(size, size); local 85 SkCanvas canvas(bitmap); 101 return bitmap; 107 SkBitmap bitmap = TestUtils::createSkBitmap(size, size); 108 SkCanvas canvas(bitmap); 117 return bitmap;
|
/frameworks/base/libs/hwui/tests/unit/ |
H A D | RecordingCanvasTests.cpp | 243 SkBitmap bitmap; 244 bitmap.setInfo(SkImageInfo::MakeUnknown(25, 25)); 260 canvas.drawBitmap(bitmap, 0, 0, nullptr); 665 SkBitmap bitmap = TestUtils::createSkBitmap(100, 100); local 666 auto dl = TestUtils::createDisplayList<RecordingCanvas>(100, 100, [&bitmap](RecordingCanvas& canvas) { 667 canvas.drawBitmap(bitmap, 0, 0, nullptr); 674 SkBitmap bitmap = TestUtils::createSkBitmap(100, 100); local 675 auto dl = TestUtils::createDisplayList<RecordingCanvas>(100, 100, [&bitmap](RecordingCanvas& canvas) { 677 SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(bitmap, 688 SkBitmap bitmap local [all...] |
H A D | SkiaBehaviorTests.cpp | 37 SkBitmap bitmap; local 39 ASSERT_TRUE(s->isABitmap(&bitmap, nullptr, xy)) 40 << "1x1 bitmap shader must query as bitmap shader"; 43 EXPECT_EQ(origBitmap.pixelRef(), bitmap.pixelRef()); 47 SkBitmap bitmap = TestUtils::createSkBitmap(100, 100); local 48 uint32_t genId = bitmap.getGenerationID(); 49 bitmap.notifyPixelsChanged(); 50 EXPECT_NE(genId, bitmap.getGenerationID());
|
/frameworks/base/libs/hwui/utils/ |
H A D | NinePatchImpl.cpp | 34 static bool getColor(const SkBitmap& bitmap, int x, int y, SkColor* c) { argument 35 switch (bitmap.colorType()) { 37 *c = SkUnPreMultiply::PMColorToColor(*bitmap.getAddr32(x, y)); 40 *c = SkPixel16ToPixel32(*bitmap.getAddr16(x, y)); 44 SkPixel4444ToPixel32(*bitmap.getAddr16(x, y))); 47 SkColorTable* ctable = bitmap.getColorTable(); 49 (*ctable)[*bitmap.getAddr8(x, y)]); 65 const SkBitmap& bitmap, const SkPaint& paint, 74 if (!getColor(bitmap, src.fLeft, src.fTop, &c)) { 85 canvas->drawBitmapRect(bitmap, SkRec 64 drawStretchyPatch(SkCanvas* canvas, SkIRect& src, const SkRect& dst, const SkBitmap& bitmap, const SkPaint& paint, SkColor initColor, uint32_t colorHint, bool hasXfer) argument 98 Draw(SkCanvas* canvas, const SkRect& bounds, const SkBitmap& bitmap, const Res_png_9patch& chunk, const SkPaint* paint, SkRegion** outRegion) argument [all...] |
/frameworks/base/libs/input/ |
H A D | SpriteController.h | 59 inline SpriteIcon(const SkBitmap& bitmap, float hotSpotX, float hotSpotY) : argument 60 bitmap(bitmap), hotSpotX(hotSpotX), hotSpotY(hotSpotY) { } 62 SkBitmap bitmap; member in struct:android::SpriteIcon 68 bitmap.copyTo(&bitmapCopy, kN32_SkColorType); 73 bitmap.reset(); 79 return !bitmap.isNull() && !bitmap.empty(); 102 /* Sets the bitmap that is drawn by the sprite. 103 * The sprite retains a copy of the bitmap fo [all...] |
/frameworks/base/media/java/android/media/ |
H A D | FaceDetector.java | 33 * of a face in a bitmap. 127 * face found. The bitmap must be in 565 format (for now). 129 * @param bitmap the {@link android.graphics.Bitmap} graphic to be analyzed 139 public int findFaces(Bitmap bitmap, Face[] faces) argument 144 if (bitmap.getWidth() != mWidth || bitmap.getHeight() != mHeight) { 146 "bitmap size doesn't match initialization"); 153 int numFaces = fft_detect(bitmap); 190 native private int fft_detect(Bitmap bitmap); argument
|
H A D | MediaMetadataEditor.java | 250 * @param key the identifier of the bitmap to set. The only valid value is 252 * @param bitmap The bitmap for the artwork, or null if there isn't any. 258 public synchronized MediaMetadataEditor putBitmap(int key, Bitmap bitmap) argument 267 mEditorArtwork = bitmap;
|
/frameworks/base/graphics/java/android/graphics/ |
H A D | BitmapShader.java | 22 * Shader used to draw a bitmap as a texture. The bitmap can be repeated or 37 * Call this to create a new shader that will draw with a bitmap. 39 * @param bitmap The bitmap to use inside the shader 40 * @param tileX The tiling mode for x to draw the bitmap in. 41 * @param tileY The tiling mode for y to draw the bitmap in. 43 public BitmapShader(@NonNull Bitmap bitmap, TileMode tileX, TileMode tileY) { argument 44 mBitmap = bitmap; 47 init(nativeCreate(bitmap, tile 60 nativeCreate(Bitmap bitmap, int shaderTileModeX, int shaderTileModeY) argument [all...] |
H A D | Canvas.java | 39 * the draw calls (writing into the bitmap), a drawing primitive (e.g. Rect, 86 // Maximum bitmap size as defined in Skia's native code 104 * Construct an empty raster canvas. Use setBitmap() to specify a bitmap to 106 * this will typically be replaced when a target bitmap is set for the 111 // 0 means no native bitmap 121 * Construct a canvas with the specified bitmap to draw into. The bitmap 125 * bitmap's density. 127 * @param bitmap Specifies a mutable bitmap fo 129 Canvas(@onNull Bitmap bitmap) argument 187 setBitmap(@ullable Bitmap bitmap) argument 1269 throwIfCannotDraw(Bitmap bitmap) argument 1335 drawBitmap(@onNull Bitmap bitmap, float left, float top, @Nullable Paint paint) argument 1363 drawBitmap(@onNull Bitmap bitmap, @Nullable Rect src, @NonNull RectF dst, @Nullable Paint paint) argument 1410 drawBitmap(@onNull Bitmap bitmap, @Nullable Rect src, @NonNull Rect dst, @Nullable Paint paint) argument 1510 drawBitmap(@onNull Bitmap bitmap, @NonNull Matrix matrix, @Nullable Paint paint) argument 1550 drawBitmapMesh(@onNull Bitmap bitmap, int meshWidth, int meshHeight, @NonNull float[] verts, int vertOffset, @Nullable int[] colors, int colorOffset, @Nullable Paint paint) argument 1995 initRaster(Bitmap bitmap) argument 1996 native_setBitmap(long canvasHandle, Bitmap bitmap) argument 2088 native_drawBitmap(long nativeCanvas, Bitmap bitmap, float left, float top, long nativePaintOrZero, int canvasDensity, int screenDensity, int bitmapDensity) argument 2094 native_drawBitmap(long nativeCanvas, Bitmap bitmap, float srcLeft, float srcTop, float srcRight, float srcBottom, float dstLeft, float dstTop, float dstRight, float dstBottom, long nativePaintOrZero, int screenDensity, int bitmapDensity) argument 2103 nativeDrawBitmapMatrix(long nativeCanvas, Bitmap bitmap, long nativeMatrix, long nativePaint) argument 2107 nativeDrawBitmapMesh(long nativeCanvas, Bitmap bitmap, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, long nativePaint) argument [all...] |
/frameworks/base/core/java/com/android/internal/util/ |
H A D | ImageUtils.java | 41 // Size of the smaller bitmap we're actually going to scan. 51 * Checks whether a bitmap is grayscale. Grayscale here means "very close to a perfect 54 * Instead of scanning every pixel in the bitmap, we first resize the bitmap to no more than 58 public boolean isGrayscale(Bitmap bitmap) { argument 59 int height = bitmap.getHeight(); 60 int width = bitmap.getWidth(); 78 mTempCompactBitmapCanvas.drawBitmap(bitmap, mTempMatrix, mTempCompactBitmapPaint); 79 bitmap = mTempCompactBitmap; 85 bitmap [all...] |
H A D | NotificationColorUtil.java | 80 * @param bitmap The bitmap to test. 81 * @return True if the bitmap is grayscale; false if it is color or too large to examine. 83 public boolean isGrayscaleIcon(Bitmap bitmap) { argument 85 if (bitmap.getWidth() > mGrayscaleIconMaxSize 86 || bitmap.getHeight() > mGrayscaleIconMaxSize) { 91 Pair<Boolean, Integer> cached = mGrayscaleBitmapCache.get(bitmap); 93 if (cached.second == bitmap.getGenerationId()) { 101 result = mImageUtils.isGrayscale(bitmap); 105 // assume that it doesn't modify the bitmap whil [all...] |
/frameworks/base/core/jni/android/graphics/ |
H A D | Bitmap.cpp | 64 // to prevent things like a non-opaque RGB565 bitmap 192 "Deleting a bitmap wrapper while there are outstanding strong " 365 "Error, cannot access an invalid/free'd bitmap here!"); 480 static FromColorProc ChooseFromColorProc(const SkBitmap& bitmap) { argument 481 switch (bitmap.colorType()) { 483 return bitmap.alphaType() == kPremul_SkAlphaType ? FromColor_D32 : FromColor_D32_Raw; 485 return bitmap.alphaType() == kPremul_SkAlphaType ? FromColor_D4444 : 722 SkBitmap bitmap; local 723 bitmap.setInfo(SkImageInfo::Make(width, height, colorType, kPremul_SkAlphaType)); 725 Bitmap* nativeBitmap = GraphicsJNI::allocateJavaPixelRef(env, &bitmap, NUL 750 Bitmap* bitmap = allocator.getStorageObjAndReset(); local 762 Bitmap* bitmap = allocator.getStorageObjAndReset(); local 771 Bitmap* bitmap = Bitmap_copyAshmemImpl(env, src, dstCT); local 780 Bitmap* bitmap = Bitmap_copyAshmemImpl(env, src, dstCT); local 785 Bitmap_destruct(Bitmap* bitmap) argument 1084 SkBitmap bitmap; local 1191 SkBitmap bitmap; local 1212 SkBitmap bitmap; local 1240 SkBitmap bitmap; local 1260 SkBitmap bitmap; local 1268 SkBitmap bitmap; local 1283 SkBitmap bitmap; local [all...] |
H A D | BitmapFactory.cpp | 102 // if the collision avoidance above put some divs outside the bounds of the bitmap, 145 virtual bool allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) { argument 148 colorTypeForScaledOutput(bitmap->colorType())); 150 int(bitmap->width() * mScale + 0.5f) * 151 int(bitmap->height() * mScale + 0.5f); 153 ALOGW("bitmap for alloc reuse (%d bytes) can't fit scaled bitmap (%d bytes)", 157 return SkBitmap::HeapAllocator::allocPixelRef(bitmap, ctable); 166 RecyclingPixelAllocator(android::Bitmap* bitmap, unsigned int size) argument 167 : mBitmap(bitmap), mSiz 173 allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) argument 546 jobject bitmap = NULL; local [all...] |
H A D | BitmapRegionDecoder.cpp | 151 // Recycle a bitmap if possible. 157 ALOGW("Warning: Reusing an immutable bitmap as an image decoder target."); 168 // We are required to match the color type of the recycled bitmap. 178 SkBitmap bitmap; local 179 if (!brd->decodeRegion(&bitmap, allocator, subset, sampleSize, colorType, requireUnpremul)) { 185 env->SetIntField(options, gOptions_widthFieldID, bitmap.width()); 186 env->SetIntField(options, gOptions_heightFieldID, bitmap.height()); 194 // If we may have reused a bitmap, we need to indicate that the pixels have changed.
|
H A D | Graphics.cpp | 345 android::Bitmap* GraphicsJNI::getBitmap(JNIEnv* env, jobject bitmap) { argument 347 SkASSERT(bitmap); 348 SkASSERT(env->IsInstanceOf(bitmap, gBitmap_class)); 349 jlong bitmapHandle = env->GetLongField(bitmap, gBitmap_nativePtr); 355 void GraphicsJNI::getSkBitmap(JNIEnv* env, jobject bitmap, SkBitmap* outBitmap) { argument 356 getBitmap(env, bitmap)->getSkBitmap(outBitmap); 359 SkPixelRef* GraphicsJNI::refSkPixelRef(JNIEnv* env, jobject bitmap) { argument 360 return getBitmap(env, bitmap)->refPixelRef(); 397 // Assert that bitmap's SkAlphaType is consistent with isPremultiplied. 409 jobject GraphicsJNI::createBitmap(JNIEnv* env, android::Bitmap* bitmap, argument 442 createBitmapRegionDecoder(JNIEnv* env, SkBitmapRegionDecoder* bitmap) argument 475 computeAllocationSize(const SkBitmap& bitmap, size_t* size) argument 486 allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable) argument 539 allocatePixels(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable) argument 579 allocateAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable) argument 625 mapAshmemPixelRef(JNIEnv* env, SkBitmap* bitmap, SkColorTable* ctable, int fd, void* addr, bool readOnly) argument 671 allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) argument 690 allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) argument 779 allocPixelRef(SkBitmap* bitmap, SkColorTable* ctable) argument [all...] |
H A D | NinePatch.cpp | 96 SkBitmap bitmap; local 97 GraphicsJNI::getSkBitmap(env, jbitmap, &bitmap); 102 NinePatch::Draw(NULL, bounds, bitmap, *chunk, NULL, ®ion);
|
H A D | Shader.cpp | 91 SkBitmap bitmap; local 95 GraphicsJNI::getSkBitmap(env, jbitmap, &bitmap); 97 SkShader* s = SkShader::CreateBitmapShader(bitmap,
|
/frameworks/base/core/jni/android/graphics/pdf/ |
H A D | PdfRenderer.cpp | 161 static void renderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, int destLeft, int destTop, argument 178 fxgeDevice->Attach((CFX_DIBitmap*) bitmap, 0, TRUE); 258 FPDF_BITMAP bitmap = FPDFBitmap_CreateEx(skBitmap.width(), skBitmap.height(), local 261 if (!bitmap) { 262 ALOGE("Erorr creating bitmap"); 279 renderPageBitmap(bitmap, page, destLeft, destTop, destRight,
|
/frameworks/base/core/jni/android/opengl/ |
H A D | util.cpp | 730 SkBitmap bitmap; local 731 GraphicsJNI::getSkBitmap(env, jbitmap, &bitmap); 732 SkColorType colorType = bitmap.colorType(); 742 bitmap.lockPixels(); 743 const int w = bitmap.width(); 744 const int h = bitmap.height(); 745 const void* p = bitmap.getPixels(); 751 const size_t size = bitmap.getSize(); 757 SkColorTable* ctable = bitmap.getColorTable(); 769 bitmap 777 SkBitmap bitmap; local [all...] |