Bug 1128989 - part 2 - forward-declare Telemetry::ID in Decoder.h; r=seth

This change means that Decoder.h (and any files that include it) no
longer depend on Telemetry.h.  And since Telemetry.h can change rather
frequently, this change helps minimize the number of files that need to
be rebuilt when Telemetry.h does change.
This commit is contained in:
Nathan Froyd 2015-02-03 10:05:49 -05:00
parent 69b393b14b
commit 8c6644f116
5 changed files with 16 additions and 3 deletions

View File

@ -48,6 +48,7 @@ mailing address.
#include "gfxPlatform.h"
#include "qcms.h"
#include <algorithm>
#include "mozilla/Telemetry.h"
namespace mozilla {
namespace image {

View File

@ -19,6 +19,7 @@
#include "gfxPlatform.h"
#include "mozilla/Endian.h"
#include "mozilla/Telemetry.h"
extern "C" {
#include "iccjpeg.h"

View File

@ -15,6 +15,7 @@
#include "nspr.h"
#include "png.h"
#include "RasterImage.h"
#include "mozilla/Telemetry.h"
#include <algorithm>

View File

@ -15,6 +15,7 @@
#include "nsProxyRelease.h"
#include "nsServiceManagerUtils.h"
#include "nsComponentManagerUtils.h"
#include "mozilla/Telemetry.h"
using mozilla::gfx::IntSize;
using mozilla::gfx::SurfaceFormat;
@ -701,5 +702,12 @@ Decoder::NeedNewFrame(uint32_t framenum, uint32_t x_offset, uint32_t y_offset,
mNeedsNewFrame = true;
}
Telemetry::ID
Decoder::SpeedHistogram()
{
// Use HistogramCount as an invalid Histogram ID.
return Telemetry::HistogramCount;
}
} // namespace image
} // namespace mozilla

View File

@ -13,10 +13,13 @@
#include "ImageMetadata.h"
#include "Orientation.h"
#include "SourceBuffer.h"
#include "mozilla/Telemetry.h"
namespace mozilla {
namespace Telemetry {
enum ID : uint32_t;
}
namespace image {
class Decoder : public IResumable
@ -263,8 +266,7 @@ public:
return mImageMetadata.GetSize();
}
// Use HistogramCount as an invalid Histogram ID
virtual Telemetry::ID SpeedHistogram() { return Telemetry::HistogramCount; }
virtual Telemetry::ID SpeedHistogram();
ImageMetadata& GetImageMetadata() { return mImageMetadata; }