2010-05-14 20:47:59 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 11:12:37 +00:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2010-05-14 20:47:59 +00:00
|
|
|
|
|
|
|
#ifndef imgStatusTracker_h__
|
|
|
|
#define imgStatusTracker_h__
|
|
|
|
|
2013-09-07 13:01:08 +00:00
|
|
|
class imgDecoderObserver;
|
2010-05-14 20:47:59 +00:00
|
|
|
class imgIContainer;
|
2010-07-28 21:52:14 +00:00
|
|
|
class imgStatusNotifyRunnable;
|
2010-08-12 15:59:28 +00:00
|
|
|
class imgRequestNotifyRunnable;
|
2012-12-18 16:37:14 +00:00
|
|
|
class imgStatusTrackerObserver;
|
2013-09-07 13:01:08 +00:00
|
|
|
class nsIRunnable;
|
2010-05-14 20:47:59 +00:00
|
|
|
|
2012-12-19 21:28:54 +00:00
|
|
|
#include "mozilla/RefPtr.h"
|
2013-09-28 18:28:44 +00:00
|
|
|
#include "mozilla/WeakPtr.h"
|
2010-08-12 15:59:28 +00:00
|
|
|
#include "nsCOMPtr.h"
|
2012-10-12 16:11:20 +00:00
|
|
|
#include "nsTObserverArray.h"
|
2013-09-28 18:28:43 +00:00
|
|
|
#include "nsThreadUtils.h"
|
2013-09-07 13:01:08 +00:00
|
|
|
#include "nsRect.h"
|
2013-12-12 21:17:35 +00:00
|
|
|
#include "imgRequestProxy.h"
|
2010-05-14 20:47:59 +00:00
|
|
|
|
2013-08-28 22:39:04 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace image {
|
|
|
|
|
|
|
|
class Image;
|
|
|
|
|
|
|
|
struct ImageStatusDiff
|
|
|
|
{
|
|
|
|
ImageStatusDiff()
|
|
|
|
: invalidRect()
|
|
|
|
, diffState(0)
|
|
|
|
, diffImageStatus(0)
|
|
|
|
, unblockedOnload(false)
|
|
|
|
, unsetDecodeStarted(false)
|
|
|
|
, foundError(false)
|
|
|
|
, foundIsMultipart(false)
|
|
|
|
, foundLastPart(false)
|
|
|
|
, gotDecoded(false)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
static ImageStatusDiff NoChange() { return ImageStatusDiff(); }
|
|
|
|
bool IsNoChange() const { return *this == NoChange(); }
|
|
|
|
|
|
|
|
bool operator!=(const ImageStatusDiff& aOther) const { return !(*this == aOther); }
|
|
|
|
bool operator==(const ImageStatusDiff& aOther) const {
|
|
|
|
return aOther.invalidRect == invalidRect
|
|
|
|
&& aOther.diffState == diffState
|
|
|
|
&& aOther.diffImageStatus == diffImageStatus
|
|
|
|
&& aOther.unblockedOnload == unblockedOnload
|
|
|
|
&& aOther.unsetDecodeStarted == unsetDecodeStarted
|
|
|
|
&& aOther.foundError == foundError
|
|
|
|
&& aOther.foundIsMultipart == foundIsMultipart
|
|
|
|
&& aOther.foundLastPart == foundLastPart
|
|
|
|
&& aOther.gotDecoded == gotDecoded;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Combine(const ImageStatusDiff& aOther) {
|
|
|
|
invalidRect = invalidRect.Union(aOther.invalidRect);
|
|
|
|
diffState |= aOther.diffState;
|
|
|
|
diffImageStatus |= aOther.diffImageStatus;
|
|
|
|
unblockedOnload = unblockedOnload || aOther.unblockedOnload;
|
|
|
|
unsetDecodeStarted = unsetDecodeStarted || aOther.unsetDecodeStarted;
|
|
|
|
foundError = foundError || aOther.foundError;
|
|
|
|
foundIsMultipart = foundIsMultipart || aOther.foundIsMultipart;
|
|
|
|
foundLastPart = foundLastPart || aOther.foundLastPart;
|
|
|
|
gotDecoded = gotDecoded || aOther.gotDecoded;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsIntRect invalidRect;
|
|
|
|
uint32_t diffState;
|
|
|
|
uint32_t diffImageStatus;
|
|
|
|
bool unblockedOnload : 1;
|
|
|
|
bool unsetDecodeStarted : 1;
|
|
|
|
bool foundError : 1;
|
|
|
|
bool foundIsMultipart : 1;
|
|
|
|
bool foundLastPart : 1;
|
|
|
|
bool gotDecoded : 1;
|
|
|
|
};
|
|
|
|
|
2010-05-14 20:47:59 +00:00
|
|
|
enum {
|
2012-10-20 02:01:43 +00:00
|
|
|
stateRequestStarted = 1u << 0,
|
|
|
|
stateHasSize = 1u << 1,
|
2012-12-19 21:28:54 +00:00
|
|
|
stateDecodeStarted = 1u << 2,
|
2012-10-20 02:01:43 +00:00
|
|
|
stateDecodeStopped = 1u << 3,
|
|
|
|
stateFrameStopped = 1u << 4,
|
|
|
|
stateRequestStopped = 1u << 5,
|
2013-01-18 21:47:17 +00:00
|
|
|
stateBlockingOnload = 1u << 6,
|
|
|
|
stateImageIsAnimated = 1u << 7
|
2010-05-14 20:47:59 +00:00
|
|
|
};
|
|
|
|
|
2013-08-28 22:39:04 +00:00
|
|
|
} // namespace image
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2010-05-14 20:47:59 +00:00
|
|
|
/*
|
|
|
|
* The image status tracker is a class that encapsulates all the loading and
|
2010-08-14 04:09:48 +00:00
|
|
|
* decoding status about an Image, and makes it possible to send notifications
|
|
|
|
* to imgRequestProxys, both synchronously (i.e., the status now) and
|
|
|
|
* asynchronously (the status later).
|
2010-07-28 21:52:14 +00:00
|
|
|
*
|
|
|
|
* When a new proxy needs to be notified of the current state of an image, call
|
|
|
|
* the Notify() method on this class with the relevant proxy as its argument,
|
|
|
|
* and the notifications will be replayed to the proxy asynchronously.
|
2010-05-14 20:47:59 +00:00
|
|
|
*/
|
|
|
|
|
2013-09-28 18:28:44 +00:00
|
|
|
|
|
|
|
class imgStatusTracker : public mozilla::SupportsWeakPtr<imgStatusTracker>
|
2010-05-14 20:47:59 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-02-21 02:33:49 +00:00
|
|
|
MOZ_DECLARE_REFCOUNTED_TYPENAME(imgStatusTracker)
|
2013-03-01 23:17:24 +00:00
|
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(imgStatusTracker)
|
|
|
|
|
2010-05-14 20:47:59 +00:00
|
|
|
// aImage is the image that this status tracker will pass to the
|
2010-07-28 21:52:14 +00:00
|
|
|
// imgRequestProxys in SyncNotify() and EmulateRequestFinished(), and must be
|
2010-05-14 20:47:59 +00:00
|
|
|
// alive as long as this instance is, because we hold a weak reference to it.
|
2012-12-19 21:28:54 +00:00
|
|
|
imgStatusTracker(mozilla::image::Image* aImage);
|
2013-09-28 18:28:44 +00:00
|
|
|
virtual ~imgStatusTracker();
|
2010-05-14 20:47:59 +00:00
|
|
|
|
2010-08-23 22:44:07 +00:00
|
|
|
// Image-setter, for imgStatusTrackers created by imgRequest::Init, which
|
|
|
|
// are created before their Image is created. This method should only
|
|
|
|
// be called once, and only on an imgStatusTracker that was initialized
|
|
|
|
// without an image.
|
2012-01-06 16:02:27 +00:00
|
|
|
void SetImage(mozilla::image::Image* aImage);
|
2010-08-23 22:44:07 +00:00
|
|
|
|
2013-09-28 18:28:44 +00:00
|
|
|
// Image resetter, for when mImage is about to go out of scope. mImage is a
|
|
|
|
// weak reference, and thus must be set to null when it's object is deleted.
|
|
|
|
void ResetImage();
|
|
|
|
|
2012-12-19 21:28:54 +00:00
|
|
|
// Inform this status tracker that it is associated with a multipart image.
|
|
|
|
void SetIsMultipart() { mIsMultipart = true; }
|
|
|
|
|
2010-07-28 21:52:14 +00:00
|
|
|
// Schedule an asynchronous "replaying" of all the notifications that would
|
|
|
|
// have to happen to put us in the current state.
|
|
|
|
// We will also take note of any notifications that happen between the time
|
|
|
|
// Notify() is called and when we call SyncNotify on |proxy|, and replay them
|
|
|
|
// as well.
|
2013-09-28 18:28:43 +00:00
|
|
|
// Should be called on the main thread only, since imgRequestProxy and GetURI
|
|
|
|
// are not threadsafe.
|
2012-12-19 21:28:54 +00:00
|
|
|
void Notify(imgRequestProxy* proxy);
|
2010-07-28 21:52:14 +00:00
|
|
|
|
|
|
|
// Schedule an asynchronous "replaying" of all the notifications that would
|
|
|
|
// have to happen to put us in the state we are in right now.
|
|
|
|
// Unlike Notify(), does *not* take into account future notifications.
|
|
|
|
// This is only useful if you do not have an imgRequest, e.g., if you are a
|
|
|
|
// static request returned from imgIRequest::GetStaticRequest().
|
2013-09-28 18:28:43 +00:00
|
|
|
// Should be called on the main thread only, since imgRequestProxy and GetURI
|
|
|
|
// are not threadsafe.
|
2010-07-28 21:52:14 +00:00
|
|
|
void NotifyCurrentState(imgRequestProxy* proxy);
|
|
|
|
|
2010-05-14 20:47:59 +00:00
|
|
|
// "Replay" all of the notifications that would have to happen to put us in
|
|
|
|
// the state we're currently in.
|
2010-07-28 21:52:14 +00:00
|
|
|
// Only use this if you're already servicing an asynchronous call (e.g.
|
|
|
|
// OnStartRequest).
|
2013-09-28 18:28:43 +00:00
|
|
|
// Should be called on the main thread only, since imgRequestProxy and GetURI
|
|
|
|
// are not threadsafe.
|
2010-07-28 21:52:14 +00:00
|
|
|
void SyncNotify(imgRequestProxy* proxy);
|
2010-05-14 20:47:59 +00:00
|
|
|
|
2012-10-11 16:35:43 +00:00
|
|
|
// Send some notifications that would be necessary to make |proxy| believe
|
|
|
|
// the request is finished downloading and decoding. We only send
|
|
|
|
// OnStopRequest and UnblockOnload, and only if necessary.
|
|
|
|
void EmulateRequestFinished(imgRequestProxy* proxy, nsresult aStatus);
|
2010-05-14 20:47:59 +00:00
|
|
|
|
2012-10-12 16:11:20 +00:00
|
|
|
// We manage a set of consumers that are using an image and thus concerned
|
|
|
|
// with its status. Weak pointers.
|
|
|
|
void AddConsumer(imgRequestProxy* aConsumer);
|
|
|
|
bool RemoveConsumer(imgRequestProxy* aConsumer, nsresult aStatus);
|
2013-09-28 18:28:43 +00:00
|
|
|
size_t ConsumerCount() const {
|
|
|
|
MOZ_ASSERT(NS_IsMainThread(), "Use mConsumers on main thread only");
|
|
|
|
return mConsumers.Length();
|
|
|
|
}
|
2012-10-12 16:11:20 +00:00
|
|
|
|
|
|
|
// This is intentionally non-general because its sole purpose is to support an
|
|
|
|
// some obscure network priority logic in imgRequest. That stuff could probably
|
|
|
|
// be improved, but it's too scary to mess with at the moment.
|
2013-12-12 21:17:35 +00:00
|
|
|
bool FirstConsumerIs(imgRequestProxy* aConsumer);
|
2012-10-12 16:11:20 +00:00
|
|
|
|
2013-09-28 18:28:43 +00:00
|
|
|
void AdoptConsumers(imgStatusTracker* aTracker) {
|
|
|
|
MOZ_ASSERT(NS_IsMainThread(), "Use mConsumers on main thread only");
|
2013-09-28 18:28:44 +00:00
|
|
|
MOZ_ASSERT(aTracker);
|
2013-09-28 18:28:43 +00:00
|
|
|
mConsumers = aTracker->mConsumers;
|
|
|
|
}
|
2012-10-12 16:11:20 +00:00
|
|
|
|
2010-05-14 20:47:59 +00:00
|
|
|
// Returns whether we are in the process of loading; that is, whether we have
|
|
|
|
// not received OnStopRequest.
|
2011-09-29 06:19:26 +00:00
|
|
|
bool IsLoading() const;
|
2010-05-14 20:47:59 +00:00
|
|
|
|
|
|
|
// Get the current image status (as in imgIRequest).
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t GetImageStatus() const;
|
2010-05-14 20:47:59 +00:00
|
|
|
|
|
|
|
// Following are all the notification methods. You must call the Record
|
|
|
|
// variant on this status tracker, then call the Send variant for each proxy
|
|
|
|
// you want to notify.
|
|
|
|
|
|
|
|
// Call when the request is being cancelled.
|
|
|
|
void RecordCancel();
|
|
|
|
|
|
|
|
// Shorthand for recording all the load notifications: StartRequest,
|
|
|
|
// StartContainer, StopRequest.
|
|
|
|
void RecordLoaded();
|
|
|
|
|
|
|
|
// Shorthand for recording all the decode notifications: StartDecode,
|
2012-10-12 16:11:22 +00:00
|
|
|
// StartFrame, DataAvailable, StopFrame, StopDecode.
|
2010-05-14 20:47:59 +00:00
|
|
|
void RecordDecoded();
|
|
|
|
|
2012-12-18 16:37:15 +00:00
|
|
|
/* non-virtual imgDecoderObserver methods */
|
2013-09-28 18:28:43 +00:00
|
|
|
// Functions with prefix Send- are main thread only, since they contain calls
|
|
|
|
// to imgRequestProxy functions, which are expected on the main thread.
|
2012-12-19 21:28:54 +00:00
|
|
|
void RecordStartDecode();
|
|
|
|
void SendStartDecode(imgRequestProxy* aProxy);
|
2010-05-14 20:47:59 +00:00
|
|
|
void RecordStartContainer(imgIContainer* aContainer);
|
2012-10-12 16:11:23 +00:00
|
|
|
void SendStartContainer(imgRequestProxy* aProxy);
|
2013-01-18 21:47:17 +00:00
|
|
|
void RecordStartFrame();
|
|
|
|
// No SendStartFrame since it's not observed below us.
|
2012-12-18 16:37:15 +00:00
|
|
|
void RecordFrameChanged(const nsIntRect* aDirtyRect);
|
|
|
|
void SendFrameChanged(imgRequestProxy* aProxy, const nsIntRect* aDirtyRect);
|
2012-10-12 16:11:23 +00:00
|
|
|
void RecordStopFrame();
|
|
|
|
void SendStopFrame(imgRequestProxy* aProxy);
|
2012-10-12 16:11:22 +00:00
|
|
|
void RecordStopDecode(nsresult statusg);
|
|
|
|
void SendStopDecode(imgRequestProxy* aProxy, nsresult aStatus);
|
2010-05-14 20:47:59 +00:00
|
|
|
void RecordDiscard();
|
|
|
|
void SendDiscard(imgRequestProxy* aProxy);
|
2013-02-25 00:59:22 +00:00
|
|
|
void RecordUnlockedDraw();
|
|
|
|
void SendUnlockedDraw(imgRequestProxy* aProxy);
|
2011-11-09 21:39:15 +00:00
|
|
|
void RecordImageIsAnimated();
|
|
|
|
void SendImageIsAnimated(imgRequestProxy *aProxy);
|
2010-05-14 20:47:59 +00:00
|
|
|
|
|
|
|
/* non-virtual sort-of-nsIRequestObserver methods */
|
2013-09-28 18:28:43 +00:00
|
|
|
// Functions with prefix Send- are main thread only, since they contain calls
|
|
|
|
// to imgRequestProxy functions, which are expected on the main thread.
|
2010-05-14 20:47:59 +00:00
|
|
|
void RecordStartRequest();
|
|
|
|
void SendStartRequest(imgRequestProxy* aProxy);
|
2011-09-29 06:19:26 +00:00
|
|
|
void RecordStopRequest(bool aLastPart, nsresult aStatus);
|
|
|
|
void SendStopRequest(imgRequestProxy* aProxy, bool aLastPart, nsresult aStatus);
|
2010-05-14 20:47:59 +00:00
|
|
|
|
2013-09-28 18:28:43 +00:00
|
|
|
// All main thread only because they call functions (like SendStartRequest)
|
|
|
|
// which are expected to be called on the main thread.
|
2012-10-12 16:11:21 +00:00
|
|
|
void OnStartRequest();
|
2013-09-28 18:28:43 +00:00
|
|
|
// OnDataAvailable will dispatch a call to itself onto the main thread if not
|
|
|
|
// called there.
|
2012-10-12 16:11:21 +00:00
|
|
|
void OnDataAvailable();
|
|
|
|
void OnStopRequest(bool aLastPart, nsresult aStatus);
|
2013-02-07 22:22:38 +00:00
|
|
|
void OnDiscard();
|
2013-01-18 21:47:18 +00:00
|
|
|
void FrameChanged(const nsIntRect* aDirtyRect);
|
|
|
|
void OnUnlockedDraw();
|
2013-02-12 00:34:20 +00:00
|
|
|
// This is called only by VectorImage, and only to ensure tests work
|
|
|
|
// properly. Do not use it.
|
|
|
|
void OnStopFrame();
|
2012-10-12 16:11:21 +00:00
|
|
|
|
2012-08-13 22:58:53 +00:00
|
|
|
/* non-virtual imgIOnloadBlocker methods */
|
|
|
|
// NB: If UnblockOnload is sent, and then we are asked to replay the
|
|
|
|
// notifications, we will not send a BlockOnload/UnblockOnload pair. This
|
|
|
|
// is different from all the other notifications.
|
|
|
|
void RecordBlockOnload();
|
|
|
|
void SendBlockOnload(imgRequestProxy* aProxy);
|
|
|
|
void RecordUnblockOnload();
|
|
|
|
void SendUnblockOnload(imgRequestProxy* aProxy);
|
|
|
|
|
2013-09-28 18:28:43 +00:00
|
|
|
// Main thread only because mConsumers is not threadsafe.
|
2012-10-12 16:11:21 +00:00
|
|
|
void MaybeUnblockOnload();
|
|
|
|
|
2013-02-02 01:06:34 +00:00
|
|
|
void RecordError();
|
|
|
|
|
2012-12-19 21:28:54 +00:00
|
|
|
bool IsMultipart() const { return mIsMultipart; }
|
2012-11-17 13:33:20 +00:00
|
|
|
|
2012-10-12 16:11:20 +00:00
|
|
|
// Weak pointer getters - no AddRefs.
|
2013-09-28 18:28:44 +00:00
|
|
|
inline already_AddRefed<mozilla::image::Image> GetImage() const {
|
|
|
|
nsRefPtr<mozilla::image::Image> image = mImage;
|
|
|
|
return image.forget();
|
|
|
|
}
|
|
|
|
inline bool HasImage() { return mImage; }
|
2012-10-12 16:11:20 +00:00
|
|
|
|
2012-12-18 16:37:15 +00:00
|
|
|
inline imgDecoderObserver* GetDecoderObserver() { return mTrackerObserver.get(); }
|
2012-10-12 16:11:21 +00:00
|
|
|
|
2013-09-28 18:28:44 +00:00
|
|
|
already_AddRefed<imgStatusTracker> CloneForRecording();
|
2013-03-01 23:17:24 +00:00
|
|
|
|
2013-08-28 22:39:04 +00:00
|
|
|
// Compute the difference between this status tracker and aOther.
|
|
|
|
mozilla::image::ImageStatusDiff Difference(imgStatusTracker* aOther) const;
|
|
|
|
|
2013-08-28 22:39:05 +00:00
|
|
|
// Captures all of the decode notifications (i.e., not OnStartRequest /
|
|
|
|
// OnStopRequest) so far as an ImageStatusDiff.
|
|
|
|
mozilla::image::ImageStatusDiff DecodeStateAsDifference() const;
|
|
|
|
|
2013-08-28 22:39:04 +00:00
|
|
|
// Update our state to incorporate the changes in aDiff.
|
|
|
|
void ApplyDifference(const mozilla::image::ImageStatusDiff& aDiff);
|
|
|
|
|
|
|
|
// Notify for the changes captured in an ImageStatusDiff. Because this may
|
|
|
|
// result in recursive notifications, no decoding locks may be held.
|
2013-09-28 18:28:43 +00:00
|
|
|
// Called on the main thread only.
|
2013-08-28 22:39:04 +00:00
|
|
|
void SyncNotifyDifference(const mozilla::image::ImageStatusDiff& aDiff);
|
2013-01-18 21:47:18 +00:00
|
|
|
|
|
|
|
nsIntRect GetInvalidRect() const { return mInvalidRect; }
|
2013-01-18 21:47:17 +00:00
|
|
|
|
2010-05-14 20:47:59 +00:00
|
|
|
private:
|
2013-12-12 21:17:35 +00:00
|
|
|
typedef nsTObserverArray<mozilla::WeakPtr<imgRequestProxy>> ProxyArray;
|
2010-07-28 21:52:14 +00:00
|
|
|
friend class imgStatusNotifyRunnable;
|
2010-08-12 15:59:28 +00:00
|
|
|
friend class imgRequestNotifyRunnable;
|
2012-10-12 16:11:21 +00:00
|
|
|
friend class imgStatusTrackerObserver;
|
2013-09-28 18:28:44 +00:00
|
|
|
friend class imgStatusTrackerInit;
|
2013-01-18 21:47:17 +00:00
|
|
|
imgStatusTracker(const imgStatusTracker& aOther);
|
2010-08-12 15:59:28 +00:00
|
|
|
|
2013-09-28 18:28:43 +00:00
|
|
|
// Main thread only because it deals with the observer service.
|
2012-12-19 21:28:54 +00:00
|
|
|
void FireFailureNotification();
|
|
|
|
|
2013-09-28 18:28:43 +00:00
|
|
|
// Main thread only, since imgRequestProxy calls are expected on the main
|
|
|
|
// thread, and mConsumers is not threadsafe.
|
2013-12-12 21:17:35 +00:00
|
|
|
static void SyncNotifyState(ProxyArray& proxies,
|
2013-01-18 21:47:18 +00:00
|
|
|
bool hasImage, uint32_t state,
|
|
|
|
nsIntRect& dirtyRect, bool hadLastPart);
|
2013-01-18 21:47:17 +00:00
|
|
|
|
2010-08-12 15:59:28 +00:00
|
|
|
nsCOMPtr<nsIRunnable> mRequestRunnable;
|
2010-07-28 21:52:14 +00:00
|
|
|
|
2013-01-18 21:47:17 +00:00
|
|
|
// The invalid area of the most recent frame we know about. (All previous
|
|
|
|
// frames are assumed to be fully valid.)
|
|
|
|
nsIntRect mInvalidRect;
|
|
|
|
|
2013-09-28 18:28:44 +00:00
|
|
|
// This weak ref should be set null when the image goes out of scope.
|
2012-01-06 16:02:27 +00:00
|
|
|
mozilla::image::Image* mImage;
|
2012-10-12 16:11:20 +00:00
|
|
|
|
|
|
|
// List of proxies attached to the image. Each proxy represents a consumer
|
2013-09-28 18:28:43 +00:00
|
|
|
// using the image. Array and/or individual elements should only be accessed
|
|
|
|
// on the main thread.
|
2013-12-12 21:17:35 +00:00
|
|
|
ProxyArray mConsumers;
|
2012-10-12 16:11:21 +00:00
|
|
|
|
2012-12-18 16:37:15 +00:00
|
|
|
mozilla::RefPtr<imgDecoderObserver> mTrackerObserver;
|
2012-12-19 21:28:54 +00:00
|
|
|
|
|
|
|
uint32_t mState;
|
|
|
|
uint32_t mImageStatus;
|
|
|
|
bool mIsMultipart : 1;
|
|
|
|
bool mHadLastPart : 1;
|
2013-04-18 23:31:46 +00:00
|
|
|
bool mHasBeenDecoded : 1;
|
2010-05-14 20:47:59 +00:00
|
|
|
};
|
|
|
|
|
2013-09-28 18:28:44 +00:00
|
|
|
class imgStatusTrackerInit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
imgStatusTrackerInit(mozilla::image::Image* aImage,
|
|
|
|
imgStatusTracker* aTracker);
|
|
|
|
~imgStatusTrackerInit();
|
|
|
|
private:
|
|
|
|
imgStatusTracker* mTracker;
|
|
|
|
};
|
|
|
|
|
2010-05-14 20:47:59 +00:00
|
|
|
#endif
|