mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 09:10:54 +00:00
!10209 fix GetPixelmap too much
Merge pull request !10209 from hehao/para0419
This commit is contained in:
commit
7b9e7e61ec
@ -1091,6 +1091,9 @@ bool RSRenderServiceConnection::GetPixelmap(NodeId id, const std::shared_ptr<Med
|
||||
}
|
||||
mainThread_->PostSyncTask(getPixelmapTask);
|
||||
} else if (tid == UNI_RENDER_THREAD_INDEX) {
|
||||
if (!renderThread_.IsIdle()) {
|
||||
return false;
|
||||
}
|
||||
renderThread_.PostSyncTask(getDrawablePixelmapTask);
|
||||
} else {
|
||||
RSTaskDispatcher::GetInstance().PostTask(
|
||||
|
@ -191,6 +191,11 @@ void RSUniRenderThread::PostSyncTask(const std::function<void()>& task)
|
||||
handler_->PostSyncTask(task, AppExecFwk::EventQueue::Priority::IMMEDIATE);
|
||||
}
|
||||
|
||||
bool RSUniRenderThread::IsIdle() const
|
||||
{
|
||||
return handler_ ? handler_->IsIdle() : false;
|
||||
}
|
||||
|
||||
void RSUniRenderThread::Sync(std::unique_ptr<RSRenderThreadParams>& stagingRenderThreadParams)
|
||||
{
|
||||
renderThreadParams_ = std::move(stagingRenderThreadParams);
|
||||
|
@ -51,6 +51,7 @@ public:
|
||||
void PostTask(RSTaskMessage::RSTask task, const std::string& name, int64_t delayTime,
|
||||
AppExecFwk::EventQueue::Priority priority = AppExecFwk::EventQueue::Priority::HIGH);
|
||||
void PostSyncTask(const std::function<void()>& task);
|
||||
bool IsIdle() const;
|
||||
void Render();
|
||||
void ReleaseSelfDrawingNodeBuffer();
|
||||
std::shared_ptr<RSBaseRenderEngine> GetRenderEngine() const;
|
||||
|
Loading…
Reference in New Issue
Block a user