Home
last modified time | relevance | path

Searched refs:hardwareBuffer (Results 1 – 25 of 31) sorted by relevance

12

/frameworks/base/services/core/java/com/android/server/wm/utils/
DRotationAnimationUtils.java44 public static boolean hasProtectedContent(HardwareBuffer hardwareBuffer) { in hasProtectedContent() argument
45 return (hardwareBuffer.getUsage() & USAGE_PROTECTED_CONTENT) == USAGE_PROTECTED_CONTENT; in hasProtectedContent()
53 public static float getMedianBorderLuma(HardwareBuffer hardwareBuffer, ColorSpace colorSpace) { in getMedianBorderLuma() argument
55 if (hardwareBuffer == null || hardwareBuffer.getFormat() != RGBA_8888 in getMedianBorderLuma()
56 || hasProtectedContent(hardwareBuffer)) { in getMedianBorderLuma()
60 ImageReader ir = ImageReader.newInstance(hardwareBuffer.getWidth(), in getMedianBorderLuma()
61 hardwareBuffer.getHeight(), hardwareBuffer.getFormat(), 1); in getMedianBorderLuma()
62 ir.getSurface().attachAndQueueBufferWithColorSpace(hardwareBuffer, colorSpace); in getMedianBorderLuma()
/frameworks/native/services/sensorservice/tests/
Dsensorservicetest.cpp64 AHardwareBuffer *hardwareBuffer; in testInvalidSharedMem_NoCrash() local
79 AHardwareBuffer_allocate(&desc, &hardwareBuffer); in testInvalidSharedMem_NoCrash()
80 AHardwareBuffer_lock(hardwareBuffer, AHARDWAREBUFFER_USAGE_CPU_READ_RARELY, in testInvalidSharedMem_NoCrash()
83 const native_handle_t *resourceHandle = AHardwareBuffer_getNativeHandle(hardwareBuffer); in testInvalidSharedMem_NoCrash()
/frameworks/base/native/android/
Dhardware_buffer_jni.cpp29 jobject AHardwareBuffer_toHardwareBuffer(JNIEnv* env, AHardwareBuffer* hardwareBuffer) { in AHardwareBuffer_toHardwareBuffer() argument
30 return android_hardware_HardwareBuffer_createFromAHardwareBuffer(env, hardwareBuffer); in AHardwareBuffer_toHardwareBuffer()
/frameworks/base/libs/hwui/hwui/
DBitmap.cpp140 sk_sp<Bitmap> Bitmap::createFrom(AHardwareBuffer* hardwareBuffer, sk_sp<SkColorSpace> colorSpace, in createFrom() argument
143 AHardwareBuffer_describe(hardwareBuffer, &bufferDesc); in createFrom()
145 return createFrom(hardwareBuffer, info, bufferDesc, palette); in createFrom()
148 sk_sp<Bitmap> Bitmap::createFrom(AHardwareBuffer* hardwareBuffer, SkColorType colorType, in createFrom() argument
152 AHardwareBuffer_describe(hardwareBuffer, &bufferDesc); in createFrom()
155 return createFrom(hardwareBuffer, info, bufferDesc, palette); in createFrom()
158 sk_sp<Bitmap> Bitmap::createFrom(AHardwareBuffer* hardwareBuffer, const SkImageInfo& info, in createFrom() argument
163 return sk_sp<Bitmap>(new Bitmap(hardwareBuffer, info, rowBytes, palette)); in createFrom()
342 AHardwareBuffer* Bitmap::hardwareBuffer() { in hardwareBuffer() function in android::Bitmap
DBitmap.h80 static sk_sp<Bitmap> createFrom(AHardwareBuffer* hardwareBuffer,
84 static sk_sp<Bitmap> createFrom(AHardwareBuffer* hardwareBuffer,
126 AHardwareBuffer* hardwareBuffer();
181 static sk_sp<Bitmap> createFrom(AHardwareBuffer* hardwareBuffer, const SkImageInfo& info,
/frameworks/av/media/ndk/tests/
DAImageReaderWindowHandleTest.cpp89 AHardwareBuffer *hardwareBuffer = nullptr; in HandleImageAvailable() local
90 ret = AImage_getHardwareBuffer(img.get(), &hardwareBuffer); in HandleImageAvailable()
92 ASSERT_NE(hardwareBuffer, nullptr); in HandleImageAvailable()
93 const native_handle_t *nh = AHardwareBuffer_getNativeHandle(hardwareBuffer); in HandleImageAvailable()
/frameworks/base/libs/hwui/
DDeferredLayerUpdater.cpp155 AHardwareBuffer* hardwareBuffer = ASurfaceTexture_dequeueBuffer( in apply() local
159 if (hardwareBuffer) { in apply()
162 hardwareBuffer, dataspace, newContent, in apply()
166 AHardwareBuffer_release(hardwareBuffer); in apply()
/frameworks/rs/
DrsGrallocConsumer.cpp151 AHardwareBuffer *hardwareBuffer = nullptr; in lockNextBuffer() local
152 ret = AImage_getHardwareBuffer(img, &hardwareBuffer); in lockNextBuffer()
153 if (ret != AMEDIA_OK || hardwareBuffer == nullptr) { in lockNextBuffer()
163 mAlloc[idx]->mHal.state.nativeBuffer = hardwareBuffer; in lockNextBuffer()
/frameworks/base/graphics/java/android/graphics/
DBitmap.java742 public static Bitmap wrapHardwareBuffer(@NonNull HardwareBuffer hardwareBuffer, in wrapHardwareBuffer() argument
744 if ((hardwareBuffer.getUsage() & HardwareBuffer.USAGE_GPU_SAMPLED_IMAGE) == 0) { in wrapHardwareBuffer()
747 int format = hardwareBuffer.getFormat(); in wrapHardwareBuffer()
751 Bitmap bitmap = nativeWrapHardwareBufferBitmap(hardwareBuffer, in wrapHardwareBuffer()
754 bitmap.mHardwareBuffer = new WeakReference<HardwareBuffer>(hardwareBuffer); in wrapHardwareBuffer()
2236 HardwareBuffer hardwareBuffer = mHardwareBuffer == null ? null : mHardwareBuffer.get(); in getHardwareBuffer() local
2237 if (hardwareBuffer == null || hardwareBuffer.isClosed()) { in getHardwareBuffer()
2238 hardwareBuffer = nativeGetHardwareBuffer(mNativePtr); in getHardwareBuffer()
2239 mHardwareBuffer = new WeakReference<HardwareBuffer>(hardwareBuffer); in getHardwareBuffer()
2241 return hardwareBuffer; in getHardwareBuffer()
/frameworks/native/include/android/
Dhardware_buffer_jni.h69 AHardwareBuffer* hardwareBuffer) __INTRODUCED_IN(26);
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DScreenshotTests.java105 SurfaceControl.ScreenshotHardwareBuffer hardwareBuffer = SurfaceControl.captureLayers(args); in testScreenshotSecureLayers() local
106 assertNotNull(hardwareBuffer); in testScreenshotSecureLayers()
108 Bitmap screenshot = hardwareBuffer.asBitmap(); in testScreenshotSecureLayers()
/frameworks/base/core/java/android/hardware/
DSystemSensorManager.java596 MemoryFile memoryFile, HardwareBuffer hardwareBuffer) { in createDirectChannelImpl() argument
622 } else if (hardwareBuffer != null) { in createDirectChannelImpl()
623 if (hardwareBuffer.getFormat() != HardwareBuffer.BLOB) { in createDirectChannelImpl()
626 if (hardwareBuffer.getHeight() != 1) { in createDirectChannelImpl()
629 if (hardwareBuffer.getWidth() < MIN_DIRECT_CHANNEL_BUFFER_SIZE) { in createDirectChannelImpl()
634 if ((hardwareBuffer.getUsage() & HardwareBuffer.USAGE_SENSOR_DIRECT_DATA) == 0) { in createDirectChannelImpl()
638 size = hardwareBuffer.getWidth(); in createDirectChannelImpl()
641 -1, hardwareBuffer); in createDirectChannelImpl()
/frameworks/base/core/jni/include/android_runtime/
Dandroid_hardware_HardwareBuffer.h37 JNIEnv* env, AHardwareBuffer* hardwareBuffer);
/frameworks/base/core/java/android/app/
DSharedElementCallback.java188 HardwareBuffer hardwareBuffer = bitmap.getHardwareBuffer(); in onCaptureSharedElementSnapshot() local
189 bundle.putParcelable(BUNDLE_SNAPSHOT_HARDWARE_BUFFER, hardwareBuffer); in onCaptureSharedElementSnapshot()
/frameworks/base/services/core/java/com/android/server/display/
DColorFade.java178 final SurfaceControl.ScreenshotHardwareBuffer hardwareBuffer = captureScreen(); in prepare() local
179 if (hardwareBuffer == null) { in prepare()
184 final boolean isProtected = hasProtectedContent(hardwareBuffer.getHardwareBuffer()); in prepare()
185 if (!createSurfaceControl(hardwareBuffer.containsSecureLayers())) { in prepare()
196 && setScreenshotTextureAndSetViewport(hardwareBuffer))) { in prepare()
/frameworks/base/core/jni/
Dandroid_hardware_HardwareBuffer.cpp237 JNIEnv* env, AHardwareBuffer* hardwareBuffer) { in android_hardware_HardwareBuffer_createFromAHardwareBuffer() argument
238 GraphicBuffer* buffer = AHardwareBuffer_to_GraphicBuffer(hardwareBuffer); in android_hardware_HardwareBuffer_createFromAHardwareBuffer()
Dandroid_graphics_GraphicBuffer.cpp246 AHardwareBuffer* hardwareBuffer) { in android_graphics_GraphicBuffer_createFromAHardwareBuffer() argument
247 GraphicBuffer* buffer = GraphicBuffer::fromAHardwareBuffer(hardwareBuffer); in android_graphics_GraphicBuffer_createFromAHardwareBuffer()
Dandroid_hardware_SensorManager.cpp245 AHardwareBuffer *hardwareBuffer = in nativeCreateDirectChannel() local
247 if (hardwareBuffer != nullptr) { in nativeCreateDirectChannel()
248 nativeHandle = AHardwareBuffer_getNativeHandle(hardwareBuffer); in nativeCreateDirectChannel()
Dandroid_view_Surface.cpp416 jobject hardwareBuffer, jint colorSpaceId) { in nativeAttachAndQueueBufferWithColorSpace() argument
419 android_hardware_HardwareBuffer_getNativeHardwareBuffer(env, hardwareBuffer); in nativeAttachAndQueueBufferWithColorSpace()
/frameworks/base/core/java/android/accessibilityservice/
DAccessibilityService.java2112 final HardwareBuffer hardwareBuffer = in takeScreenshot()
2116 final ScreenshotResult screenshot = new ScreenshotResult(hardwareBuffer, in takeScreenshot()
2583 private ScreenshotResult(@NonNull HardwareBuffer hardwareBuffer,
2585 Preconditions.checkNotNull(hardwareBuffer, "hardwareBuffer cannot be null");
2587 mHardwareBuffer = hardwareBuffer;
/frameworks/base/core/java/android/view/
DSurfaceControl.java671 public ScreenshotHardwareBuffer(HardwareBuffer hardwareBuffer, ColorSpace colorSpace, in ScreenshotHardwareBuffer() argument
673 mHardwareBuffer = hardwareBuffer; in ScreenshotHardwareBuffer()
686 private static ScreenshotHardwareBuffer createFromNative(HardwareBuffer hardwareBuffer, in createFromNative() argument
689 return new ScreenshotHardwareBuffer(hardwareBuffer, colorSpace, containsSecureLayers); in createFromNative()
733 void onScreenCaptureComplete(ScreenshotHardwareBuffer hardwareBuffer); in onScreenCaptureComplete() argument
742 public void onScreenCaptureComplete(ScreenshotHardwareBuffer hardwareBuffer) { in onScreenCaptureComplete() argument
743 mScreenshotHardwareBuffer = hardwareBuffer; in onScreenCaptureComplete()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/sensors/
DAsyncSensorManager.java104 HardwareBuffer hardwareBuffer) { in createDirectChannelImpl() argument
/frameworks/base/media/jni/
Dandroid_media_MediaCodec.cpp755 ScopedLocalRef<jobject> hardwareBuffer{ in getOutputFrame() local
760 frame, gFields.outputFrameHardwareBufferID, hardwareBuffer.get()); in getOutputFrame()
2062 AHardwareBuffer *hardwareBuffer = android_hardware_HardwareBuffer_getNativeHardwareBuffer( in android_media_MediaCodec_mapHardwareBuffer() local
2065 AHardwareBuffer_describe(hardwareBuffer, &desc); in android_media_MediaCodec_mapHardwareBuffer()
2082 hardwareBuffer, cpuUsage, -1 /* fence */, nullptr /* rect */, &planes); in android_media_MediaCodec_mapHardwareBuffer()
2149 (jlong)hardwareBuffer); in android_media_MediaCodec_mapHardwareBuffer()
2158 AHardwareBuffer_acquire(hardwareBuffer); in android_media_MediaCodec_mapHardwareBuffer()
2168 AHardwareBuffer *hardwareBuffer = (AHardwareBuffer *)context; in android_media_MediaCodec_closeMediaImage() local
2170 int err = AHardwareBuffer_unlock(hardwareBuffer, nullptr); in android_media_MediaCodec_closeMediaImage()
2176 AHardwareBuffer_release(hardwareBuffer); in android_media_MediaCodec_closeMediaImage()
[all …]
/frameworks/base/libs/hwui/apex/
Dandroid_bitmap.cpp299 AHardwareBuffer* buffer = bitmap->hardwareBuffer(); in ABitmap_getHardwareBuffer()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/sensors/
DFakeSensorManager.java145 HardwareBuffer hardwareBuffer) { in createDirectChannelImpl() argument

12