Home
last modified time | relevance | path

Searched refs:Bitmap (Results 1 – 25 of 395) sorted by relevance

12345678910>>...16

/cts/tests/tests/graphics/src/android/graphics/cts/
DBitmapTest.java34 import android.graphics.Bitmap;
35 import android.graphics.Bitmap.CompressFormat;
36 import android.graphics.Bitmap.Config;
97 private Bitmap mBitmap;
155 private Bitmap decodeBytes(byte[] bytes) { in decodeBytes()
176 Bitmap lastBitmap = null; in testCompressWebpLossy()
190 Bitmap result = decodeBytes(webpCompressed); in testCompressWebpLossy()
209 Bitmap result = decodeBytes(webpCompressed); in testCompressWebpLossless()
220 Bitmap result = decodeBytes(webpCompressed); in testCompressWebp100MeansLossless()
228 Bitmap bitmap = Bitmap.createBitmap(1, 1, Config.ALPHA_8); in testCompressAlpha8Fails()
[all …]
DBitmapColorSpaceTest.java27 import android.graphics.Bitmap;
76 Bitmap.Config[] configs = new Bitmap.Config[] { in createWithColorSpace()
77 Bitmap.Config.ARGB_8888, in createWithColorSpace()
78 Bitmap.Config.RGB_565, in createWithColorSpace()
79 Bitmap.Config.ARGB_4444, in createWithColorSpace()
80 Bitmap.Config.RGBA_F16, in createWithColorSpace()
81 Bitmap.Config.RGBA_1010102, in createWithColorSpace()
84 for (Bitmap.Config config : configs) { in createWithColorSpace()
94 Bitmap b = Bitmap.createBitmap(32, 32, config, false, requested); in createWithColorSpace()
107 Bitmap b = Bitmap.createBitmap(32, 32, config, false, requested); in createWithColorSpace()
[all …]
DBitmapShaderTest.java21 import android.graphics.Bitmap;
54 Bitmap.Config.ARGB_8888, in testConfigs()
55 Bitmap.Config.RGBA_1010102 in testConfigs()
61 public void testBitmapShader(Bitmap.Config config) { in testBitmapShader()
62 Bitmap tile = Bitmap.createBitmap(TILE_WIDTH, TILE_HEIGHT, config); in testBitmapShader()
74 Bitmap b = Bitmap.createBitmap(NUM_TILES * TILE_WIDTH - TILE_WIDTH / 2, in testBitmapShader()
91 private void verifyTile(Bitmap bitmap, int tileX, int tileY) { in verifyTile()
109 private void verifyColor(int color, Bitmap bitmap, int x, int y) { in verifyColor()
117 public void testClamp(Bitmap.Config config) { in testClamp()
118 Bitmap bitmap = Bitmap.createBitmap(2, 1, config); in testClamp()
[all …]
DGainmapTest.java30 import android.graphics.Bitmap;
65 static final Bitmap sScalingRedA8;
66 static final Bitmap sScalingRed8888;
69 sScalingRedA8 = Bitmap.createBitmap(new int[] {
74 }, 4, 1, Bitmap.Config.ARGB_8888);
75 sScalingRedA8.setGainmap(new Gainmap(Bitmap.createBitmap(new int[] { in sScalingRedA8.setGainmap()
80 }, 4, 1, Bitmap.Config.ALPHA_8))); in sScalingRedA8.setGainmap()
82 sScalingRed8888 = Bitmap.createBitmap(new int[] {
87 }, 4, 1, Bitmap.Config.ARGB_8888);
88 sScalingRed8888.setGainmap(new Gainmap(Bitmap.createBitmap(new int[] { in sScalingRed8888.setGainmap()
[all …]
DPaintFlagsDrawFilterTest.java22 import android.graphics.Bitmap;
23 import android.graphics.Bitmap.Config;
51 Bitmap bitmapWithoutFilter = drawText(null); in testPaintFlagsDrawFilter()
54 Bitmap bitmapWithFilter = drawText(filter); in testPaintFlagsDrawFilter()
56 Bitmap combined = delta(bitmapWithoutFilter, bitmapWithFilter); in testPaintFlagsDrawFilter()
60 private Bitmap drawText(PaintFlagsDrawFilter filter) { in drawText()
66 Bitmap b = Bitmap.createBitmap(BITMAP_WIDTH, BITMAP_HEIGHT, Config.ARGB_8888); in drawText()
74 private Bitmap delta(Bitmap bitmapWithoutFilter, Bitmap bitmapWithFilter) { in delta()
75 Bitmap combinedBitmap = Bitmap.createBitmap(BITMAP_WIDTH, BITMAP_HEIGHT, Config.ARGB_8888); in delta()
93 private void verifyUnderline(Bitmap bitmap) { in verifyUnderline()
[all …]
DBitmapRGBAF16Test.java24 import android.graphics.Bitmap;
25 import android.graphics.Bitmap.Config;
43 private Bitmap mOpaqueBitmap;
44 private Bitmap mTransparentBitmap;
72 Bitmap scaled = Bitmap.createScaledBitmap(mOpaqueBitmap, in testScaling()
78 scaled = Bitmap.createScaledBitmap(mTransparentBitmap, in testScaling()
87 Bitmap copy = Bitmap.createBitmap(mOpaqueBitmap); in testCopy()
92 copy = Bitmap.createBitmap(mTransparentBitmap); in testCopy()
100 Bitmap b = Bitmap.createBitmap(64, 64, Config.RGBA_F16, false); in testCreate()
105 b = Bitmap.createBitmap(64, 64, Config.RGBA_F16); in testCreate()
[all …]
DBitmap_ConfigTest.java22 import android.graphics.Bitmap;
23 import android.graphics.Bitmap.Config;
58 assertNotNull(Bitmap.createBitmap(10, 24, Config.ALPHA_8)); in testValues()
59 assertNotNull(Bitmap.createBitmap(10, 24, Config.ARGB_4444)); in testValues()
60 assertNotNull(Bitmap.createBitmap(10, 24, Config.ARGB_8888)); in testValues()
61 assertNotNull(Bitmap.createBitmap(10, 24, Config.RGB_565)); in testValues()
62 assertNotNull(Bitmap.createBitmap(10, 24, Config.RGBA_F16)); in testValues()
63 assertNotNull(Bitmap.createBitmap(10, 24, Config.RGBA_1010102)); in testValues()
DCanvasDrawGlyphsTest.java22 import android.graphics.Bitmap;
59 private Bitmap drawGlyphsToBitmap(int[] glyphIds, int glyphIdOffset, float[] positions, in drawGlyphsToBitmap()
61 Bitmap bmp = Bitmap.createBitmap(BMP_WIDTH, BMP_HEIGHT, Bitmap.Config.ARGB_8888); in drawGlyphsToBitmap()
73 Bitmap glyphBmp = drawGlyphsToBitmap( in drawGlyphs_SameToDrawText()
89 Bitmap textBmp = Bitmap.createBitmap(300, 100, Bitmap.Config.ARGB_8888); in drawGlyphs_SameToDrawText()
102 Bitmap glyphBmp = drawGlyphsToBitmap( in drawGlyphs_glyphOffset()
118 Bitmap glyphBmp2 = drawGlyphsToBitmap( in drawGlyphs_glyphOffset()
134 Bitmap expectedBmp = drawGlyphsToBitmap( in drawGlyphs_glyphOffset()
159 Bitmap glyphBmp = drawGlyphsToBitmap( in drawGlyphs_positionOffset()
176 Bitmap glyphBmp2 = drawGlyphsToBitmap( in drawGlyphs_positionOffset()
[all …]
DBitmapFactoryTest.java31 import android.graphics.Bitmap;
32 import android.graphics.Bitmap.CompressFormat;
33 import android.graphics.Bitmap.Config;
157 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start, in testDecodeResource1()
169 Bitmap b = BitmapFactory.decodeResource(mRes, R.drawable.start); in testDecodeResource2()
181 Bitmap b = BitmapFactory.decodeResourceStream(mRes, value, is, r, mOpt1); in testDecodeResourceStream()
191 Bitmap b = BitmapFactory.decodeByteArray(array, 0, array.length, mOpt1); in testDecodeByteArray1()
203 Bitmap b = BitmapFactory.decodeByteArray(array, 0, array.length); in testDecodeByteArray2()
214 Bitmap b = BitmapFactory.decodeStream(is, r, mOpt1); in testDecodeStream1()
226 Bitmap b = BitmapFactory.decodeStream(is); in testDecodeStream2()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DHardwareBitmapTests.java26 import android.graphics.Bitmap;
67 options.inPreferredConfig = Bitmap.Config.HARDWARE; in createHardwareOptions()
79 Bitmap hardwareBitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, in testDecodeResource()
98 Bitmap hardwareBitmap = Bitmap.createBitmap(picture); in testCreateFromPicture()
101 assertEquals(Bitmap.Config.HARDWARE, hardwareBitmap.getConfig()); in testCreateFromPicture()
109 Bitmap hardwareBitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, in testReadbackThroughPicture()
111 assertEquals(Bitmap.Config.HARDWARE, hardwareBitmap.getConfig()); in testReadbackThroughPicture()
120 Bitmap result = Bitmap.createBitmap(picture, picture.getWidth(), picture.getHeight(), in testReadbackThroughPicture()
121 Bitmap.Config.ARGB_8888); in testReadbackThroughPicture()
129 Bitmap hardwareBitmap = BitmapFactory.decodeResource(mRes, R.drawable.robot, in testReadbackThroughPictureNoEndRecording()
[all …]
DGainmapTests.java24 import android.graphics.Bitmap;
75 private static final Bitmap sTestImage;
77 Bitmap base = Bitmap.createBitmap(10, 6, Bitmap.Config.ARGB_8888);
80 Bitmap gainmapImage = Bitmap.createBitmap(5, 3, Bitmap.Config.ARGB_8888);
101 sNoOpGainmap = new Gainmap(Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8));
127 private void assertTestImageResult(Bitmap result) { in assertTestImageResult()
131 private static float toleranceForResult(Bitmap result) { in toleranceForResult()
133 if (result.getConfig() == Bitmap.Config.ARGB_8888) { in toleranceForResult()
143 private void assertTestImageResult(Bitmap result, Gainmap gainmap) { in assertTestImageResult()
160 private static Bitmap renderTestImageWithHardware(ColorSpace dest) { in renderTestImageWithHardware()
[all …]
DShaderTests.java19 import android.graphics.Bitmap;
55Bitmap shaderBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); in testSinglePixelBitmapShader()
76Bitmap shaderBitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); in testSinglePixelComposeShader()
112 Bitmap mBitmap; in testComplexShaderUsage()
117 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
124 Bitmap shaderBitmap = Bitmap.createBitmap( in testComplexShaderUsage()
125 width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
192 Bitmap shaderBitmap = Bitmap.createBitmap( in testSinglePixelBitmapShaderWith1010102Config()
193 1, 1, Bitmap.Config.RGBA_1010102); in testSinglePixelBitmapShaderWith1010102Config()
206 Bitmap bitmap = Bitmap.createBitmap(TEST_WIDTH, TEST_HEIGHT, Bitmap.Config.ARGB_8888); in testAnisotropicFilteredBitmapShader()
[all …]
DColorSpaceTests.java19 import static android.graphics.Bitmap.Config.ARGB_8888;
20 import static android.graphics.Bitmap.Config.HARDWARE;
21 import static android.graphics.Bitmap.Config.RGB_565;
24 import android.graphics.Bitmap;
62 private Bitmap mMask;
66 Bitmap res = BitmapFactory.decodeResource(getActivity().getResources(), in loadMask()
68 mMask = Bitmap.createBitmap(res.getWidth(), res.getHeight(), Bitmap.Config.ALPHA_8); in loadMask()
76 Bitmap bitmap8888 = loadAsset("green-p3.png", ARGB_8888); in testDrawDisplayP3()
77 Bitmap bitmapHardware = loadAsset("green-p3.png", HARDWARE); in testDrawDisplayP3()
94 Bitmap bitmap = loadAsset("green-p3.png", RGB_565); in testDrawDisplayP3Config565()
[all …]
DCanvasTests.java21 import android.graphics.Bitmap;
76 public Bitmap getImmutableBitmap() { in getImmutableBitmap()
80 Bitmap immutableBitmap = BitmapFactory.decodeResource(res, R.drawable.sunset1, opt); in getImmutableBitmap()
85 public Bitmap getMutableBitmap(Bitmap.Config config) { in getMutableBitmap()
86 return Bitmap.createBitmap(BITMAP_WIDTH, BITMAP_HEIGHT, config); in getMutableBitmap()
89 public Bitmap getMutableBitmap() { in getMutableBitmap()
90 return getMutableBitmap(Bitmap.Config.ARGB_8888); in getMutableBitmap()
230 private void drawRotatedBitmap(boolean aa, Canvas canvas, Bitmap.Config config) { in drawRotatedBitmap()
232 Bitmap bm = getMutableBitmap(); in drawRotatedBitmap()
250 Bitmap.Config.ARGB_8888, in testConfigs()
[all …]
DCanvasStateTests.java22 import android.graphics.Bitmap;
145 private void testFailureOnBitmapDraw(Bitmap bitmap) { in testFailureOnBitmapDraw()
161 Bitmap recycledBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); in testFailureOnDrawRecycledBitmap()
168 Bitmap nonPremultipliedBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); in testFailureOnNonPremultipliedBitmap()
182 Bitmap bitmap = Bitmap.createBitmap(displayMetrics.widthPixels, in testDrawScreenWideBitmap()
183 displayMetrics.heightPixels, Bitmap.Config.ARGB_8888); in testDrawScreenWideBitmap()
202 Bitmap bitmap = Bitmap.createBitmap(bWidth, bHeight, Bitmap.Config.ARGB_8888); in testDrawLargeBitmap()
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DBitmapDumper.java18 import android.graphics.Bitmap;
44 public static void dumpBitmaps(Bitmap idealBitmap, Bitmap testedBitmap, in dumpBitmaps()
46 Bitmap visualizerBitmap; in dumpBitmaps()
55 visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in dumpBitmaps()
57 Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); in dumpBitmaps()
67 public static void dumpBitmaps(Bitmap testedBitmap, Bitmap visualizerBitmap) { in dumpBitmaps()
75 public static void dumpBitmap(Bitmap bitmap) { in dumpBitmap()
82 public static void dumpBitmap(Bitmap bitmap, String label) { in dumpBitmap()
94 private static void logIfBitmapSolidColor(String fileName, Bitmap bitmap) { in logIfBitmapSolidColor()
107 private static void saveBitmap(Bitmap bitmap, File file) { in saveBitmap()
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
DRGBZ.java21 import android.graphics.Bitmap;
42 private Bitmap bitmap;
43 private Bitmap preview;
44 private Bitmap depthBitmap;
94 public Bitmap getBitmap() { in getBitmap()
150 public Bitmap setAlphaChannel(Bitmap bitmap, Bitmap depthBitmap) { in setAlphaChannel()
154 Bitmap result = bitmap.copy(Bitmap.Config.ARGB_8888, true); in setAlphaChannel()
160 private Bitmap setAlphaChannelFromBitmap(Bitmap depth, Bitmap orig, Bitmap dest) { in setAlphaChannelFromBitmap()
DImageBuffersForRenderScript.java19 import android.graphics.Bitmap;
33 public Bitmap inputImage;
34 public Bitmap outputImage;
46 public ImageBuffersForRenderScript(Bitmap inImage, int margin, in ImageBuffersForRenderScript()
51 outputImage = Bitmap.createBitmap(inputImage.getWidth(), in ImageBuffersForRenderScript()
52 inputImage.getHeight(), Bitmap.Config.ARGB_8888); in ImageBuffersForRenderScript()
/cts/tests/tests/text/src/android/text/cts/
DControlCharacterGlyphTest.java21 import android.graphics.Bitmap;
37 Bitmap bmp = Bitmap.createBitmap(200, 200, Bitmap.Config.ALPHA_8); in testLineBreakDrawsNothing()
41 Bitmap emptyBitmap = Bitmap.createBitmap(200, 200, Bitmap.Config.ALPHA_8); in testLineBreakDrawsNothing()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBitmapUtils.java23 import android.graphics.Bitmap;
24 import android.graphics.Bitmap.CompressFormat;
40 private static Boolean compareBasicBitmapsInfo(Bitmap bmp1, Bitmap bmp2) { in compareBasicBitmapsInfo()
75 public static boolean compareBitmaps(Bitmap bmp1, Bitmap bmp2) { in compareBitmaps()
96 public static boolean compareBitmaps(Bitmap bmp1, Bitmap bmp2, double minimumPrecision) { in compareBitmaps()
125 public static Bitmap generateRandomBitmap(int width, int height) { in generateRandomBitmap()
126 final Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in generateRandomBitmap()
136 public static Bitmap generateWhiteBitmap(int width, int height) { in generateWhiteBitmap()
137 final Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in generateWhiteBitmap()
142 public static Bitmap getWallpaperBitmap(Context context) throws Exception { in getWallpaperBitmap()
[all …]
/cts/tests/quickaccesswallet/src/android/quickaccesswallet/cts/
DWalletCardTest.java27 import android.graphics.Bitmap;
62 Bitmap bitmap = Bitmap.createBitmap(70, 44, Bitmap.Config.ARGB_8888); in testParcel_toParcel()
63 Bitmap bitmapSecondary = Bitmap.createBitmap(50, 30, Bitmap.Config.ARGB_8888); in testParcel_toParcel()
107 Bitmap bitmap = Bitmap.createBitmap(70, 44, Bitmap.Config.ARGB_8888); in testParcel_noIconOrLabel_toParcel()
135 Bitmap bitmap = Bitmap.createBitmap(70, 44, Bitmap.Config.ARGB_8888); in testBuilder_defaultsToUnknownCardType()
151 Bitmap bitmap = Bitmap.createBitmap(70, 44, Bitmap.Config.ARGB_8888); in testSetNonPaymentCardSecondaryImage_throwsException()
168 Bitmap bitmap = Bitmap.createBitmap(70, 44, Bitmap.Config.ARGB_8888); in testSetCardLocationsNull_throwsException()
/cts/tests/pdf/module/src/android/graphics/pdf/cts/module/
DUtils.java24 import android.graphics.Bitmap;
81 private static final Map<Integer, Bitmap> sRenderedBitmaps = new ArrayMap<>();
83 private static final Map<Integer, Bitmap> sNewRenderBitmaps = new ArrayMap<>();
84 private static final Map<Integer, Bitmap> sPreVRenderedBitmaps = new ArrayMap<>();
187 static Bitmap renderWithTransform(int bmWidth, int bmHeight, @RawRes int docRes, in renderWithTransform()
191 Bitmap bm = Bitmap.createBitmap(bmWidth, bmHeight, Bitmap.Config.ARGB_8888); in renderWithTransform()
232 private static Bitmap renderAndThenTransform(int bmWidth, int bmHeight, @RawRes int docRes, in renderAndThenTransform()
236 Bitmap renderedBm; in renderAndThenTransform()
245 renderedBm = Bitmap.createBitmap(page.getWidth(), page.getHeight(), in renderAndThenTransform()
246 Bitmap.Config.ARGB_8888); in renderAndThenTransform()
[all …]
/cts/tests/app/WallpaperTest/src/android/app/cts/wallpapers/util/
DWallpaperTestUtils.java19 import android.graphics.Bitmap;
34 public static Bitmap getBitmap(Drawable drawable) { in getBitmap()
43 Bitmap result = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in getBitmap()
63 public static boolean isSimilar(Bitmap bitmap1, Bitmap bitmap2, boolean requireSameDimensions) { in isSimilar()
69 Bitmap largest = width >= bitmap2.getWidth() ? bitmap1 : bitmap2; in isSimilar()
70 Bitmap smallest = largest == bitmap1 ? bitmap2 : bitmap1; in isSimilar()
71 Bitmap rescaled = Bitmap.createScaledBitmap( in isSimilar()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/util/
DBitmapDumper.java18 import android.graphics.Bitmap;
73 public static void dumpBitmaps(Bitmap idealBitmap, Bitmap testedBitmap, String testName, in dumpBitmaps()
75 Bitmap visualizerBitmap; in dumpBitmaps()
84 visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in dumpBitmaps()
86 Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); in dumpBitmaps()
93 public static void dumpBitmap(Bitmap bitmap, String testName, String className) { in dumpBitmap()
101 … private static void saveFile(String className, String testName, String fileName, Bitmap bitmap) { in saveFile()
/cts/tests/tests/view/src/android/view/cts/
DPixelCopyTest.java36 import android.graphics.Bitmap;
37 import android.graphics.Bitmap.Config;
159 Bitmap dest = null; in testNullDest()
165 Bitmap dest = Bitmap.createBitmap(5, 5, Config.ARGB_8888); in testRecycledDest()
172 Bitmap dest = Bitmap.createBitmap(5, 5, Bitmap.Config.ARGB_8888); in testNoSourceData()
179 Bitmap dest = Bitmap.createBitmap(5, 5, Bitmap.Config.ARGB_8888); in testEmptySourceRectSurface()
185 Bitmap dest = Bitmap.createBitmap(5, 5, Bitmap.Config.ARGB_8888); in testEmptySourceRectWindow()
191 Bitmap dest = Bitmap.createBitmap(5, 5, Bitmap.Config.ARGB_8888); in testInvalidSourceRectSurface()
197 Bitmap dest = Bitmap.createBitmap(5, 5, Bitmap.Config.ARGB_8888); in testInvalidSourceRectWindow()
203 Bitmap dest = Bitmap.createBitmap(5, 5, Bitmap.Config.ARGB_8888); in testNoDecorView()
[all …]

12345678910>>...16