Home
last modified time | relevance | path

Searched refs:ImageDecoder (Results 1 – 25 of 47) sorted by relevance

12

/frameworks/base/core/tests/coretests/src/android/graphics/
DImageDecoderTest.java42 ImageDecoder.Source src = in onDecodeHeader_png_returnsPopulatedData()
43 ImageDecoder.createSource(mContext.getResources(), R.drawable.gettysburg); in onDecodeHeader_png_returnsPopulatedData()
44 ImageDecoder.ImageInfo info = ImageDecoder.decodeHeader(src); in onDecodeHeader_png_returnsPopulatedData()
56 ImageDecoder.Source src = in onDecodeHeader_animatedWebP_returnsPopulatedData()
57 ImageDecoder.createSource(mContext.getResources(), R.drawable.animated_webp); in onDecodeHeader_animatedWebP_returnsPopulatedData()
58 ImageDecoder.ImageInfo info = ImageDecoder.decodeHeader(src); in onDecodeHeader_animatedWebP_returnsPopulatedData()
70 ImageDecoder.Source src = ImageDecoder.createSource(new File("/this/file/does/not/exist")); in onDecodeHeader_invalidSource_throwsException()
71 ImageDecoder.decodeHeader(src); in onDecodeHeader_invalidSource_throwsException()
76 ImageDecoder.Source src = in onDecodeHeader_invalidResource_throwsException()
77 ImageDecoder.createSource(mContext.getResources(), R.drawable.box); in onDecodeHeader_invalidResource_throwsException()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/graphics/
DImageLoader.kt29 import android.graphics.ImageDecoder in <lambda>()
30 import android.graphics.ImageDecoder.DecodeException in <lambda>()
105 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT in <lambda>()
129 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT in <lambda>()
161 source: ImageDecoder.Source, in <lambda>()
164 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT in <lambda>()
167 ImageDecoder.decodeBitmap(source) { decoder, info, _ -> in <lambda>()
200 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT in <lambda>()
228 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT in <lambda>()
255 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT in <lambda>()
[all …]
/frameworks/base/libs/hwui/hwui/
DImageDecoder.cpp48 sk_sp<SkColorSpace> ImageDecoder::getDefaultColorSpace() const { in getDefaultColorSpace()
64 ImageDecoder::ImageDecoder(std::unique_ptr<SkAndroidCodec> codec, sk_sp<SkPngChunkReader> peeker, in ImageDecoder() function in ImageDecoder
80 ImageDecoder::~ImageDecoder() = default;
82 SkAlphaType ImageDecoder::getOutAlphaType() const { in getOutAlphaType()
97 SkISize ImageDecoder::getSampledDimensions(int sampleSize) const { in getSampledDimensions()
102 bool ImageDecoder::setTargetSize(int width, int height) { in setTargetSize()
143 bool ImageDecoder::setCropRect(const SkIRect* crop) { in setCropRect()
163 bool ImageDecoder::setOutColorType(SkColorType colorType) { in setOutColorType()
189 bool ImageDecoder::setUnpremultipliedRequired(bool required) { in setUnpremultipliedRequired()
199 void ImageDecoder::setOutColorSpace(sk_sp<SkColorSpace> colorSpace) { in setOutColorSpace()
[all …]
DImageDecoder.h34 class ANDROID_API ImageDecoder final {
39 ImageDecoder(std::unique_ptr<SkAndroidCodec> codec, sk_sp<SkPngChunkReader> peeker = nullptr,
41 ~ImageDecoder();
122 ImageDecoder(const ImageDecoder&) = delete;
123 ImageDecoder& operator=(const ImageDecoder&) = delete;
/frameworks/base/core/java/com/android/internal/widget/
DLocalImageResolver.java26 import android.graphics.ImageDecoder;
59 final ImageDecoder.Source source = in resolveImage()
60 ImageDecoder.createSource(context.getContentResolver(), uri); in resolveImage()
61 return ImageDecoder.decodeDrawable(source, in resolveImage()
150 final ImageDecoder.Source source = in resolveImage()
151 ImageDecoder.createSource(context.getContentResolver(), uri); in resolveImage()
163 final ImageDecoder.Source source = ImageDecoder.createSource(context.getResources(), resId); in resolveImage()
170 final ImageDecoder.Source source = ImageDecoder.createSource(res, resId); in resolveImage()
213 private static Drawable resolveImage(ImageDecoder.Source source, int maxWidth, int maxHeight) { in resolveImage()
215 return ImageDecoder.decodeDrawable(source, (decoder, info, unused) -> { in resolveImage()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/
DCanvasPerfTest.java27 import android.graphics.ImageDecoder;
112 Bitmap source = ImageDecoder.decodeBitmap( in testCreateScaledSrgbBitmap()
113 ImageDecoder.createSource(context.getResources(), R.drawable.fountain_night), in testCreateScaledSrgbBitmap()
115 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in testCreateScaledSrgbBitmap()
133 Bitmap source = ImageDecoder.decodeBitmap( in testCreateScaledP3Bitmap()
134 ImageDecoder.createSource(context.getResources(), R.drawable.fountain_night), in testCreateScaledP3Bitmap()
136 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in testCreateScaledP3Bitmap()
154 Bitmap source = ImageDecoder.decodeBitmap( in testCreateScaledBitmapWithGainmap()
155 ImageDecoder.createSource(context.getResources(), R.drawable.fountain_night), in testCreateScaledBitmapWithGainmap()
157 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in testCreateScaledBitmapWithGainmap()
/frameworks/layoutlib/bridge/src/android/graphics/
DImageDecoder_Delegate.java26 import android.graphics.ImageDecoder.InputStreamSource;
27 import android.graphics.ImageDecoder.OnHeaderDecodedListener;
28 import android.graphics.ImageDecoder.ResourceSource;
29 import android.graphics.ImageDecoder.Source;
49 Bitmap bm = ImageDecoder.decodeBitmapImpl_Original(src, listener); in decodeBitmapImpl()
/frameworks/base/native/graphics/jni/
Dimagedecoder.cpp124 *outDecoder = reinterpret_cast<AImageDecoder*>(new ImageDecoder(std::move(androidCodec))); in createFromStream()
187 static ImageDecoder* toDecoder(AImageDecoder* d) { in toDecoder()
188 return reinterpret_cast<ImageDecoder*>(d); in toDecoder()
191 static const ImageDecoder* toDecoder(const AImageDecoder* d) { in toDecoder()
192 return reinterpret_cast<const ImageDecoder*>(d); in toDecoder()
240 ImageDecoder* imageDecoder = toDecoder(decoder); in AImageDecoder_setDataSpace()
253 static const ImageDecoder* toDecoder(const AImageDecoderHeaderInfo* info) { in toDecoder()
254 return reinterpret_cast<const ImageDecoder*>(info); in toDecoder()
286 const ImageDecoder* imageDecoder = toDecoder(info); in AImageDecoderHeaderInfo_getDataSpace()
410 ImageDecoder* imageDecoder = toDecoder(decoder); in AImageDecoder_decodeImage()
[all …]
/frameworks/base/media/java/android/media/
DThumbnailUtils.java32 import android.graphics.ImageDecoder;
33 import android.graphics.ImageDecoder.ImageInfo;
34 import android.graphics.ImageDecoder.Source;
83 private static class Resizer implements ImageDecoder.OnHeaderDecodedListener {
93 public void onHeaderDecoded(ImageDecoder decoder, ImageInfo info, Source source) { in onHeaderDecoded()
99 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in onHeaderDecoded()
157 return ImageDecoder.decodeBitmap(ImageDecoder.createSource(raw), resizer); in createAudioThumbnail()
207 return ImageDecoder.decodeBitmap(ImageDecoder.createSource(bestFile), resizer); in createAudioThumbnail()
291 bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(raw), resizer); in createImageThumbnail()
292 } catch (ImageDecoder.DecodeException e) { in createImageThumbnail()
[all …]
/frameworks/base/graphics/java/android/graphics/
DImageDecoder.java176 public final class ImageDecoder implements AutoCloseable { class
213 abstract ImageDecoder createImageDecoder(boolean preferAnimation) throws IOException; in createImageDecoder()
227 public ImageDecoder createImageDecoder(boolean preferAnimation) throws IOException { in createImageDecoder()
247 public ImageDecoder createImageDecoder(boolean preferAnimation) throws IOException { in createImageDecoder()
279 public ImageDecoder createImageDecoder(boolean preferAnimation) throws IOException { in createImageDecoder()
318 private static ImageDecoder createFromFile(@NonNull File file, in createFromFile()
328 ImageDecoder decoder = null; in createFromFile()
343 private static ImageDecoder createFromStream(@NonNull InputStream is, in createFromStream()
347 ImageDecoder decoder = null; in createFromStream()
366 private static ImageDecoder createFromAssetFileDescriptor(@NonNull AssetFileDescriptor assetFd, in createFromAssetFileDescriptor()
[all …]
/frameworks/base/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/
DBitmapTransitionView.kt23 import android.graphics.ImageDecoder in <lambda>()
38 private val mImageA = ImageDecoder.decodeBitmap( in <lambda>()
39 ImageDecoder.createSource(context.resources, R.drawable.large_photo)) in <lambda>()
40 private val mImageB = ImageDecoder.decodeBitmap( in <lambda>()
41 ImageDecoder.createSource(context.resources, R.drawable.very_large_photo)) in <lambda>()
DRenderEffectViewActivity.kt23 import android.graphics.ImageDecoder in <lambda>()
54 val imgSource = ImageDecoder.createSource(resources, R.drawable.scratches) in <lambda>()
55 mScratchesImage = ImageDecoder.decodeBitmap(imgSource) in <lambda>()
/frameworks/base/core/java/com/android/internal/util/
DImageUtils.java24 import android.graphics.ImageDecoder;
25 import android.graphics.ImageDecoder.ImageInfo;
26 import android.graphics.ImageDecoder.Source;
221 return ImageDecoder.decodeBitmap(ImageDecoder.createSource(() -> { in loadThumbnail()
223 }), (ImageDecoder decoder, ImageInfo info, Source source) -> { in loadThumbnail()
224 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in loadThumbnail()
/frameworks/base/tests/graphics/SilkFX/src/com/android/test/silkfx/app/
DHdrImageViewer.kt20 import android.graphics.ImageDecoder
37 val source = ImageDecoder.createSource(contentResolver, data) in onCreate()
43 val source = ImageDecoder.createSource(contentResolver, uri) in onCreate()
/frameworks/base/tests/graphics/SilkFX/src/com/android/test/silkfx/hdr/
DGainmapImage.kt24 import android.graphics.ImageDecoder in <lambda>()
54 fun setImageSource(source: ImageDecoder.Source) { in <lambda>()
110 val source = ImageDecoder.createSource(resources.assets, in <lambda>()
115 private fun doDecode(source: ImageDecoder.Source) { in <lambda>()
117 bitmap = ImageDecoder.decodeBitmap(source) { decoder, info, source -> in <lambda>()
118 decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE in <lambda>()
DGainmapTransformsTest.kt21 import android.graphics.ImageDecoder in <lambda>()
35 val source = ImageDecoder.createSource(resources.assets, in <lambda>()
38 return ImageDecoder.decodeBitmap(source) { decoder, info, source -> in <lambda>()
39 decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE in <lambda>()
DGainmapDecodeTest.kt24 import android.graphics.ImageDecoder in <lambda>()
64 val source = ImageDecoder.createSource(resources.assets, in decode()
69 val gainmapImage = ImageDecoder.decodeBitmap(source) { decoder, info, source -> in decode()
70 decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE in decode()
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/
DBitmapTest.java35 import android.graphics.ImageDecoder;
36 import android.graphics.ImageDecoder.Source;
103 Source source = ImageDecoder.createSource(context.getResources(), in testImageDecoder()
105 Bitmap bitmap = ImageDecoder.decodeBitmap(source); in testImageDecoder()
/frameworks/base/core/tests/coretests/src/android/content/
DContentResolverTest.java32 import android.graphics.ImageDecoder;
116 ImageDecoder.ALLOCATOR_SOFTWARE); in testLoadThumbnail_Normal()
131 ImageDecoder.ALLOCATOR_SOFTWARE); in testLoadThumbnail_Scaling()
146 ImageDecoder.ALLOCATOR_SOFTWARE); in testLoadThumbnail_Aspect()
161 ImageDecoder.ALLOCATOR_SOFTWARE); in testLoadThumbnail_Tiny()
177 ImageDecoder.ALLOCATOR_SOFTWARE); in testLoadThumbnail_Large()
/frameworks/base/graphics/java/android/graphics/drawable/
DBitmapDrawable.java33 import android.graphics.ImageDecoder;
176 bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(res, stream), in BitmapDrawable()
178 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in BitmapDrawable()
209 bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(res, is), in BitmapDrawable()
211 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in BitmapDrawable()
852 ImageDecoder.Source source = ImageDecoder.createSource(r, is, density); in updateStateFromTypedArray()
853 bitmap = ImageDecoder.decodeBitmap(source, (decoder, info, src) -> { in updateStateFromTypedArray()
854 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in updateStateFromTypedArray()
DAnimatedImageDrawable.java29 import android.graphics.ImageDecoder;
233 ImageDecoder.Source source = ImageDecoder.createSource(r, is, density); in updateStateFromTypedArray()
234 drawable = ImageDecoder.decodeDrawable(source, (decoder, info, src) -> { in updateStateFromTypedArray()
293 @Nullable ImageDecoder decoder, int width, int height, in AnimatedImageDrawable()
590 @Nullable ImageDecoder decoder, int width, int height, long colorSpaceHandle, in nCreate()
DDrawable.java37 import android.graphics.ImageDecoder;
1283 ImageDecoder.Source source = null; in getBitmapDrawable()
1291 source = ImageDecoder.createSource(res, is, density); in getBitmapDrawable()
1293 source = ImageDecoder.createSource(res, is); in getBitmapDrawable()
1296 return ImageDecoder.decodeDrawable(source, (decoder, info, src) -> { in getBitmapDrawable()
1297 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in getBitmapDrawable()
1299 return e.getError() == ImageDecoder.DecodeException.SOURCE_INCOMPLETE; in getBitmapDrawable()
DNinePatchDrawable.java32 import android.graphics.ImageDecoder;
439 ImageDecoder.Source source = ImageDecoder.createSource(r, is, density); in updateStateFromTypedArray()
440 bitmap = ImageDecoder.decodeBitmap(source, (decoder, info, src) -> { in updateStateFromTypedArray()
442 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in updateStateFromTypedArray()
/frameworks/base/libs/hwui/jni/
DImageDecoder.cpp156 ImageDecoder* decoder = new ImageDecoder(std::move(androidCodec), std::move(peeker), in native_create()
258 auto* decoder = reinterpret_cast<ImageDecoder*>(nativePtr); in ImageDecoder_nDecodeBitmap()
507 auto* decoder = reinterpret_cast<ImageDecoder*>(nativePtr); in ImageDecoder_nGetSampledSize()
514 auto* decoder = reinterpret_cast<ImageDecoder*>(nativePtr); in ImageDecoder_nGetPadding()
519 delete reinterpret_cast<ImageDecoder*>(nativePtr); in ImageDecoder_nClose()
523 auto* decoder = reinterpret_cast<ImageDecoder*>(nativePtr); in ImageDecoder_nGetMimeType()
528 auto* codec = reinterpret_cast<ImageDecoder*>(nativePtr)->mCodec.get(); in ImageDecoder_nGetColorSpace()
/frameworks/base/libs/hwui/
Dlibhwui.map.txt59 android::ImageDecoder::*;

12