fix composer issue and codedex:wq

Signed-off-by: andrewhw <zhangzhao62@huawei.com>
This commit is contained in:
andrewhw 2022-03-02 16:55:24 +08:00
parent be14e8b580
commit b13db153ed
5 changed files with 5 additions and 10 deletions

View File

@ -507,10 +507,6 @@ GSError BufferQueue::AllocBuffer(sptr<SurfaceBufferImpl> &buffer,
return ret;
}
if (buffer == nullptr) {
BLOGN_FAILURE_ID_RET(sequence, GSERROR_INVALID_ARGUMENTS);
}
BufferElement ele = {
.buffer = buffer,
.state = BUFFER_STATE_REQUESTED,

View File

@ -59,7 +59,7 @@ public:
SurfaceError SetDefaultSize(int32_t width, int32_t height);
SurfaceError UpdateSurfaceImage();
uint64_t GetTimeStamp();
int64_t GetTimeStamp();
// update buffer available state, updateSurfaceImage_ and a private mutex
void OnUpdateBufferAvailableState(bool updated)

View File

@ -201,7 +201,7 @@ SurfaceError SurfaceImage::DetachContext()
return SURFACE_ERROR_OK;
}
uint64_t SurfaceImage::GetTimeStamp()
int64_t SurfaceImage::GetTimeStamp()
{
std::lock_guard<std::mutex> lockGuard(opMutex_);
return currentTimeStamp_;

View File

@ -325,9 +325,9 @@ void HdiLayer::CheckRet(int32_t ret, const char* func)
void HdiLayer::Dump(std::string &result)
{
const int offset = count;
for (int i = 0; i < FRAME_RECORDS_NUM; i++) {
int order = (offset + i) % FRAME_RECORDS_NUM;
const uint32_t offset = count;
for (uint32_t i = 0; i < FRAME_RECORDS_NUM; i++) {
uint32_t order = (offset + i) % FRAME_RECORDS_NUM;
if (presentTimeRecords[order].presentFence != SyncFence::INVALID_FENCE) {
presentTimeRecords[order].presentTime = presentTimeRecords[order].presentFence->SyncFileReadTimestamp();
presentTimeRecords[order].presentFence = SyncFence::INVALID_FENCE;

View File

@ -42,7 +42,6 @@ std::unique_ptr<RSSurfaceFrame> RSSurfaceOhosRaster::RequestFrame(int32_t width,
int res = tempFence->Wait(3000);
if (res < 0) {
ROSEN_LOGE("RsDebug RSProcessor::RequestFrame this buffer is not available");
//TODO deal with the buffer is not available
}
std::unique_ptr<RSSurfaceFrame> ret(std::move(frame));
return ret;