diff --git a/src/rendering/FileReporter.cpp b/src/rendering/FileReporter.cpp index 34a0d18b5e..0f2534e315 100644 --- a/src/rendering/FileReporter.cpp +++ b/src/rendering/FileReporter.cpp @@ -108,7 +108,7 @@ void FileReporter::reportData() { static int64_t GetOldRenderTime(RenderCache* cache) { // 性能统计增加了数据字段,部分含义发生了改变,这里拼装出原先的 // renderingTime,确保数据上报结果跟之前一致。 - return cache->totalTime - cache->presentingTime - cache->imageDecodingTime; + return cache->totalTime - cache->presentingTime; } void FileReporter::recordPerformance(RenderCache* cache) { diff --git a/src/rendering/PAGPlayer.cpp b/src/rendering/PAGPlayer.cpp index c475f99852..22e9bbeb38 100644 --- a/src/rendering/PAGPlayer.cpp +++ b/src/rendering/PAGPlayer.cpp @@ -307,9 +307,7 @@ bool PAGPlayer::flushInternal(BackendSemaphore* signalSemaphore) { clock.mark("presenting"); renderCache->renderingTime = clock.measure("", "rendering"); renderCache->presentingTime = clock.measure("rendering", "presenting"); - auto knownTime = renderCache->imageDecodingTime + renderCache->textureUploadingTime + - renderCache->programCompilingTime + renderCache->hardwareDecodingTime + - renderCache->softwareDecodingTime; + auto knownTime = renderCache->textureUploadingTime + renderCache->programCompilingTime; renderCache->presentingTime -= knownTime; renderCache->totalTime = clock.measure("", "presenting"); // auto composition = stage->getRootComposition(); @@ -391,12 +389,13 @@ int64_t PAGPlayer::renderingTime() { LockGuard autoLock(rootLocker); // TODO(domrjchen): update the performance monitoring panel of PAGViewer to display the new // properties - return renderCache->totalTime - renderCache->presentingTime - renderCache->imageDecodingTime; + return renderCache->totalTime - renderCache->presentingTime; } int64_t PAGPlayer::imageDecodingTime() { LockGuard autoLock(rootLocker); - return renderCache->imageDecodingTime; + return renderCache->imageDecodingTime + renderCache->hardwareDecodingTime + + renderCache->softwareDecodingTime; } int64_t PAGPlayer::presentingTime() {