diff --git a/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener.java b/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener.java index 3983b80707..2df49d5562 100644 --- a/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener.java +++ b/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener.java @@ -94,8 +94,7 @@ public void onRelease(String id) { ImageLoadStatus lastImageLoadStatus = mImagePerfState.getImageLoadStatus(); if (lastImageLoadStatus != ImageLoadStatus.SUCCESS - && lastImageLoadStatus != ImageLoadStatus.ERROR - && lastImageLoadStatus != ImageLoadStatus.DRAW) { + && lastImageLoadStatus != ImageLoadStatus.ERROR) { mImagePerfState.setControllerId(id); // The image request was canceled } @@ -105,9 +104,7 @@ public void onRelease(String id) { @Override public void onImageDrawn(String id, ImageInfo info, DimensionsInfo dimensionsInfo) { - mImagePerfState.setImageDrawTimeMs(mClock.now()); mImagePerfState.setDimensionsInfo(dimensionsInfo); - mImagePerfMonitor.notifyStatusUpdated(mImagePerfState, ImageLoadStatus.DRAW); } @VisibleForTesting diff --git a/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener2.java b/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener2.java index 0f73513c6e..b2780abdcf 100644 --- a/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener2.java +++ b/drawee-backends/drawee-pipeline/src/main/java/com/facebook/drawee/backends/pipeline/info/internal/ImagePerfControllerListener2.java @@ -219,9 +219,7 @@ public void onImageDrawn(String id, ImageInfo info, DimensionsInfo dimensionsInf ImagePerfState state = mImagePerfState; state.setControllerId(id); - state.setImageDrawTimeMs(mClock.now()); state.setDimensionsInfo(dimensionsInfo); - updateStatus(state, ImageLoadStatus.DRAW); } @VisibleForTesting diff --git a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImageLoadStatus.kt b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImageLoadStatus.kt index f1a9329f4a..95e1908e1d 100644 --- a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImageLoadStatus.kt +++ b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImageLoadStatus.kt @@ -13,7 +13,6 @@ enum class ImageLoadStatus(val value: Int) { INTERMEDIATE_AVAILABLE(2), SUCCESS(3), ERROR(5), - DRAW(6), EMPTY_EVENT(7), RELEASED(8); diff --git a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.java b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.java index 9f6a9441e8..7f78986f6b 100644 --- a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.java +++ b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.java @@ -42,8 +42,6 @@ public class ImagePerfData { private final long mVisibilityEventTimeMs; private final long mInvisibilityEventTimeMs; - private final long mImageDrawTimeMs; - private final @Nullable DimensionsInfo mDimensionsInfo; private @Nullable Extras mExtraData; @@ -67,7 +65,6 @@ public ImagePerfData( VisibilityState visibilityState, long visibilityEventTimeMs, long invisibilityEventTime, - long imageDrawTimeMs, @Nullable DimensionsInfo dimensionsInfo, @Nullable Extras extraData) { mControllerId = controllerId; @@ -88,15 +85,10 @@ public ImagePerfData( mVisibilityState = visibilityState; mVisibilityEventTimeMs = visibilityEventTimeMs; mInvisibilityEventTimeMs = invisibilityEventTime; - mImageDrawTimeMs = imageDrawTimeMs; mDimensionsInfo = dimensionsInfo; mExtraData = extraData; } - public long getImageDrawTimeMs() { - return mImageDrawTimeMs; - } - @Nullable public String getControllerId() { return mControllerId; @@ -219,7 +211,6 @@ public String createDebugString() { .add("visibility state", mVisibilityState) .add("visibility event", mVisibilityEventTimeMs) .add("invisibility event", mInvisibilityEventTimeMs) - .add("image draw event", mImageDrawTimeMs) .add("dimensions info", mDimensionsInfo) .add("extra data", mExtraData) .toString(); diff --git a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.java b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.java index b13f0636a0..ac3d3ff236 100644 --- a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.java +++ b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.java @@ -50,7 +50,6 @@ public class ImagePerfState { private long mVisibilityEventTimeMs = UNSET; private long mInvisibilityEventTimeMs = UNSET; // Fetch efficiency - private long mImageDrawTimeMs = UNSET; private @Nullable DimensionsInfo mDimensionsInfo; // Pipeline and view extras private @Nullable Extras mExtraData; @@ -90,8 +89,6 @@ public void resetPointsTimestamps() { mVisibilityEventTimeMs = UNSET; mInvisibilityEventTimeMs = UNSET; - - mImageDrawTimeMs = UNSET; } public void setImageLoadStatus(ImageLoadStatus imageLoadStatus) { @@ -174,10 +171,6 @@ public void setVisible(boolean visible) { mVisibilityState = visible ? VisibilityState.VISIBLE : VisibilityState.INVISIBLE; } - public void setImageDrawTimeMs(long imageDrawTimeMs) { - mImageDrawTimeMs = imageDrawTimeMs; - } - public ImagePerfData snapshot() { return new ImagePerfData( mControllerId, @@ -198,15 +191,10 @@ public ImagePerfData snapshot() { mVisibilityState, mVisibilityEventTimeMs, mInvisibilityEventTimeMs, - mImageDrawTimeMs, mDimensionsInfo, mExtraData); } - public long getImageDrawTimeMs() { - return mImageDrawTimeMs; - } - public void setDimensionsInfo(DimensionsInfo dimensionsInfo) { mDimensionsInfo = dimensionsInfo; }