The RequestBuffer interface is enabled

Signed-off-by: BruceXuXu <xufeilong2@huawei.com>
This commit is contained in:
BruceXuXu 2022-01-04 11:55:20 +08:00
parent 846bfd3a97
commit b3398c6582
2 changed files with 6 additions and 5 deletions

View File

@ -95,7 +95,7 @@ int32_t NativeWindowRequestBuffer(struct NativeWindow *window,
.timeout = window->config.timeout,
};
OHOS::sptr<OHOS::SurfaceBuffer> sfbuffer;
if(window->surface->RequestBuffer(sfbuffer, *fenceFd, config) != OHOS::SurfaceError::SURFACE_ERROR_OK) {
if(window->surface->RequestBuffer(sfbuffer, *fenceFd, config) != OHOS::GSError::GSERROR_OK) {
return OHOS::GSERROR_NO_BUFFER;
}
NativeWindowBuffer *nwBuffer = new NativeWindowBuffer();
@ -279,15 +279,17 @@ NativeWindow::NativeWindow() : NativeWindowMagic(NATIVE_OBJECT_MAGIC_WINDOW)
BLOGD("NativeWindow %p", this);
}
NativeWindow::~NativeWindow() {
NativeWindow::~NativeWindow()
{
BLOGD("~NativeWindow %p", this);
}
NativeWindowBuffer::~NativeWindowBuffer() {
NativeWindowBuffer::~NativeWindowBuffer()
{
BLOGD("~NativeWindowBuffer %p", this);
}
NativeWindowBuffer::NativeWindowBuffer() : NativeWindowMagic(NATIVE_OBJECT_MAGIC_WINDOW_BUFFER)
{
BLOGD("NativeWindowBuffer %p", this);
}
}

View File

@ -36,7 +36,6 @@ public:
virtual sptr<IBufferProducer> GetProducer() const = 0;
// use RequestBufferNoFence or RequestBufferWithFence
__attribute__((deprecated))
virtual GSError RequestBuffer(sptr<SurfaceBuffer>& buffer,
int32_t &fence, BufferRequestConfig &config) = 0;