Lines Matching defs:surface
34 NWebOutputFrameCallbackImpl(wptr<Surface> surface, NWebSurfaceAdapter *adapter) : surface_(surface),
54 std::shared_ptr<NWebCreateInfoImpl> NWebSurfaceAdapter::GetCreateInfo(sptr<Surface> surface,
59 createInfo->SetProducerSurface(reinterpret_cast<void *>(&surface));
61 if (surface == nullptr) {
66 createInfo->SetWidth((width == 0) ? (uint32_t)surface->GetDefaultWidth() : width);
67 createInfo->SetHeight((height == 0) ? (uint32_t)surface->GetDefaultHeight() : height);
69 wptr<Surface> surfaceWeak(surface);
77 sptr<Surface> surface = surfaceWeak.promote();
78 if (surface == nullptr) {
79 WVLOG_E("surface is nullptr or has expired");
83 sptr<SurfaceBuffer> surfaceBuffer = this->RequestBuffer(surface, width, height);
89 surface->CancelBuffer(surfaceBuffer);
93 return this->FlushBuffer(surface, surfaceBuffer, width, height);
96 sptr<SurfaceBuffer> NWebSurfaceAdapter::RequestBuffer(sptr<Surface> surface, uint32_t width, uint32_t height)
98 if (surface == nullptr) {
113 SurfaceError ret = surface->RequestBuffer(surfaceBuffer, releaseFence, config);
115 WVLOG_E("fail to request buffer from surface, errorcode=%{public}d", ret);
165 sptr<Surface> surface, sptr<SurfaceBuffer> surfaceBuffer, uint32_t width, uint32_t height)
167 if (surface == nullptr) {
179 SurfaceError ret = surface->FlushBuffer(surfaceBuffer, -1, flushConfig);