Home
last modified time | relevance | path

Searched refs:nativeBuffer (Results 1 - 25 of 61) sorted by relevance

123

/foundation/multimedia/image_effect/test/unittest/utils/
H A Dtest_native_buffer_utils.cpp36 OH_NativeBuffer *nativeBuffer = OH_NativeBuffer_Alloc(&config); in CreateNativeBuffer() local
37 if (nativeBuffer == nullptr) { in CreateNativeBuffer()
41 auto res = OH_NativeBuffer_Reference(nativeBuffer); in CreateNativeBuffer()
46 std::shared_ptr<OH_NativeBuffer> pNativeBuffer(nativeBuffer, [](OH_NativeBuffer *nb) { in CreateNativeBuffer()
/foundation/graphic/graphic_3d/lume/LumeRender/src/vulkan/ohos/
H A Dplatform_hardware_buffer_util.cpp36 OH_NativeBuffer* nativeBuffer = static_cast<OH_NativeBuffer*>(reinterpret_cast<void*>(hwBuffer)); in QueryHwBufferFormatProperties() local
37 if (nativeBuffer && extFunctions.vkGetNativeBufferPropertiesOHOS && extFunctions.vkGetMemoryNativeBufferOHOS) { in QueryHwBufferFormatProperties()
49 nativeBuffer, // buffer in QueryHwBufferFormatProperties()
115 OH_NativeBuffer* nativeBuffer = static_cast<OH_NativeBuffer*>(reinterpret_cast<void*>(hwBuffer)); in CreateHwPlatformImage() local
116 PLUGIN_ASSERT(nativeBuffer); in CreateHwPlatformImage()
126 nativeBuffer, // buffer in CreateHwPlatformImage()
/foundation/graphic/graphic_2d/rosen/modules/render_service/core/pipeline/
H A Drs_egl_image_manager.cpp90 explicit NativeWindowBufferObject(NativeWindowBuffer* nativeBuffer) in NativeWindowBufferObject() argument
91 : handle_(nativeBuffer) in NativeWindowBufferObject()
142 EGLClientBuffer CastToEGLClientBuffer(NativeWindowBuffer* nativeBuffer) in CastToEGLClientBuffer() argument
144 return static_cast<EGLClientBuffer>(nativeBuffer); in CastToEGLClientBuffer()
155 const NativeWindowBufferObject& nativeBuffer) in CreateEGLImage()
164 eglDisplay, eglContext, EGL_NATIVE_BUFFER_OHOS, CastToEGLClientBuffer(nativeBuffer), attrs); in CreateEGLImage()
218 auto nativeBuffer = Detail::CreateNativeWindowBuffer(buffer); in Create() local
219 if (nativeBuffer == nullptr) { in Create()
223 EGLImageKHR img = Detail::CreateEGLImage(eglDisplay, eglContext, nativeBuffer); in Create()
231 eglDisplay, img, Detail::CastToEGLClientBuffer(nativeBuffer in Create()
152 CreateEGLImage( EGLDisplay eglDisplay, EGLContext eglContext, const NativeWindowBufferObject& nativeBuffer) CreateEGLImage() argument
[all...]
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/platform/ohos/backend/
H A Dnative_buffer_utils.cpp31 bool GetNativeBufferFormatProperties(RsVulkanContext& vkContext, VkDevice device, OH_NativeBuffer* nativeBuffer, in GetNativeBufferFormatProperties() argument
41 VkResult err = vkContext.GetRsVulkanInterface().vkGetNativeBufferPropertiesOHOS(device, nativeBuffer, nbProps); in GetNativeBufferFormatProperties()
107 OH_NativeBuffer* nativeBuffer, VkNativeBufferPropertiesOHOS& nbProps, bool isProtected) in AllocateDeviceMemory()
140 nbImportInfo.buffer = nativeBuffer; in AllocateDeviceMemory()
184 OH_NativeBuffer* nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(nativeWindowBuffer); in MakeFromNativeWindowBuffer() local
185 if (nativeBuffer == nullptr) { in MakeFromNativeWindowBuffer()
196 if (!GetNativeBufferFormatProperties(vkContext, device, nativeBuffer, &nbFormatProps, &nbProps)) { in MakeFromNativeWindowBuffer()
212 if (!AllocateDeviceMemory(vkContext, &memory, image, nativeBuffer, nbProps, isProtected)) { in MakeFromNativeWindowBuffer()
290 OH_NativeBuffer* nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(nativeWindowBuffer); in MakeBackendTextureFromNativeBuffer() local
291 if (!nativeBuffer) { in MakeBackendTextureFromNativeBuffer()
106 AllocateDeviceMemory(RsVulkanContext& vkContext, VkDeviceMemory* memory, VkImage& image, OH_NativeBuffer* nativeBuffer, VkNativeBufferPropertiesOHOS& nbProps, bool isProtected) AllocateDeviceMemory() argument
[all...]
/foundation/graphic/graphic_surface/surface/test/unittest/
H A Dnative_buffer_test.cpp76 OH_NativeBuffer* nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(nativeWindowBuffer); in HWTEST_F() local
77 ASSERT_EQ(nativeBuffer, nullptr); in HWTEST_F()
594 OH_NativeBuffer* nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(nullptr); in HWTEST_F() local
595 ASSERT_EQ(nativeBuffer, nullptr); in HWTEST_F()
628 OH_NativeBuffer* nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(nativeWindowBuffer); in HWTEST_F() local
629 ASSERT_NE(nativeBuffer, nullptr); in HWTEST_F()
636 ASSERT_EQ(nativeBuffer, nativeBufferTmp); in HWTEST_F()
640 ret = OH_NativeBuffer_MapPlanes(nativeBuffer, &virAddr, &outPlanes); in HWTEST_F()
729 OH_NativeBuffer* nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(nativeWindowBuffer); in HWTEST_F() local
730 ASSERT_NE(nativeBuffer, nullpt in HWTEST_F()
779 OH_NativeBuffer* nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(nativeWindowBuffer); HWTEST_F() local
[all...]
/foundation/multimedia/image_framework/frameworks/kits/native/common/ndk/
H A Dimage_native.cpp70 uint32_t componentType, OH_NativeBuffer** nativeBuffer) in OH_ImageNative_GetByteBuffer()
72 if (nullptr == image || nullptr == image->imgNative || nullptr == nativeBuffer) { in OH_ImageNative_GetByteBuffer()
73 IMAGE_LOGE("Invalid parameter: image=0x%{public}p, nativeBuffer=0x%{public}p", image, nativeBuffer); in OH_ImageNative_GetByteBuffer()
84 *nativeBuffer = buffer->SurfaceBufferToNativeBuffer(); in OH_ImageNative_GetByteBuffer()
69 OH_ImageNative_GetByteBuffer(OH_ImageNative* image, uint32_t componentType, OH_NativeBuffer** nativeBuffer) OH_ImageNative_GetByteBuffer() argument
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/utils/
H A Ddata.cpp31 bool Data::BuildFromOHNativeBuffer(OH_NativeBuffer *nativeBuffer, size_t length) in BuildFromOHNativeBuffer() argument
33 return impl_->BuildFromOHNativeBuffer(nativeBuffer, length); in BuildFromOHNativeBuffer()
/foundation/multimedia/image_effect/interfaces/kits/native/
H A Dimage_effect.h264 * @param nativeBuffer Indicates the NativeBuffer that contains the image information
269 ImageEffect_ErrorCode OH_ImageEffect_SetInputNativeBuffer(OH_ImageEffect *imageEffect, OH_NativeBuffer *nativeBuffer);
276 * @param nativeBuffer Indicates the NativeBuffer that contains the image information
281 ImageEffect_ErrorCode OH_ImageEffect_SetOutputNativeBuffer(OH_ImageEffect *imageEffect, OH_NativeBuffer *nativeBuffer);
/foundation/multimedia/player_framework/test/fuzztest/screen_capture_fuzztest/screencapturendkacquirevideobuffer_fuzzer/
H A Dscreencaptureacquirevideobuffer_ndk_fuzzer.cpp111 OH_NativeBuffer *nativeBuffer = OH_AVScreenCapture_AcquireVideoBuffer(screenCapture, &fence, &timestamp, &damage); in FuzzScreenCaptureAcquireVideoBufferNdk() local
112 if (nativeBuffer != nullptr) { in FuzzScreenCaptureAcquireVideoBufferNdk()
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/
H A Dskia_data.cpp38 bool SkiaData::BuildFromOHNativeBuffer(OH_NativeBuffer* nativeBuffer, size_t length) in BuildFromOHNativeBuffer() argument
40 skData_ = SkData::MakeFromOHNativeBuffer(nativeBuffer, length); in BuildFromOHNativeBuffer()
H A Dskia_data.h38 bool BuildFromOHNativeBuffer(OH_NativeBuffer* nativeBuffer, size_t length) override;
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/converter/include/
H A Dpost_proc.h50 void **nativeBuffer, int &targetRowStride);
58 uint8_t **buffer, void *nativeBuffer = nullptr);
/foundation/graphic/graphic_2d/rosen/modules/render_service_client/core/modifier/
H A Drs_extended_modifier.cpp64 void* nativeBuffer = surfaceBuffer.GetRefPtr(); in DmaMemAlloc()
65 if (!nativeBuffer) { in DmaMemAlloc()
68 OHOS::RefBase *ref = reinterpret_cast<OHOS::RefBase *>(nativeBuffer); in DmaMemAlloc()
71 pixelMap->SetPixelsAddr(surfaceBuffer->GetVirAddr(), nativeBuffer, bufferSize, in DmaMemAlloc()
/foundation/multimedia/image_framework/interfaces/kits/native/include/image/
H A Dimage_native.h89 * @param nativeBuffer Indicates the pointer to the component buffer obtained.
95 uint32_t componentType, OH_NativeBuffer **nativeBuffer);
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/utils/
H A Ddata.h40 * @param nativeBuffer A pointer to OH_NativeBuffer.
44 bool BuildFromOHNativeBuffer(OH_NativeBuffer* nativeBuffer, size_t length);
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter/impl_interface/
H A Ddata_impl.h36 virtual bool BuildFromOHNativeBuffer(OH_NativeBuffer* nativeBuffer, size_t length) = 0;
/foundation/multimedia/av_codec/test/fuzztest/encoderapi11_fuzzer/
H A Dvideoenc_api11_sample.cpp347 uint32_t VEncAPI11FuzzSample::FlushSurf(OHNativeWindowBuffer *ohNativeWindowBuffer, OH_NativeBuffer *nativeBuffer) in FlushSurf() argument
357 int32_t err = OH_NativeBuffer_Unmap(nativeBuffer); in FlushSurf()
388 OH_NativeBuffer *nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(ohNativeWindowBuffer); in InputFuncSurface() local
390 err = OH_NativeBuffer_Map(nativeBuffer, &virAddr); in InputFuncSurface()
404 if (FlushSurf(ohNativeWindowBuffer, nativeBuffer)) { in InputFuncSurface()
/foundation/multimedia/media_foundation/tests/unittest/avbuffer/
H A Davbuffer_framework_unit_test.cpp736 auto nativeBuffer = OH_AVBuffer_GetNativeBuffer(buf); in HWTEST_F() local
737 EXPECT_NE(nullptr, nativeBuffer); in HWTEST_F()
738 EXPECT_EQ(0, OH_NativeBuffer_Unreference(nativeBuffer)); in HWTEST_F()
757 auto nativeBuffer = OH_AVBuffer_GetNativeBuffer(buf); in HWTEST_F() local
758 EXPECT_NE(nullptr, nativeBuffer); in HWTEST_F()
759 EXPECT_EQ(0, OH_NativeBuffer_Unreference(nativeBuffer)); in HWTEST_F()
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/common/src/
H A Dmemory_manager.cpp201 void* nativeBuffer = sb.GetRefPtr(); in Create()
202 int32_t err = ImageUtils::SurfaceBuffer_Reference(nativeBuffer); in Create()
209 extend.data = nativeBuffer; in Create()
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/converter/src/
H A Dpost_proc.cpp241 void *nativeBuffer = nullptr; in CenterDisplay() local
249 dstPixels = AllocDmaMemory(dstImageInfo, bufferSize, &nativeBuffer, targetRowStride); in CenterDisplay()
259 ReleaseBuffer(pixelMap.GetAllocatorType(), fd, bufferSize, &dstPixels, nativeBuffer); in CenterDisplay()
268 sptr<SurfaceBuffer> dstSurfaceBuffer(reinterpret_cast<SurfaceBuffer*> (nativeBuffer)); in CenterDisplay()
271 pixelMap.SetPixelsAddr(dstPixels, nativeBuffer, bufferSize, AllocatorType::DMA_ALLOC, nullptr); in CenterDisplay()
509 void **nativeBuffer, int &targetRowStride) in AllocDmaMemory()
520 *nativeBuffer = dstMemory->extend.data; in AllocDmaMemory()
528 uint64_t dataSize, uint8_t **buffer, void *nativeBuffer) in ReleaseBuffer()
539 if (nativeBuffer != nullptr) { in ReleaseBuffer()
540 int32_t err = ImageUtils::SurfaceBuffer_Unreference(static_cast<SurfaceBuffer*>(nativeBuffer)); in ReleaseBuffer()
508 AllocDmaMemory(ImageInfo info, const uint64_t bufferSize, void **nativeBuffer, int &targetRowStride) AllocDmaMemory() argument
527 ReleaseBuffer(AllocatorType allocatorType, int fd, uint64_t dataSize, uint8_t **buffer, void *nativeBuffer) ReleaseBuffer() argument
[all...]
/foundation/multimedia/av_codec/test/moduletest/vcodec/encoder/include/
H A Dvideoenc_api11_sample.h135 uint32_t FlushSurf(OHNativeWindowBuffer *ohNativeWindowBuffer, OH_NativeBuffer *nativeBuffer);
144 int32_t InitBuffer(OHNativeWindowBuffer *&ohNativeWindowBuffer, OH_NativeBuffer *&nativeBuffer, uint8_t *&dst);
/foundation/multimedia/av_codec/test/moduletest/vcodec/encoder/src/
H A Dvideoenc_api11_sample.cpp568 uint32_t VEncAPI11Sample::FlushSurf(OHNativeWindowBuffer *ohNativeWindowBuffer, OH_NativeBuffer *nativeBuffer) in FlushSurf() argument
579 ret = OH_NativeBuffer_Unmap(nativeBuffer); in FlushSurf()
599 OH_NativeBuffer *nativeBuffer = nullptr; in InputFuncSurface() local
601 int err = InitBuffer(ohNativeWindowBuffer, nativeBuffer, dst); in InputFuncSurface()
623 err = FlushSurf(ohNativeWindowBuffer, nativeBuffer); in InputFuncSurface()
632 OH_NativeBuffer *&nativeBuffer, uint8_t *&dst) in InitBuffer()
646 nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(ohNativeWindowBuffer); in InitBuffer()
648 err = OH_NativeBuffer_Map(nativeBuffer, &virAddr); in InitBuffer()
655 const SurfaceBuffer *sbuffer = SurfaceBuffer::NativeBufferToSurfaceBuffer(nativeBuffer); in InitBuffer()
631 InitBuffer(OHNativeWindowBuffer *&ohNativeWindowBuffer, OH_NativeBuffer *&nativeBuffer, uint8_t *&dst) InitBuffer() argument
H A Dvideoenc_ndk_sample.cpp450 uint32_t VEncNdkSample::FlushSurf(OHNativeWindowBuffer *ohNativeWindowBuffer, OH_NativeBuffer *nativeBuffer) in FlushSurf() argument
460 int32_t err = OH_NativeBuffer_Unmap(nativeBuffer); in FlushSurf()
496 OH_NativeBuffer *nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(ohNativeWindowBuffer); in InputFuncSurface() local
498 err = OH_NativeBuffer_Map(nativeBuffer, &virAddr); in InputFuncSurface()
505 const SurfaceBuffer *sbuffer = SurfaceBuffer::NativeBufferToSurfaceBuffer(nativeBuffer); in InputFuncSurface()
521 if (FlushSurf(ohNativeWindowBuffer, nativeBuffer)) in InputFuncSurface()
/foundation/multimedia/av_codec/test/moduletest/vcodec/encoder/src/InnerAPI/
H A Dvideoenc_ndk_inner_sample.cpp538 int32_t VEncNdkInnerSample::InputProcess(OH_NativeBuffer *nativeBuffer, OHNativeWindowBuffer *ohNativeWindowBuffer) in InputProcess() argument
549 ret = OH_NativeBuffer_Unmap(nativeBuffer); in InputProcess()
794 OH_NativeBuffer *nativeBuffer = nullptr; in InputFuncSurface() local
796 int err = InitBuffer(ohNativeWindowBuffer, nativeBuffer, dst); in InputFuncSurface()
818 err = InputProcess(nativeBuffer, ohNativeWindowBuffer); in InputFuncSurface()
828 OH_NativeBuffer *&nativeBuffer, uint8_t *&dst) in InitBuffer()
842 nativeBuffer = OH_NativeBufferFromNativeWindowBuffer(ohNativeWindowBuffer); in InitBuffer()
844 err = OH_NativeBuffer_Map(nativeBuffer, &virAddr); in InitBuffer()
851 const SurfaceBuffer *sbuffer = SurfaceBuffer::NativeBufferToSurfaceBuffer(nativeBuffer); in InitBuffer()
827 InitBuffer(OHNativeWindowBuffer *&ohNativeWindowBuffer, OH_NativeBuffer *&nativeBuffer, uint8_t *&dst) InitBuffer() argument
/foundation/multimedia/image_framework/plugins/common/libs/image/libbmpplugin/src/
H A Dbmp_decoder.cpp171 void* nativeBuffer = sb.GetRefPtr(); in DmaMemAlloc()
172 int32_t err = ImageUtils::SurfaceBuffer_Reference(nativeBuffer); in DmaMemAlloc()
179 context.pixelsBuffer.context = nativeBuffer; in DmaMemAlloc()

Completed in 20 milliseconds

123