mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and additional js module changes (next part).
This commit is contained in:
parent
92a1cc3139
commit
8d800b1cb0
205 changed files with 45 additions and 40519 deletions
|
|
@ -13,7 +13,6 @@
|
|||
#include "nsProxyRelease.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
using mozilla::gfx::IntSize;
|
||||
using mozilla::gfx::SurfaceFormat;
|
||||
|
|
@ -21,29 +20,6 @@ using mozilla::gfx::SurfaceFormat;
|
|||
namespace mozilla {
|
||||
namespace image {
|
||||
|
||||
class MOZ_STACK_CLASS AutoRecordDecoderTelemetry final
|
||||
{
|
||||
public:
|
||||
explicit AutoRecordDecoderTelemetry(Decoder* aDecoder)
|
||||
: mDecoder(aDecoder)
|
||||
{
|
||||
MOZ_ASSERT(mDecoder);
|
||||
|
||||
// Begin recording telemetry data.
|
||||
mStartTime = TimeStamp::Now();
|
||||
}
|
||||
|
||||
~AutoRecordDecoderTelemetry()
|
||||
{
|
||||
// Finish telemetry.
|
||||
mDecoder->mDecodeTime += (TimeStamp::Now() - mStartTime);
|
||||
}
|
||||
|
||||
private:
|
||||
Decoder* mDecoder;
|
||||
TimeStamp mStartTime;
|
||||
};
|
||||
|
||||
Decoder::Decoder(RasterImage* aImage)
|
||||
: mImageData(nullptr)
|
||||
, mImageDataLength(0)
|
||||
|
|
@ -124,7 +100,6 @@ Decoder::Decode(IResumable* aOnResume /* = nullptr */)
|
|||
LexerResult lexerResult(TerminalState::FAILURE);
|
||||
{
|
||||
PROFILER_LABEL("ImageDecoder", "Decode", js::ProfileEntry::Category::GRAPHICS);
|
||||
AutoRecordDecoderTelemetry telemetry(this);
|
||||
|
||||
lexerResult = DoDecode(*mIterator, aOnResume);
|
||||
};
|
||||
|
|
@ -267,16 +242,6 @@ Decoder::FinalStatus() const
|
|||
ShouldReportError());
|
||||
}
|
||||
|
||||
DecoderTelemetry
|
||||
Decoder::Telemetry() const
|
||||
{
|
||||
MOZ_ASSERT(mIterator);
|
||||
return DecoderTelemetry(SpeedHistogram(),
|
||||
mIterator->ByteCount(),
|
||||
mIterator->ChunkCount(),
|
||||
mDecodeTime);
|
||||
}
|
||||
|
||||
nsresult
|
||||
Decoder::AllocateFrame(const gfx::IntSize& aOutputSize,
|
||||
const gfx::IntRect& aFrameRect,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ IDecodingTask::NotifyDecodeComplete(NotNull<RasterImage*> aImage,
|
|||
// Capture the decoder's state.
|
||||
DecoderFinalStatus finalStatus = aDecoder->FinalStatus();
|
||||
ImageMetadata metadata = aDecoder->GetImageMetadata();
|
||||
DecoderTelemetry telemetry = aDecoder->Telemetry();
|
||||
Progress progress = aDecoder->TakeProgress();
|
||||
IntRect invalidRect = aDecoder->TakeInvalidRect();
|
||||
Maybe<uint32_t> frameCount = aDecoder->TakeCompleteFrameCount();
|
||||
|
|
@ -75,7 +74,7 @@ IDecodingTask::NotifyDecodeComplete(NotNull<RasterImage*> aImage,
|
|||
|
||||
// Synchronously notify if we can.
|
||||
if (NS_IsMainThread() && !(decoderFlags & DecoderFlags::ASYNC_NOTIFY)) {
|
||||
aImage->NotifyDecodeComplete(finalStatus, metadata, telemetry, progress,
|
||||
aImage->NotifyDecodeComplete(finalStatus, metadata, progress,
|
||||
invalidRect, frameCount, decoderFlags,
|
||||
surfaceFlags);
|
||||
return;
|
||||
|
|
@ -84,7 +83,7 @@ IDecodingTask::NotifyDecodeComplete(NotNull<RasterImage*> aImage,
|
|||
// We're forced to notify asynchronously.
|
||||
NotNull<RefPtr<RasterImage>> image = aImage;
|
||||
NS_DispatchToMainThread(NS_NewRunnableFunction([=]() -> void {
|
||||
image->NotifyDecodeComplete(finalStatus, metadata, telemetry, progress,
|
||||
image->NotifyDecodeComplete(finalStatus, metadata, progress,
|
||||
invalidRect, frameCount, decoderFlags,
|
||||
surfaceFlags);
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include "mozilla/Services.h"
|
||||
#include <stdint.h>
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/Tuple.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/gfx/Scale.h"
|
||||
|
|
@ -1558,7 +1557,6 @@ RasterImage::NotifyProgress(Progress aProgress,
|
|||
void
|
||||
RasterImage::NotifyDecodeComplete(const DecoderFinalStatus& aStatus,
|
||||
const ImageMetadata& aMetadata,
|
||||
const DecoderTelemetry& aTelemetry,
|
||||
Progress aProgress,
|
||||
const IntRect& aInvalidRect,
|
||||
const Maybe<uint32_t>& aFrameCount,
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ public:
|
|||
*/
|
||||
void NotifyDecodeComplete(const DecoderFinalStatus& aStatus,
|
||||
const ImageMetadata& aMetadata,
|
||||
const DecoderTelemetry& aTelemetry,
|
||||
Progress aProgress,
|
||||
const gfx::IntRect& aInvalidRect,
|
||||
const Maybe<uint32_t>& aFrameCount,
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ mailing address.
|
|||
#include "gfxPlatform.h"
|
||||
#include "qcms.h"
|
||||
#include <algorithm>
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
|
|
@ -1088,11 +1087,5 @@ nsGIFDecoder2::SkipSubBlocks(const char* aData)
|
|||
nextSubBlockLength);
|
||||
}
|
||||
|
||||
Maybe<Telemetry::ID>
|
||||
nsGIFDecoder2::SpeedHistogram() const
|
||||
{
|
||||
return Some(Telemetry::IMAGE_DECODE_SPEED_GIF);
|
||||
}
|
||||
|
||||
} // namespace image
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ protected:
|
|||
IResumable* aOnResume) override;
|
||||
nsresult FinishInternal() override;
|
||||
|
||||
Maybe<Telemetry::ID> SpeedHistogram() const override;
|
||||
|
||||
private:
|
||||
friend class DecoderFactory;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "gfxPlatform.h"
|
||||
#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
extern "C" {
|
||||
#include "iccjpeg.h"
|
||||
|
|
@ -123,12 +122,6 @@ nsJPEGDecoder::~nsJPEGDecoder()
|
|||
this));
|
||||
}
|
||||
|
||||
Maybe<Telemetry::ID>
|
||||
nsJPEGDecoder::SpeedHistogram() const
|
||||
{
|
||||
return Some(Telemetry::IMAGE_DECODE_SPEED_JPEG);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsJPEGDecoder::InitInternal()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ protected:
|
|||
IResumable* aOnResume) override;
|
||||
nsresult FinishInternal() override;
|
||||
|
||||
Maybe<Telemetry::ID> SpeedHistogram() const override;
|
||||
|
||||
protected:
|
||||
Orientation ReadOrientationFromEXIF();
|
||||
void OutputScanlines(bool* suspend);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
#include "RasterImage.h"
|
||||
#include "SurfacePipeFactory.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
|
|
@ -1087,12 +1086,6 @@ nsPNGDecoder::warning_callback(png_structp png_ptr, png_const_charp warning_msg)
|
|||
MOZ_LOG(sPNGLog, LogLevel::Warning, ("libpng warning: %s\n", warning_msg));
|
||||
}
|
||||
|
||||
Maybe<Telemetry::ID>
|
||||
nsPNGDecoder::SpeedHistogram() const
|
||||
{
|
||||
return Some(Telemetry::IMAGE_DECODE_SPEED_PNG);
|
||||
}
|
||||
|
||||
bool
|
||||
nsPNGDecoder::IsValidICO() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ protected:
|
|||
LexerResult DoDecode(SourceBufferIterator& aIterator,
|
||||
IResumable* aOnResume) override;
|
||||
|
||||
Maybe<Telemetry::ID> SpeedHistogram() const override;
|
||||
|
||||
private:
|
||||
friend class DecoderFactory;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue