Loading core/jni/android_view_Surface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -485,7 +485,7 @@ static void setSurface(JNIEnv* env, jclass clazz, jlong rendererPtr, jlong surfa static void draw(JNIEnv* env, jclass clazz, jlong rendererPtr) { RenderProxy* proxy = reinterpret_cast<RenderProxy*>(rendererPtr); nsecs_t vsync = systemTime(CLOCK_MONOTONIC); nsecs_t vsync = systemTime(SYSTEM_TIME_MONOTONIC); UiFrameInfoBuilder(proxy->frameInfo()) .setVsync(vsync, vsync) .addFlag(FrameInfoFlags::SurfaceCanvas); Loading core/jni/android_view_ThreadedRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -957,7 +957,7 @@ static jobject android_view_ThreadedRenderer_createHardwareBitmapFromRenderNode( // to all 0s. proxy.setLightAlpha(0, 0); proxy.setLightGeometry((Vector3){0, 0, 0}, 0); nsecs_t vsync = systemTime(CLOCK_MONOTONIC); nsecs_t vsync = systemTime(SYSTEM_TIME_MONOTONIC); UiFrameInfoBuilder(proxy.frameInfo()) .setVsync(vsync, vsync) .addFlag(FrameInfoFlags::SurfaceCanvas); Loading libs/hwui/FrameInfo.h +4 −4 Original line number Diff line number Diff line Loading @@ -100,15 +100,15 @@ class FrameInfo { public: void importUiThreadInfo(int64_t* info); void markSyncStart() { set(FrameInfoIndex::SyncStart) = systemTime(CLOCK_MONOTONIC); } void markSyncStart() { set(FrameInfoIndex::SyncStart) = systemTime(SYSTEM_TIME_MONOTONIC); } void markIssueDrawCommandsStart() { set(FrameInfoIndex::IssueDrawCommandsStart) = systemTime(CLOCK_MONOTONIC); set(FrameInfoIndex::IssueDrawCommandsStart) = systemTime(SYSTEM_TIME_MONOTONIC); } void markSwapBuffers() { set(FrameInfoIndex::SwapBuffers) = systemTime(CLOCK_MONOTONIC); } void markSwapBuffers() { set(FrameInfoIndex::SwapBuffers) = systemTime(SYSTEM_TIME_MONOTONIC); } void markFrameCompleted() { set(FrameInfoIndex::FrameCompleted) = systemTime(CLOCK_MONOTONIC); } void markFrameCompleted() { set(FrameInfoIndex::FrameCompleted) = systemTime(SYSTEM_TIME_MONOTONIC); } void addFlag(int frameInfoFlag) { set(FrameInfoIndex::Flags) |= static_cast<uint64_t>(frameInfoFlag); Loading libs/hwui/ProfileData.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ void ProfileData::reset() { mSlowFrameCounts.fill(0); mTotalFrameCount = 0; mJankFrameCount = 0; mStatStartTime = systemTime(CLOCK_MONOTONIC); mStatStartTime = systemTime(SYSTEM_TIME_MONOTONIC); } void ProfileData::reportFrame(int64_t duration) { Loading libs/hwui/hwui/AnimatedImageDrawable.cpp +2 −8 Original line number Diff line number Diff line Loading @@ -24,12 +24,6 @@ #include <optional> #ifdef __APPLE__ // macOS SDK 10.10 does not support CLOCK_MONOTONIC, which is not an issue since // the value of the argument is not used in the host definition of systemTime #define CLOCK_MONOTONIC #endif namespace android { AnimatedImageDrawable::AnimatedImageDrawable(sk_sp<SkAnimatedImage> animatedImage, size_t bytesUsed) Loading Loading @@ -70,7 +64,7 @@ bool AnimatedImageDrawable::nextSnapshotReady() const { // Only called on the RenderThread while UI thread is locked. bool AnimatedImageDrawable::isDirty(nsecs_t* outDelay) { *outDelay = 0; const nsecs_t currentTime = systemTime(CLOCK_MONOTONIC); const nsecs_t currentTime = systemTime(SYSTEM_TIME_MONOTONIC); const nsecs_t lastWallTime = mLastWallTime; mLastWallTime = currentTime; Loading Loading @@ -250,7 +244,7 @@ int AnimatedImageDrawable::drawStaging(SkCanvas* canvas) { bool update = false; { const nsecs_t currentTime = systemTime(CLOCK_MONOTONIC); const nsecs_t currentTime = systemTime(SYSTEM_TIME_MONOTONIC); std::unique_lock lock{mSwapLock}; // mLastWallTime starts off at 0. If it is still 0, just update it to // the current time and avoid updating Loading Loading
core/jni/android_view_Surface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -485,7 +485,7 @@ static void setSurface(JNIEnv* env, jclass clazz, jlong rendererPtr, jlong surfa static void draw(JNIEnv* env, jclass clazz, jlong rendererPtr) { RenderProxy* proxy = reinterpret_cast<RenderProxy*>(rendererPtr); nsecs_t vsync = systemTime(CLOCK_MONOTONIC); nsecs_t vsync = systemTime(SYSTEM_TIME_MONOTONIC); UiFrameInfoBuilder(proxy->frameInfo()) .setVsync(vsync, vsync) .addFlag(FrameInfoFlags::SurfaceCanvas); Loading
core/jni/android_view_ThreadedRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -957,7 +957,7 @@ static jobject android_view_ThreadedRenderer_createHardwareBitmapFromRenderNode( // to all 0s. proxy.setLightAlpha(0, 0); proxy.setLightGeometry((Vector3){0, 0, 0}, 0); nsecs_t vsync = systemTime(CLOCK_MONOTONIC); nsecs_t vsync = systemTime(SYSTEM_TIME_MONOTONIC); UiFrameInfoBuilder(proxy.frameInfo()) .setVsync(vsync, vsync) .addFlag(FrameInfoFlags::SurfaceCanvas); Loading
libs/hwui/FrameInfo.h +4 −4 Original line number Diff line number Diff line Loading @@ -100,15 +100,15 @@ class FrameInfo { public: void importUiThreadInfo(int64_t* info); void markSyncStart() { set(FrameInfoIndex::SyncStart) = systemTime(CLOCK_MONOTONIC); } void markSyncStart() { set(FrameInfoIndex::SyncStart) = systemTime(SYSTEM_TIME_MONOTONIC); } void markIssueDrawCommandsStart() { set(FrameInfoIndex::IssueDrawCommandsStart) = systemTime(CLOCK_MONOTONIC); set(FrameInfoIndex::IssueDrawCommandsStart) = systemTime(SYSTEM_TIME_MONOTONIC); } void markSwapBuffers() { set(FrameInfoIndex::SwapBuffers) = systemTime(CLOCK_MONOTONIC); } void markSwapBuffers() { set(FrameInfoIndex::SwapBuffers) = systemTime(SYSTEM_TIME_MONOTONIC); } void markFrameCompleted() { set(FrameInfoIndex::FrameCompleted) = systemTime(CLOCK_MONOTONIC); } void markFrameCompleted() { set(FrameInfoIndex::FrameCompleted) = systemTime(SYSTEM_TIME_MONOTONIC); } void addFlag(int frameInfoFlag) { set(FrameInfoIndex::Flags) |= static_cast<uint64_t>(frameInfoFlag); Loading
libs/hwui/ProfileData.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -143,7 +143,7 @@ void ProfileData::reset() { mSlowFrameCounts.fill(0); mTotalFrameCount = 0; mJankFrameCount = 0; mStatStartTime = systemTime(CLOCK_MONOTONIC); mStatStartTime = systemTime(SYSTEM_TIME_MONOTONIC); } void ProfileData::reportFrame(int64_t duration) { Loading
libs/hwui/hwui/AnimatedImageDrawable.cpp +2 −8 Original line number Diff line number Diff line Loading @@ -24,12 +24,6 @@ #include <optional> #ifdef __APPLE__ // macOS SDK 10.10 does not support CLOCK_MONOTONIC, which is not an issue since // the value of the argument is not used in the host definition of systemTime #define CLOCK_MONOTONIC #endif namespace android { AnimatedImageDrawable::AnimatedImageDrawable(sk_sp<SkAnimatedImage> animatedImage, size_t bytesUsed) Loading Loading @@ -70,7 +64,7 @@ bool AnimatedImageDrawable::nextSnapshotReady() const { // Only called on the RenderThread while UI thread is locked. bool AnimatedImageDrawable::isDirty(nsecs_t* outDelay) { *outDelay = 0; const nsecs_t currentTime = systemTime(CLOCK_MONOTONIC); const nsecs_t currentTime = systemTime(SYSTEM_TIME_MONOTONIC); const nsecs_t lastWallTime = mLastWallTime; mLastWallTime = currentTime; Loading Loading @@ -250,7 +244,7 @@ int AnimatedImageDrawable::drawStaging(SkCanvas* canvas) { bool update = false; { const nsecs_t currentTime = systemTime(CLOCK_MONOTONIC); const nsecs_t currentTime = systemTime(SYSTEM_TIME_MONOTONIC); std::unique_lock lock{mSwapLock}; // mLastWallTime starts off at 0. If it is still 0, just update it to // the current time and avoid updating Loading