mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2025-01-24 03:49:01 +00:00
The RequestBuffer interface is enabled
Signed-off-by: BruceXuXu <xufeilong2@huawei.com>
This commit is contained in:
parent
846bfd3a97
commit
b3398c6582
@ -95,7 +95,7 @@ int32_t NativeWindowRequestBuffer(struct NativeWindow *window,
|
|||||||
.timeout = window->config.timeout,
|
.timeout = window->config.timeout,
|
||||||
};
|
};
|
||||||
OHOS::sptr<OHOS::SurfaceBuffer> sfbuffer;
|
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;
|
return OHOS::GSERROR_NO_BUFFER;
|
||||||
}
|
}
|
||||||
NativeWindowBuffer *nwBuffer = new NativeWindowBuffer();
|
NativeWindowBuffer *nwBuffer = new NativeWindowBuffer();
|
||||||
@ -279,15 +279,17 @@ NativeWindow::NativeWindow() : NativeWindowMagic(NATIVE_OBJECT_MAGIC_WINDOW)
|
|||||||
BLOGD("NativeWindow %p", this);
|
BLOGD("NativeWindow %p", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeWindow::~NativeWindow() {
|
NativeWindow::~NativeWindow()
|
||||||
|
{
|
||||||
BLOGD("~NativeWindow %p", this);
|
BLOGD("~NativeWindow %p", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeWindowBuffer::~NativeWindowBuffer() {
|
NativeWindowBuffer::~NativeWindowBuffer()
|
||||||
|
{
|
||||||
BLOGD("~NativeWindowBuffer %p", this);
|
BLOGD("~NativeWindowBuffer %p", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
NativeWindowBuffer::NativeWindowBuffer() : NativeWindowMagic(NATIVE_OBJECT_MAGIC_WINDOW_BUFFER)
|
NativeWindowBuffer::NativeWindowBuffer() : NativeWindowMagic(NATIVE_OBJECT_MAGIC_WINDOW_BUFFER)
|
||||||
{
|
{
|
||||||
BLOGD("NativeWindowBuffer %p", this);
|
BLOGD("NativeWindowBuffer %p", this);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ public:
|
|||||||
virtual sptr<IBufferProducer> GetProducer() const = 0;
|
virtual sptr<IBufferProducer> GetProducer() const = 0;
|
||||||
|
|
||||||
// use RequestBufferNoFence or RequestBufferWithFence
|
// use RequestBufferNoFence or RequestBufferWithFence
|
||||||
__attribute__((deprecated))
|
|
||||||
virtual GSError RequestBuffer(sptr<SurfaceBuffer>& buffer,
|
virtual GSError RequestBuffer(sptr<SurfaceBuffer>& buffer,
|
||||||
int32_t &fence, BufferRequestConfig &config) = 0;
|
int32_t &fence, BufferRequestConfig &config) = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user