diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/compositor_frame_sink_impl.cc index d8e93555ed4079d899871424ec108e1fa5581fce..5f80ece24cc79266299e8ac1d5f0514d0cd74185 100644 --- a/components/viz/service/frame_sinks/compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/compositor_frame_sink_impl.cc @@ -156,8 +156,8 @@ void CompositorFrameSinkImpl::SubmitCompositorFrame( absl::optional hit_test_region_list, uint64_t submit_time) { #if defined(REPORT_SYS_EVENT) - auto count = frame.metadata.dropped_frame_count; - auto duration = frame.metadata.dropped_frame_duration; + uint32_t count = static_cast(frame.metadata.dropped_frame_count); + uint64_t duration = static_cast(frame.metadata.dropped_frame_duration); if (!!count && !!duration) { ReportVideoFrameDropStats(count, duration); } diff --git a/ohos_nweb/src/sysevent/event_reporter.cc b/ohos_nweb/src/sysevent/event_reporter.cc index 55ddc4708dfb0534e9ccca16f42e42feb96246da..f87d0d8402aae207461aea09b543d425a456b971 100644 --- a/ohos_nweb/src/sysevent/event_reporter.cc +++ b/ohos_nweb/src/sysevent/event_reporter.cc @@ -214,11 +214,11 @@ void ReportAudioFrameDropStats(int frameCount) { {AUDIO_BLANK_FRAME_COUNT, std::to_string(frameCount)}); } -void ReportVideoFrameDropStats(int64_t frameCount, int64_t frameDuration) { +void ReportVideoFrameDropStats(uint32_t frameCount, uint64_t frameDuration) { OhosAdapterHelper::GetInstance().GetHiSysEventAdapterInstance().Write( VIDEO_FRAME_DROP_STATISTICS, HiSysEventAdapter::EventType::STATISTIC, - {VIDEO_FRAME_DROPPED_COUNT, std::to_string(frameCount), - VIDEO_FRAME_DROPPED_DURATION, std::to_string(frameDuration)}); + {VIDEO_FRAME_DROPPED_COUNT, frameCount, + VIDEO_FRAME_DROPPED_DURATION, frameDuration}); } void ReportSiteIsolationMode(const std::string site_isolation_status) { diff --git a/ohos_nweb/src/sysevent/event_reporter.h b/ohos_nweb/src/sysevent/event_reporter.h index 1331cf96354019a99a8457b88b89346d5412ec16..a76148356924d3b83df65d182e75c2e1d6bbee87 100644 --- a/ohos_nweb/src/sysevent/event_reporter.h +++ b/ohos_nweb/src/sysevent/event_reporter.h @@ -63,7 +63,7 @@ void ReportVideoPlayErrorInfo(const std::string errorType, void ReportAudioFrameDropStats(int frameCount); -void ReportVideoFrameDropStats(int64_t frameCount, int64_t frameDuration); +void ReportVideoFrameDropStats(uint32_t frameCount, uint64_t frameDuration); void ReportSiteIsolationMode(const std::string site_isolation_status); #endif