Home
last modified time | relevance | path

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

12

/aosp14/frameworks/base/core/tests/coretests/src/android/graphics/
H A 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 …]
/aosp14/frameworks/base/libs/hwui/hwui/
H A DImageDecoder.cpp67 ImageDecoder::ImageDecoder(std::unique_ptr<SkAndroidCodec> codec, sk_sp<SkPngChunkReader> peeker, in ImageDecoder() function in ImageDecoder
83 ImageDecoder::~ImageDecoder() = default;
221 int ImageDecoder::width() const { in width()
227 int ImageDecoder::height() const { in height()
233 bool ImageDecoder::opaque() const { in opaque()
237 bool ImageDecoder::gray() const { in gray()
241 bool ImageDecoder::isAnimated() { in isAnimated()
245 int ImageDecoder::currentFrame() const { in currentFrame()
249 bool ImageDecoder::rewind() { in rewind()
269 bool ImageDecoder::advanceFrame() { in advanceFrame()
[all …]
H A 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;
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/graphics/
H A DImageLoader.kt29 import android.graphics.ImageDecoder
30 import android.graphics.ImageDecoder.DecodeException
105 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT
129 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT
161 source: ImageDecoder.Source,
164 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT
200 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT
228 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT
255 allocator: Int = ImageDecoder.ALLOCATOR_DEFAULT
296 source: ImageDecoder.Source,
[all …]
/aosp14/frameworks/base/core/java/com/android/internal/widget/
H A 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()
146 final ImageDecoder.Source source = in resolveImage()
147 ImageDecoder.createSource(context.getContentResolver(), uri); in resolveImage()
159 final ImageDecoder.Source source = ImageDecoder.createSource(context.getResources(), resId); in resolveImage()
166 final ImageDecoder.Source source = ImageDecoder.createSource(res, resId); in resolveImage()
209 private static Drawable resolveImage(ImageDecoder.Source source, int maxWidth, int maxHeight) { in resolveImage()
211 return ImageDecoder.decodeDrawable(source, (decoder, info, unused) -> { in resolveImage()
[all …]
/aosp14/frameworks/base/graphics/java/android/graphics/
H A DImageDecoder.java176 public final class ImageDecoder implements AutoCloseable { class
328 ImageDecoder decoder = null; in createFromFile()
347 ImageDecoder decoder = null; in createFromStream()
374 ImageDecoder decoder = null; in createFromAssetFileDescriptor()
543 ImageDecoder decoder = null; in createFromAsset()
1185 public ImageDecoder setResize(int width, int height) { in setResize()
1224 public ImageDecoder setResize(int sampleSize) { in setResize()
1535 public ImageDecoder setMutable(boolean mutable) { in setMutable()
2263 ImageDecoderSourceTrace(ImageDecoder decoder) {
2278 private static native ImageDecoder nCreate(long asset,
[all …]
/aosp14/frameworks/base/media/java/android/media/
H A 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 {
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()
302 bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(file), resizer); in createImageThumbnail()
[all …]
/aosp14/frameworks/base/native/graphics/jni/
H A Dimagedecoder.cpp187 static ImageDecoder* toDecoder(AImageDecoder* d) { in toDecoder()
188 return reinterpret_cast<ImageDecoder*>(d); in toDecoder()
192 return reinterpret_cast<const ImageDecoder*>(d); in toDecoder()
240 ImageDecoder* imageDecoder = toDecoder(decoder); in AImageDecoder_setDataSpace()
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()
432 ImageDecoder* imageDecoder = toDecoder(decoder); in AImageDecoder_isAnimated()
439 ImageDecoder* imageDecoder = toDecoder(decoder); in AImageDecoder_getRepeatCount()
454 ImageDecoder* imageDecoder = toDecoder(decoder); in AImageDecoder_advanceFrame()
[all …]
/aosp14/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
H A DBitmapTransitionView.kt23 import android.graphics.ImageDecoder
38 private val mImageA = ImageDecoder.decodeBitmap(
39 ImageDecoder.createSource(context.resources, R.drawable.large_photo))
40 private val mImageB = ImageDecoder.decodeBitmap(
41 ImageDecoder.createSource(context.resources, R.drawable.very_large_photo))
H A DRenderEffectViewActivity.kt23 import android.graphics.ImageDecoder
54 val imgSource = ImageDecoder.createSource(resources, R.drawable.scratches)
55 mScratchesImage = ImageDecoder.decodeBitmap(imgSource)
/aosp14/frameworks/base/core/java/com/android/internal/util/
H A 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()
/aosp14/frameworks/base/tests/SilkFX/src/com/android/test/silkfx/app/
H A DHdrImageViewer.kt20 import android.graphics.ImageDecoder
37 val source = ImageDecoder.createSource(contentResolver, data)
43 val source = ImageDecoder.createSource(contentResolver, uri)
/aosp14/frameworks/base/tests/SilkFX/src/com/android/test/silkfx/hdr/
H A DGainmapImage.kt24 import android.graphics.ImageDecoder
54 fun setImageSource(source: ImageDecoder.Source) {
117 val source = ImageDecoder.createSource(resources.assets,
122 private fun doDecode(source: ImageDecoder.Source) {
124 bitmap = ImageDecoder.decodeBitmap(source) { decoder, info, source ->
125 decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE
H A DGainmapDecodeTest.kt24 import android.graphics.ImageDecoder
64 val source = ImageDecoder.createSource(resources.assets,
69 val gainmapImage = ImageDecoder.decodeBitmap(source) { decoder, info, source ->
70 decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE
H A DGainmapTransformsTest.kt21 import android.graphics.ImageDecoder
35 val source = ImageDecoder.createSource(resources.assets,
38 return ImageDecoder.decodeBitmap(source) { decoder, info, source ->
39 decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE
/aosp14/frameworks/base/core/tests/coretests/src/android/content/
H A 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()
/aosp14/frameworks/base/graphics/java/android/graphics/drawable/
H A DBitmapDrawable.java33 import android.graphics.ImageDecoder;
169 bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(res, stream), in BitmapDrawable()
171 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in BitmapDrawable()
202 bitmap = ImageDecoder.decodeBitmap(ImageDecoder.createSource(res, is), in BitmapDrawable()
204 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in BitmapDrawable()
845 ImageDecoder.Source source = ImageDecoder.createSource(r, is, density); in updateStateFromTypedArray()
846 bitmap = ImageDecoder.decodeBitmap(source, (decoder, info, src) -> { in updateStateFromTypedArray()
847 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in updateStateFromTypedArray()
H A 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()
H A 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()
H A 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()
/aosp14/frameworks/base/libs/hwui/jni/
H A 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()
/aosp14/frameworks/base/services/core/java/com/android/server/wallpaper/
H A DWallpaperCropper.java28 import android.graphics.ImageDecoder;
235 final ImageDecoder.Source srcData = in generateCropInternal()
236 ImageDecoder.createSource(wallpaper.getWallpaperFile()); in generateCropInternal()
238 Bitmap cropped = ImageDecoder.decodeBitmap(srcData, (decoder, info, src) -> { in generateCropInternal()
/aosp14/frameworks/base/core/java/android/content/res/
H A DResourcesImpl.java36 import android.graphics.ImageDecoder;
814 ImageDecoder.Source src = new ImageDecoder.AssetInputStreamSource(ais, in decodeImageDrawable()
817 return ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in decodeImageDrawable()
818 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in decodeImageDrawable()
829 ImageDecoder.Source src = ImageDecoder.createSource(wrapper, fis); in decodeImageDrawable()
831 return ImageDecoder.decodeDrawable(src, (decoder, info, s) -> { in decodeImageDrawable()
832 decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); in decodeImageDrawable()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/graphics/
H A DImageLoaderTest.kt6 import android.graphics.ImageDecoder
310 allocator = ImageDecoder.ALLOCATOR_HARDWARE
323 allocator = ImageDecoder.ALLOCATOR_SOFTWARE
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DSmartReplyStateInflater.kt27 import android.graphics.ImageDecoder
312 val source = ImageDecoder.createSource(packageContext.contentResolver, icon.uri)
313 bitmap = ImageDecoder.decodeBitmap(source) { decoder, _, _ ->
315 decoder.allocator = ImageDecoder.ALLOCATOR_DEFAULT

12