Home
last modified time | relevance | path

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

123

/frameworks/base/libs/hwui/apex/include/android/graphics/
Dbitmap.h88 Bitmap() : mBitmap(nullptr) {} in Bitmap()
90 mBitmap(ABitmap_acquireBitmapFromJava(env, bitmapObj)) {} in Bitmap()
91 Bitmap(const Bitmap& src) : mBitmap(src.mBitmap) { ABitmap_acquireRef(src.mBitmap); } in Bitmap()
92 ~Bitmap() { ABitmap_releaseRef(mBitmap); } in ~Bitmap()
97 ABitmap_releaseRef(mBitmap);
98 mBitmap = other.mBitmap;
99 ABitmap_acquireRef(mBitmap);
107 ABitmap_releaseRef(mBitmap);
108 mBitmap = other.mBitmap;
109 other.mBitmap = nullptr;
[all …]
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DAssetsAtlasActivity.java40 private final Bitmap mBitmap; field in AssetsAtlasActivity.BitmapsView
46 mBitmap = ((BitmapDrawable) d).getBitmap(); in BitmapsView()
56 final Rect src = new Rect(0, 0, mBitmap.getWidth() / 2, mBitmap.getHeight() / 2); in onDraw()
57 final Rect dst = new Rect(0, 0, mBitmap.getWidth(), mBitmap.getHeight()); in onDraw()
59 canvas.drawBitmap(mBitmap, 0.0f, 0.0f, null); in onDraw()
60 canvas.translate(0.0f, mBitmap.getHeight()); in onDraw()
61 canvas.drawBitmap(mBitmap, matrix, null); in onDraw()
62 canvas.translate(0.0f, mBitmap.getHeight()); in onDraw()
63 canvas.drawBitmap(mBitmap, src, dst, null); in onDraw()
DStretchShaderActivity.java60 private Bitmap mBitmap; field in StretchShaderActivity
71 mBitmap = ((BitmapDrawable) getDrawable(R.drawable.sunset1)).getBitmap(); in onCreate()
74 BitmapShader bitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, in onCreate()
239 mBitmap.getWidth(), in onCreate()
240 mBitmap.getHeight()) in onCreate()
318 mStretchDrawable.setBitmap(mBitmap); in onCreate()
323 new LinearLayout.LayoutParams(mBitmap.getWidth(), mBitmap.getHeight())); in onCreate()
385 private Bitmap mBitmap = null; field in StretchShaderActivity.StretchDrawable
403 mBitmap = bitmap; in setBitmap()
418 if (mBitmap != null) { in draw()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/glwallpaper/
DImageWallpaperRenderer.java125 private Bitmap mBitmap; field in ImageWallpaperRenderer.WallpaperTexture
137 if (mBitmap == null) { in use()
138 mBitmap = mWallpaperManager.getBitmap(false /* hardware */); in use()
142 if (mBitmap != null) { in use()
143 mDimensions.set(0, 0, mBitmap.getWidth(), mBitmap.getHeight()); in use()
150 consumer.accept(mBitmap); in use()
154 if (count == 0 && mBitmap != null) { in use()
159 mBitmap.recycle(); in use()
160 mBitmap = null; in use()
170 return mBitmap != null ? Integer.toHexString(mBitmap.hashCode()) : "null"; in getHash()
/frameworks/opt/photoviewer/src/com/android/ex/photo/loaders/
DPhotoBitmapLoader.java37 private Bitmap mBitmap; field in PhotoBitmapLoader
86 Bitmap oldBitmap = mBitmap; in deliverResult()
87 mBitmap = bitmap; in deliverResult()
108 if (mBitmap != null) { in onStartLoading()
113 result.bitmap = mBitmap; in onStartLoading()
117 if (takeContentChanged() || mBitmap == null) { in onStartLoading()
158 if (mBitmap != null) { in onReset()
159 onReleaseResources(mBitmap); in onReset()
160 mBitmap = null; in onReset()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
DBitmapUploadActivity.java34 private Bitmap mBitmap; field in BitmapUploadActivity.UploadView
49 mBitmap.eraseColor(Color.rgb(mColorValue, 255 - mColorValue, 255)); in setColorValue()
61 if (mBitmap == null in onAttachedToWindow()
62 || mBitmap.getWidth() != bitmapSize in onAttachedToWindow()
63 || mBitmap.getHeight() != bitmapSize) { in onAttachedToWindow()
64 mBitmap = Bitmap.createBitmap(bitmapSize, bitmapSize, Bitmap.Config.ARGB_8888); in onAttachedToWindow()
70 if (mBitmap != null) { in onDraw()
72 canvas.drawBitmap(mBitmap, null, mRect, null); in onDraw()
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
DBasicBitmapDrawable.java72 private ReusableBitmap mBitmap; field in BasicBitmapDrawable
115 return mBitmap; in getBitmap()
219 if (mBitmap != null) { in setImage()
220 mBitmap.releaseReference(); in setImage()
221 mBitmap = null; in setImage()
265 mBitmap.releaseReference(); in setBitmap()
267 mBitmap = bmp; in setBitmap()
383 mBitmap.getLogicalWidth(), mBitmap.getLogicalHeight(), in draw()
389 final int orientation = mBitmap.getOrientation(); in draw()
394 new Rect(0, 0, mBitmap.getLogicalWidth(), mBitmap.getLogicalHeight()), in draw()
[all …]
/frameworks/base/graphics/java/android/graphics/
DNinePatch.java83 private final Bitmap mBitmap; field in NinePatch
116 mBitmap = bitmap; in NinePatch()
170 return mBitmap; in getBitmap()
210 return mBitmap.mDensity; in getDensity()
218 return mBitmap.getWidth(); in getWidth()
226 return mBitmap.getHeight(); in getHeight()
235 return mBitmap.hasAlpha(); in hasAlpha()
249 long r = nativeGetTransparentRegion(mBitmap.getNativeInstance(), in getTransparentRegion()
DBitmapShader.java29 /*package*/ Bitmap mBitmap; field in BitmapShader
66 mBitmap = bitmap; in BitmapShader()
76 return nativeCreate(nativeMatrix, mBitmap.getNativeInstance(), mTileX, mTileY, in createNativeInstance()
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/
DUploadedTexture.java62 protected Bitmap mBitmap; field in UploadedTexture
135 if (mBitmap == null) { in getBitmap()
136 mBitmap = onGetBitmap(); in getBitmap()
137 int w = mBitmap.getWidth() + mBorder * 2; in getBitmap()
138 int h = mBitmap.getHeight() + mBorder * 2; in getBitmap()
143 return mBitmap; in getBitmap()
147 Utils.assertTrue(mBitmap != null); in freeBitmap()
148 onFreeBitmap(mBitmap); in freeBitmap()
149 mBitmap = null; in freeBitmap()
169 if (mBitmap != null) freeBitmap(); in invalidateContent()
[all …]
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/
DResourceModifiers.java50 public final Bitmap mBitmap; field in ResourceModifiers
65 mBitmap = BitmapFactory.decodeResource(resources, R.drawable.sunset1); in ResourceModifiers()
66 mTexWidth = mBitmap.getWidth(); in ResourceModifiers()
67 mTexHeight = mBitmap.getHeight(); in ResourceModifiers()
72 mRepeatShader = new BitmapShader(mBitmap, Shader.TileMode.REPEAT, in ResourceModifiers()
75 mTranslatedShader = new BitmapShader(mBitmap, Shader.TileMode.REPEAT, in ResourceModifiers()
82 mScaledShader = new BitmapShader(mBitmap, Shader.TileMode.MIRROR, in ResourceModifiers()
108 final float width = mBitmap.getWidth() / 8.0f; in ResourceModifiers()
109 final float height = mBitmap.getHeight() / 8.0f; in ResourceModifiers()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/imageproc/
DBitmapOverlayFilter.java35 private Bitmap mBitmap; field in BitmapOverlayFilter
108 if (mBitmap != null) { in process()
127 FrameFormat format = ImageFormat.create(mBitmap.getWidth(), in createBitmapFrame()
128 mBitmap.getHeight(), in createBitmapFrame()
133 frame.setBitmap(mBitmap); in createBitmapFrame()
135 mBitmap.recycle(); in createBitmapFrame()
136 mBitmap = null; in createBitmapFrame()
DBitmapSource.java37 private Bitmap mBitmap; field in BitmapSource
66 FrameFormat outputFormat = ImageFormat.create(mBitmap.getWidth(), in loadImage()
67 mBitmap.getHeight(), in loadImage()
71 mImageFrame.setBitmap(mBitmap); in loadImage()
76 mBitmap.recycle(); in loadImage()
78 mBitmap = null; in loadImage()
/frameworks/base/core/java/android/text/style/
DIconMarginSpan.java50 private final Bitmap mBitmap; field in IconMarginSpan
70 mBitmap = bitmap; in IconMarginSpan()
76 return mBitmap.getWidth() + mPad; in getLeadingMargin()
88 x -= mBitmap.getWidth(); in drawLeadingMargin()
91 c.drawBitmap(mBitmap, x, itop, p); in drawLeadingMargin()
99 int ht = mBitmap.getHeight(); in chooseHeight()
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/
DBitmapUploadActivity.java47 private Bitmap mBitmap; field in BitmapUploadActivity.UploadView
62 mBitmap.eraseColor(Color.rgb(mColorValue, 255 - mColorValue, 255)); in setColorValue()
74 if (mBitmap == null in onAttachedToWindow()
75 || mBitmap.getWidth() != bitmapSize in onAttachedToWindow()
76 || mBitmap.getHeight() != bitmapSize) { in onAttachedToWindow()
77 mBitmap = Bitmap.createBitmap(bitmapSize, bitmapSize, Bitmap.Config.ARGB_8888); in onAttachedToWindow()
83 if (mBitmap != null) { in onDraw()
85 canvas.drawBitmap(mBitmap, null, mRect, null); in onDraw()
/frameworks/base/core/java/com/android/internal/graphics/palette/
DPalette.java187 private final Bitmap mBitmap; field in Palette.Builder
205 mBitmap = bitmap; in Builder()
219 mBitmap = null; in Builder()
297 if (mBitmap != null) { in setRegion()
300 mRegion.set(0, 0, mBitmap.getWidth(), mBitmap.getHeight()); in setRegion()
323 if (mBitmap != null) { in generate()
327 Bitmap bitmap = scaleBitmapDown(mBitmap); in generate()
330 if (bitmap != mBitmap && region != null) { in generate()
333 double scale = bitmap.getWidth() / (double) mBitmap.getWidth(); in generate()
348 if (bitmap != mBitmap) { in generate()
[all …]
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/
DFastBitmapDrawable.java52 protected Bitmap mBitmap; field in FastBitmapDrawable
93 mBitmap = b; in FastBitmapDrawable()
113 canvas.drawBitmap(mBitmap, null, bounds, mPaint); in drawInternal()
176 return mBitmap.getWidth(); in getIntrinsicWidth()
181 return mBitmap.getHeight(); in getIntrinsicHeight()
271 return new FastBitmapConstantState(mBitmap, mIconColor, mIsDisabled); in getConstantState()
294 protected final Bitmap mBitmap; field in FastBitmapDrawable.FastBitmapConstantState
299 mBitmap = bitmap; in FastBitmapConstantState()
306 return new FastBitmapDrawable(mBitmap, mIconColor, mIsDisabled); in newDrawable()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/util/
DDrawingTestHelper.java65 private final Bitmap mBitmap; field in DrawingTestHelper
71 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in DrawingTestHelper()
72 mCanvas = new Canvas(mBitmap); in DrawingTestHelper()
85 mBitmap.getPixels(out, 0, mWidth, 0, 0, mWidth, mHeight); in getPixels()
90 return mBitmap.getPixel(x, y); in getPixel()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawable/
DUserIconDrawable.java52 private Bitmap mBitmap; // baked representation. Required for transparent border around badge field in UserIconDrawable
132 mBitmap = null; in setIcon()
148 mBitmap = null; in setIconDrawable()
252 if (mBitmap != null) { in draw()
262 canvas.drawBitmap(mBitmap, 0, 0, mPaint); in draw()
302 return new BitmapDrawable(mBitmap).getConstantState(); in getConstantState()
332 if (mBitmap == null || (mUserDrawable == null && mUserIcon == null)) { in rebake()
336 final Canvas canvas = new Canvas(mBitmap); in rebake()
359 final float badgeTop = mBitmap.getHeight() - badgeDiameter; in rebake()
360 float badgeLeft = mBitmap.getWidth() - badgeDiameter; in rebake()
[all …]
/frameworks/base/graphics/java/android/graphics/drawable/
DBitmapDrawable.java179 if (mBitmapState.mBitmap == null) { in BitmapDrawable()
212 if (mBitmapState.mBitmap == null) { in BitmapDrawable()
229 return mBitmapState.mBitmap; in getBitmap()
233 final Bitmap bitmap = mBitmapState.mBitmap; in computeBitmapSize()
246 if (mBitmapState.mBitmap != bitmap) { in setBitmap()
247 mBitmapState.mBitmap = bitmap; in setBitmap()
290 if (mBitmapState.mBitmap != null) { in setTargetDensity()
328 if (mBitmapState.mBitmap != null) { in setMipMap()
329 mBitmapState.mBitmap.setHasMipMap(mipMap); in setMipMap()
344 return mBitmapState.mBitmap != null && mBitmapState.mBitmap.hasMipMap(); in hasMipMap()
[all …]
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/f32/
DRefocusFilterF32.java81 Bitmap mBitmap = Bitmap.createBitmap(buffers.inputImage.getWidth(), in extractSharpImage() local
83 Allocation mAllocation = Allocation.createFromBitmap(renderScript, mBitmap); in extractSharpImage()
86 mAllocation.copyTo(mBitmap); in extractSharpImage()
87 MediaStoreSaver.savePNG(mBitmap, "sharpF32", name, renderScript.getApplicationContext()); in extractSharpImage()
94 Bitmap mBitmap = Bitmap.createBitmap(buffers.inputImage.getWidth(), in extractFuzzyImage() local
96 Allocation mAllocation = Allocation.createFromBitmap(renderScript, mBitmap); in extractFuzzyImage()
99 mAllocation.copyTo(mBitmap); in extractFuzzyImage()
100 MediaStoreSaver.savePNG(mBitmap, "fuzzyF32", name, renderScript.getApplicationContext()); in extractFuzzyImage()
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/d1new/
DRefocusFilterd1new.java83 Bitmap mBitmap = Bitmap.createBitmap(buffers.inputImage.getWidth(), in extractSharpImage() local
85 Allocation mAllocation = Allocation.createFromBitmap(renderScript, mBitmap); in extractSharpImage()
88 mAllocation.copyTo(mBitmap); in extractSharpImage()
89 MediaStoreSaver.savePNG(mBitmap, "sharpd1new", name, renderScript.getApplicationContext()); in extractSharpImage()
96 Bitmap mBitmap = Bitmap.createBitmap(buffers.inputImage.getWidth(), in extractFuzzyImage() local
98 Allocation mAllocation = Allocation.createFromBitmap(renderScript, mBitmap); in extractFuzzyImage()
101 mAllocation.copyTo(mBitmap); in extractFuzzyImage()
102 MediaStoreSaver.savePNG(mBitmap, "fuzzyd1new", name, renderScript.getApplicationContext()); in extractFuzzyImage()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/renderer/
DPdfManipulationService.java79 private Bitmap mBitmap; field in PdfManipulationService.PdfRendererImpl
189 if (mBitmap != null) { in getBitmapForSize()
190 if (mBitmap.getWidth() == width && mBitmap.getHeight() == height) { in getBitmapForSize()
191 mBitmap.eraseColor(Color.WHITE); in getBitmapForSize()
192 return mBitmap; in getBitmapForSize()
194 mBitmap.recycle(); in getBitmapForSize()
196 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in getBitmapForSize()
197 mBitmap.eraseColor(Color.WHITE); in getBitmapForSize()
198 return mBitmap; in getBitmapForSize()
/frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/
DAdaptiveOutlineDrawable.java61 private Bitmap mBitmap; field in AdaptiveOutlineDrawable
91 mBitmap = bitmap; in init()
143 canvas.drawBitmap(mBitmap, bounds.left + mInsetPx, bounds.top + mInsetPx, null); in draw()
157 return mBitmap.getHeight() + 2 * mInsetPx; in getIntrinsicHeight()
162 return mBitmap.getWidth() + 2 * mInsetPx; in getIntrinsicWidth()
/frameworks/base/libs/hwui/jni/
DBitmap.cpp52 : mBitmap(bitmap) { } in BitmapWrapper()
55 mInfo = mBitmap->info(); in freePixels()
56 mHasHardwareMipMap = mBitmap->hasHardwareMipMap(); in freePixels()
57 mAllocationSize = mBitmap->getAllocationByteCount(); in freePixels()
58 mRowBytes = mBitmap->rowBytes(); in freePixels()
59 mGenerationId = mBitmap->getGenerationID(); in freePixels()
60 mIsHardware = mBitmap->isHardware(); in freePixels()
61 mBitmap.reset(); in freePixels()
65 return mBitmap != nullptr; in valid()
70 return *mBitmap; in bitmap()
[all …]

123