mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-24 15:41:02 +00:00
commit
bc735638b5
@ -29,7 +29,7 @@ std::unique_ptr<RSSurfaceFrame> RSSurfaceOhosRaster::RequestFrame(int32_t width,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
ROSEN_LOGE("mengkun RSSurfaceOhos RequestFrame start");
|
ROSEN_LOGE("RSSurfaceOhos RequestFrame start");
|
||||||
|
|
||||||
std::unique_ptr<RSSurfaceFrameOhosRaster> frame = std::make_unique<RSSurfaceFrameOhosRaster>(width, height);
|
std::unique_ptr<RSSurfaceFrameOhosRaster> frame = std::make_unique<RSSurfaceFrameOhosRaster>(width, height);
|
||||||
SurfaceError err = producer_->RequestBuffer(frame->buffer_, frame->releaseFence_, frame->requestConfig_);
|
SurfaceError err = producer_->RequestBuffer(frame->buffer_, frame->releaseFence_, frame->requestConfig_);
|
||||||
@ -46,7 +46,7 @@ bool RSSurfaceOhosRaster::FlushFrame(std::unique_ptr<RSSurfaceFrame>& frame)
|
|||||||
// RSSurfaceOhosRaster is the class for platform OHOS, the input pointer should be the pointer to the class
|
// RSSurfaceOhosRaster is the class for platform OHOS, the input pointer should be the pointer to the class
|
||||||
// RSSurfaceFrameOhos.
|
// RSSurfaceFrameOhos.
|
||||||
// We use static_cast instead of RTTI and dynamic_cast which are not permitted
|
// We use static_cast instead of RTTI and dynamic_cast which are not permitted
|
||||||
ROSEN_LOGE("mengkun RSSurfaceOhos Flushframe start");
|
ROSEN_LOGE("RSSurfaceOhos Flushframe start");
|
||||||
RSSurfaceFrameOhosRaster* oriFramePtr = static_cast<RSSurfaceFrameOhosRaster*>(frame.get());
|
RSSurfaceFrameOhosRaster* oriFramePtr = static_cast<RSSurfaceFrameOhosRaster*>(frame.get());
|
||||||
SurfaceError err = producer_->FlushBuffer(oriFramePtr->buffer_, oriFramePtr->releaseFence_, oriFramePtr->flushConfig_);
|
SurfaceError err = producer_->FlushBuffer(oriFramePtr->buffer_, oriFramePtr->releaseFence_, oriFramePtr->flushConfig_);
|
||||||
if (err != SURFACE_ERROR_OK) {
|
if (err != SURFACE_ERROR_OK) {
|
||||||
|
@ -129,13 +129,13 @@ void RSRenderThread::RecvTransactionData(std::unique_ptr<RSTransactionData>& tra
|
|||||||
|
|
||||||
void RSRenderThread::RequestNextVSync()
|
void RSRenderThread::RequestNextVSync()
|
||||||
{
|
{
|
||||||
ROSEN_LOGI("mengkun RequestNextVSync+++.");
|
ROSEN_LOGI("RequestNextVSync+++.");
|
||||||
ROSEN_TRACE_BEGIN(BYTRACE_TAG_GRAPHIC_AGP, "RSRenderThread::RequestNextVSync");
|
ROSEN_TRACE_BEGIN(BYTRACE_TAG_GRAPHIC_AGP, "RSRenderThread::RequestNextVSync");
|
||||||
if (vsyncClient_ != nullptr) {
|
if (vsyncClient_ != nullptr) {
|
||||||
ROSEN_LOGI("RSRenderThread RequestNextVSync.");
|
ROSEN_LOGI("RSRenderThread RequestNextVSync.");
|
||||||
vsyncClient_->RequestNextVsync();
|
vsyncClient_->RequestNextVsync();
|
||||||
}
|
}
|
||||||
ROSEN_LOGI("mengkun RequestNextVSync---.");
|
ROSEN_LOGI("RequestNextVSync---.");
|
||||||
ROSEN_TRACE_END(BYTRACE_TAG_GRAPHIC_AGP);
|
ROSEN_TRACE_END(BYTRACE_TAG_GRAPHIC_AGP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ void RSRenderThreadVisitor::ProcessRootRenderNode(RSRootRenderNode& node)
|
|||||||
RenderContext* rc = RSRenderThread::Instance().GetRenderContext();
|
RenderContext* rc = RSRenderThread::Instance().GetRenderContext();
|
||||||
rsSurface->SetRenderContext(rc);
|
rsSurface->SetRenderContext(rc);
|
||||||
#endif
|
#endif
|
||||||
ROSEN_LOGE("mengkun RSRenderThreadVisitor RequestFrame start");
|
ROSEN_LOGE("RSRenderThreadVisitor RequestFrame start");
|
||||||
auto surfaceFrame = rsSurface->RequestFrame(node.GetWidth(), node.GetHeight());
|
auto surfaceFrame = rsSurface->RequestFrame(node.GetWidth(), node.GetHeight());
|
||||||
if (surfaceFrame == nullptr) {
|
if (surfaceFrame == nullptr) {
|
||||||
ROSEN_LOGE("Request Frame Failed");
|
ROSEN_LOGE("Request Frame Failed");
|
||||||
@ -120,7 +120,7 @@ void RSRenderThreadVisitor::ProcessRootRenderNode(RSRootRenderNode& node)
|
|||||||
isIdle_ = false;
|
isIdle_ = false;
|
||||||
ProcessRenderNode(node);
|
ProcessRenderNode(node);
|
||||||
|
|
||||||
ROSEN_LOGE("mengkun RSRenderThreadVisitor FlushFrame start");
|
ROSEN_LOGE("RSRenderThreadVisitor FlushFrame start");
|
||||||
rsSurface->FlushFrame(surfaceFrame);
|
rsSurface->FlushFrame(surfaceFrame);
|
||||||
|
|
||||||
delete canvas_;
|
delete canvas_;
|
||||||
|
@ -114,7 +114,7 @@ void RSUIDirector::SetSurfaceNodeSize(int width, int height)
|
|||||||
|
|
||||||
void RSUIDirector::SetRoot(NodeId root)
|
void RSUIDirector::SetRoot(NodeId root)
|
||||||
{
|
{
|
||||||
ROSEN_LOGE("mengkun SetRoot");
|
ROSEN_LOGE("SetRoot");
|
||||||
if (root_ == root) {
|
if (root_ == root) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user