mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
graphic_2d ICSL 一般意见修改
Signed-off-by: 花祭 <jiazihao1@h-partners.com> Change-Id: I15ecd8ea11c56c49dedb03c17e81677c28904c08
This commit is contained in:
parent
25b009e829
commit
56ce833758
@ -130,12 +130,13 @@ int32_t OH_NativeImage_GetSurfaceId(OH_NativeImage* image, uint64_t* surfaceId)
|
||||
BLOGE("parameter error");
|
||||
return SURFACE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
*surfaceId = image->consumer->GetUniqueId();
|
||||
|
||||
if (image->pSurface == nullptr) {
|
||||
image->pSurface = Surface::CreateSurfaceAsProducer(image->producer);
|
||||
}
|
||||
BLOGE_CHECK_AND_RETURN_RET(image->pSurface != nullptr, SURFACE_ERROR_UNKOWN, "pSurface is null");
|
||||
|
||||
*surfaceId = image->consumer->GetUniqueId();
|
||||
return SURFACE_ERROR_OK;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,6 @@ void SurfaceImage::UpdateSurfaceInfo(uint32_t seqNum, sptr<SurfaceBuffer> buffer
|
||||
int releaseFence = -1;
|
||||
auto iter = imageCacheSeqs_.find(currentSurfaceImage_);
|
||||
if (iter != imageCacheSeqs_.end() && iter->second.eglSync_ != EGL_NO_SYNC_KHR) {
|
||||
// PLANNING: use eglDupNativeFenceFDOHOS in the future.
|
||||
releaseFence = eglDupNativeFenceFDANDROID(eglDisplay_, iter->second.eglSync_);
|
||||
}
|
||||
// There is no need to close this fd, because in function ReleaseBuffer it will be closed.
|
||||
@ -126,7 +125,7 @@ SurfaceError SurfaceImage::UpdateSurfaceImage()
|
||||
// acquire buffer
|
||||
sptr<SurfaceBuffer> buffer = nullptr;
|
||||
sptr<SyncFence> acquireFence = SyncFence::InvalidFence();
|
||||
int64_t timestamp;
|
||||
int64_t timestamp = 0;
|
||||
Rect damage;
|
||||
ret = AcquireBuffer(buffer, acquireFence, timestamp, damage);
|
||||
if (ret != SURFACE_ERROR_OK) {
|
||||
@ -307,8 +306,8 @@ void SurfaceImage::DestroyEGLImageBySeq(uint32_t seqNum)
|
||||
auto iter = imageCacheSeqs_.find(seqNum);
|
||||
if (iter != imageCacheSeqs_.end()) {
|
||||
DestroyEGLImage(iter->second.eglImage_);
|
||||
imageCacheSeqs_.erase(seqNum);
|
||||
}
|
||||
imageCacheSeqs_.erase(seqNum);
|
||||
}
|
||||
|
||||
void SurfaceImage::NewBufferDestroyEGLImage(bool isNewBuffer, uint32_t seqNum)
|
||||
|
Loading…
Reference in New Issue
Block a user