summaryrefslogtreecommitdiffstats
path: root/image
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
commitab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (patch)
treec44670a25d942a672951e430499f70978ec7d337 /image
parent45f9a0daad81d1c6a1188b3473e5f0c67d27c0aa (diff)
downloadUXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.gz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.lz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.xz
UXP-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.zip
Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables). Stub resolution/removal should be a follow-up to this.
Diffstat (limited to 'image')
-rw-r--r--image/RasterImage.cpp31
-rw-r--r--image/imgFrame.cpp3
2 files changed, 1 insertions, 33 deletions
diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp
index aad705473..b67ec3bef 100644
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -39,8 +39,8 @@
#include "mozilla/MemoryReporting.h"
#include "mozilla/Services.h"
#include <stdint.h>
-#include "mozilla/Telemetry.h"
#include "mozilla/TimeStamp.h"
+#include "mozilla/Telemetry.h"
#include "mozilla/Tuple.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/gfx/Scale.h"
@@ -104,9 +104,6 @@ RasterImage::~RasterImage()
// Release all frames from the surface cache.
SurfaceCache::RemoveImage(ImageKey(this));
-
- // Record Telemetry.
- Telemetry::Accumulate(Telemetry::IMAGE_DECODE_COUNT, mDecodeCount);
}
nsresult
@@ -1365,19 +1362,9 @@ RasterImage::Draw(gfxContext* aContext,
return DrawResult::NOT_READY;
}
- bool shouldRecordTelemetry = !mDrawStartTime.IsNull() &&
- surface->IsFinished();
-
auto result = DrawInternal(Move(surface), aContext, aSize,
aRegion, aSamplingFilter, flags);
- if (shouldRecordTelemetry) {
- TimeDuration drawLatency = TimeStamp::Now() - mDrawStartTime;
- Telemetry::Accumulate(Telemetry::IMAGE_DECODE_ON_DRAW_LATENCY,
- int32_t(drawLatency.ToMicroseconds()));
- mDrawStartTime = TimeStamp();
- }
-
return result;
}
@@ -1614,22 +1601,6 @@ RasterImage::NotifyDecodeComplete(const DecoderFinalStatus& aStatus,
mAnimationState->SetDoneDecoding(true);
}
- // Do some telemetry if this isn't a metadata decode.
- if (!aStatus.mWasMetadataDecode) {
- if (aTelemetry.mChunkCount) {
- Telemetry::Accumulate(Telemetry::IMAGE_DECODE_CHUNKS, aTelemetry.mChunkCount);
- }
-
- if (aStatus.mFinished) {
- Telemetry::Accumulate(Telemetry::IMAGE_DECODE_TIME,
- int32_t(aTelemetry.mDecodeTime.ToMicroseconds()));
-
- if (aTelemetry.mSpeedHistogram) {
- Telemetry::Accumulate(*aTelemetry.mSpeedHistogram, aTelemetry.Speed());
- }
- }
- }
-
// Only act on errors if we have no usable frames from the decoder.
if (aStatus.mHadError &&
(!mAnimationState || mAnimationState->KnownFrameCount() == 0)) {
diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp
index 9c5bf9b99..5da2ccec5 100644
--- a/image/imgFrame.cpp
+++ b/image/imgFrame.cpp
@@ -22,7 +22,6 @@
#include "mozilla/gfx/Tools.h"
#include "mozilla/Likely.h"
#include "mozilla/MemoryReporting.h"
-#include "mozilla/Telemetry.h"
#include "nsMargin.h"
#include "nsThreadUtils.h"
@@ -620,8 +619,6 @@ imgFrame::Finish(Opacity aFrameOpacity /* = Opacity::SOME_TRANSPARENCY */,
if (aFrameOpacity == Opacity::FULLY_OPAQUE) {
mHasNoAlpha = true;
- Telemetry::Accumulate(Telemetry::IMAGE_DECODE_OPAQUE_BGRA,
- mFormat == SurfaceFormat::B8G8R8A8);
}
mDisposalMethod = aDisposalMethod;