mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1207355
(Part 8) - Remove imgIContainer::RequestDecode() and imgIRequest::RequestDecode(). r=tn
This commit is contained in:
parent
66fb01aecb
commit
6598853366
@ -246,12 +246,6 @@ DynamicImage::Draw(gfxContext* aContext,
|
||||
return DrawResult::SUCCESS;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
DynamicImage::RequestDecode()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
DynamicImage::StartDecoding()
|
||||
{
|
||||
|
@ -214,12 +214,6 @@ ImageWrapper::Draw(gfxContext* aContext,
|
||||
aFilter, aSVGContext, aFlags);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ImageWrapper::RequestDecode()
|
||||
{
|
||||
return mInnerImage->RequestDecode();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ImageWrapper::StartDecoding()
|
||||
{
|
||||
|
@ -1166,15 +1166,6 @@ RasterImage::CanDiscard() {
|
||||
!mAnim; // Can never discard animated images
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
RasterImage::RequestDecode()
|
||||
{
|
||||
return RequestDecodeForSize(mSize, DECODE_FLAGS_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
RasterImage::StartDecoding()
|
||||
{
|
||||
@ -1799,7 +1790,7 @@ RasterImage::FinalizeDecoder(Decoder* aDecoder)
|
||||
// If we were a metadata decode and a full decode was requested, do it.
|
||||
if (done && wasMetadata && mWantFullDecode) {
|
||||
mWantFullDecode = false;
|
||||
RequestDecode();
|
||||
RequestDecodeForSize(mSize, DECODE_FLAGS_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -964,15 +964,6 @@ VectorImage::RecoverFromLossOfSurfaces()
|
||||
SurfaceCache::RemoveImage(ImageKey(this));
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
|
||||
NS_IMETHODIMP
|
||||
VectorImage::RequestDecode()
|
||||
{
|
||||
// Nothing to do for SVG images
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
VectorImage::StartDecoding()
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ native nsIntSizeByVal(nsIntSize);
|
||||
*
|
||||
* Internally, imgIContainer also manages animation of images.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(7c795421-a79c-43ac-9e20-6d4e8a9dfb76)]
|
||||
[scriptable, builtinclass, uuid(a8dbee24-ff86-4755-b40e-51175caf31af)]
|
||||
interface imgIContainer : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -383,22 +383,16 @@ interface imgIContainer : nsISupports
|
||||
|
||||
/*
|
||||
* Ensures that an image is decoding. Calling this function guarantees that
|
||||
* the image will at some point fire off decode notifications. Calling draw()
|
||||
* or getFrame() triggers the same mechanism internally. Thus, if you want to
|
||||
* be sure that the image will be decoded but don't want to access it until
|
||||
* then, you must call requestDecode().
|
||||
*/
|
||||
void requestDecode();
|
||||
|
||||
/*
|
||||
* This is equivalent to requestDecode() but it also synchronously decodes
|
||||
* images that can be decoded "quickly" according to some heuristic.
|
||||
* the image will at some point fire off decode notifications. Images that
|
||||
* can be decoded "quickly" according to some heuristic will be decoded
|
||||
* synchronously.
|
||||
*/
|
||||
[noscript] void startDecoding();
|
||||
|
||||
/*
|
||||
* This method is equivalent to requestDecode(), but enables the caller to
|
||||
* provide more detailed information about the decode request.
|
||||
* This method triggers decoding for an image, but unlike startDecoding() it
|
||||
* enables the caller to provide more detailed information about the decode
|
||||
* request.
|
||||
*
|
||||
* @param aSize The size to which the image should be scaled while decoding,
|
||||
* if possible. If the image cannot be scaled to this size while
|
||||
|
@ -19,7 +19,7 @@ interface nsIPrincipal;
|
||||
* @version 0.1
|
||||
* @see imagelib2
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(4cb01f0a-ef94-4345-a8d7-1a93f15ff548)]
|
||||
[scriptable, builtinclass, uuid(db0a945c-3883-424a-98d0-2ee0523b0255)]
|
||||
interface imgIRequest : nsIRequest
|
||||
{
|
||||
/**
|
||||
@ -145,15 +145,14 @@ interface imgIRequest : nsIRequest
|
||||
void cancelAndForgetObserver(in nsresult aStatus);
|
||||
|
||||
/**
|
||||
* Requests a decode for the image.
|
||||
* Requests a synchronous decode for the image.
|
||||
*
|
||||
* imgIContainer has a requestDecode() method, but callers may want to request
|
||||
* imgIContainer has a startDecoding() method, but callers may want to request
|
||||
* a decode before the container has necessarily been instantiated. Calling
|
||||
* requestDecode() on the imgIRequest simply forwards along the request if the
|
||||
* container already exists, or calls it once it gets OnStartContainer if the
|
||||
* container does not yet exist.
|
||||
* startDecoding() on the imgIRequest simply forwards along the request if the
|
||||
* container already exists, or calls it once the container becomes available
|
||||
* if it does not yet exist.
|
||||
*/
|
||||
void requestDecode();
|
||||
void startDecoding();
|
||||
|
||||
/**
|
||||
|
@ -1590,7 +1590,7 @@ imgLoader::ValidateRequestWithNewChannel(imgRequest* request,
|
||||
// We will send notifications from imgCacheValidator::OnStartRequest().
|
||||
// In the mean time, we must defer notifications because we are added to
|
||||
// the imgRequest's proxy list, and we can get extra notifications
|
||||
// resulting from methods such as RequestDecode(). See bug 579122.
|
||||
// resulting from methods such as StartDecoding(). See bug 579122.
|
||||
proxy->SetNotificationsDeferred(true);
|
||||
|
||||
// Attach the proxy without notifying
|
||||
@ -1666,7 +1666,7 @@ imgLoader::ValidateRequestWithNewChannel(imgRequest* request,
|
||||
// We will send notifications from imgCacheValidator::OnStartRequest().
|
||||
// In the mean time, we must defer notifications because we are added to
|
||||
// the imgRequest's proxy list, and we can get extra notifications
|
||||
// resulting from methods such as RequestDecode(). See bug 579122.
|
||||
// resulting from methods such as StartDecoding(). See bug 579122.
|
||||
req->SetNotificationsDeferred(true);
|
||||
|
||||
// Add the proxy without notifying
|
||||
|
@ -413,7 +413,7 @@ imgRequest::ContinueEvict()
|
||||
}
|
||||
|
||||
void
|
||||
imgRequest::RequestDecode()
|
||||
imgRequest::StartDecoding()
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
mDecodeRequested = true;
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
void ContinueEvict();
|
||||
|
||||
// Request that we start decoding the image as soon as data becomes available.
|
||||
void RequestDecode();
|
||||
void StartDecoding();
|
||||
|
||||
inline uint64_t InnerWindowID() const {
|
||||
return mInnerWindowId;
|
||||
@ -220,7 +220,7 @@ private:
|
||||
// Update the cache entry size based on the image container.
|
||||
void UpdateCacheEntrySize();
|
||||
|
||||
/// Returns true if RequestDecode() was called.
|
||||
/// Returns true if StartDecoding() was called.
|
||||
bool IsDecodeRequested() const;
|
||||
|
||||
// Weak reference to parent loader; this request cannot outlive its owner.
|
||||
|
@ -371,19 +371,12 @@ imgRequestProxy::StartDecoding()
|
||||
}
|
||||
|
||||
if (GetOwner()) {
|
||||
GetOwner()->RequestDecode();
|
||||
GetOwner()->StartDecoding();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
imgRequestProxy::RequestDecode()
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
imgRequestProxy::LockImage()
|
||||
{
|
||||
|
@ -48,12 +48,6 @@ function ImageListener(start_callback, stop_callback)
|
||||
{
|
||||
do_check_false(this.synchronous);
|
||||
|
||||
try {
|
||||
aRequest.requestDecode();
|
||||
} catch (e) {
|
||||
do_print("requestDecode threw " + e);
|
||||
}
|
||||
|
||||
this.state |= LOAD_COMPLETE;
|
||||
|
||||
if (this.stop_callback)
|
||||
|
@ -1,4 +1,4 @@
|
||||
skip-if(B2G||Mulet) == display-types-01.html display-types-01-ref.html # bug 773482 # Initial mulet triage: parity with B2G/B2G Desktop
|
||||
skip-if(B2G||Mulet) fuzzy-if(OSX==1010,1,3) == display-types-01.html display-types-01-ref.html # bug 773482 # Initial mulet triage: parity with B2G/B2G Desktop
|
||||
== dynamic-attr-01.html dynamic-attr-01-ref.html
|
||||
== dynamic-button-01a.html dynamic-button-01-ref.html
|
||||
== dynamic-button-01b.html dynamic-button-01-ref.html
|
||||
@ -12,4 +12,4 @@ skip-if(B2G||Mulet) == display-types-01.html display-types-01-ref.html # bug 773
|
||||
== positioned-01.html positioned-01-ref.html
|
||||
== quotes-001.xml quotes-001-ref.xml
|
||||
== table-ignoring-whitespace-01.html table-ignoring-whitespace-01-ref.html
|
||||
== table-parts-01.html table-parts-01-ref.html
|
||||
fuzzy-if(OSX==1010,1,1) == table-parts-01.html table-parts-01-ref.html
|
||||
|
@ -962,9 +962,6 @@ struct nsStyleBorder {
|
||||
return mBorderImageSource.IsLoaded();
|
||||
}
|
||||
|
||||
// Defined in nsStyleStructInlines.h
|
||||
inline nsresult RequestDecode();
|
||||
|
||||
void GetBorderColor(mozilla::css::Side aSide, nscolor& aColor,
|
||||
bool& aForeground) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user