Bug 948221 - Part 2: Remove SFE_WANT_NEW_SURFACE since it's never used. r=roc

This commit is contained in:
Matt Woodrow 2013-11-27 14:05:02 +13:00
parent 1bae010799
commit 4bd8a376ba
3 changed files with 7 additions and 9 deletions

View File

@ -1454,7 +1454,7 @@ CanvasRenderingContext2D::CreatePattern(const HTMLImageOrCanvasOrVideoElement& e
// of animated images
nsLayoutUtils::SurfaceFromElementResult res =
nsLayoutUtils::SurfaceFromElement(htmlElement,
nsLayoutUtils::SFE_WANT_FIRST_FRAME | nsLayoutUtils::SFE_WANT_NEW_SURFACE);
nsLayoutUtils::SFE_WANT_FIRST_FRAME);
if (!res.mSurface) {
error.Throw(NS_ERROR_NOT_AVAILABLE);

View File

@ -4762,7 +4762,7 @@ nsLayoutUtils::SurfaceFromElement(nsIImageLoadingContent* aElement,
SurfaceFromElementResult result;
nsresult rv;
bool forceCopy = (aSurfaceFlags & SFE_WANT_NEW_SURFACE) != 0;
bool forceCopy = false;
bool wantImageSurface = (aSurfaceFlags & SFE_WANT_IMAGE_SURFACE) != 0;
bool premultAlpha = (aSurfaceFlags & SFE_NO_PREMULTIPLY_ALPHA) == 0;
@ -4874,7 +4874,7 @@ nsLayoutUtils::SurfaceFromElement(HTMLCanvasElement* aElement,
SurfaceFromElementResult result;
nsresult rv;
bool forceCopy = (aSurfaceFlags & SFE_WANT_NEW_SURFACE) != 0;
bool forceCopy = false;
bool wantImageSurface = (aSurfaceFlags & SFE_WANT_IMAGE_SURFACE) != 0;
bool premultAlpha = (aSurfaceFlags & SFE_NO_PREMULTIPLY_ALPHA) == 0;

View File

@ -1546,19 +1546,17 @@ public:
*/
enum {
/* Always create a new surface for the result */
SFE_WANT_NEW_SURFACE = 1 << 0,
/* When creating a new surface, create an image surface */
SFE_WANT_IMAGE_SURFACE = 1 << 1,
SFE_WANT_IMAGE_SURFACE = 1 << 0,
/* Whether to extract the first frame (as opposed to the
current frame) in the case that the element is an image. */
SFE_WANT_FIRST_FRAME = 1 << 2,
SFE_WANT_FIRST_FRAME = 1 << 1,
/* Whether we should skip colorspace/gamma conversion */
SFE_NO_COLORSPACE_CONVERSION = 1 << 3,
SFE_NO_COLORSPACE_CONVERSION = 1 << 2,
/* Whether we should skip premultiplication -- the resulting
image will always be an image surface, and must not be given to
Thebes for compositing! */
SFE_NO_PREMULTIPLY_ALPHA = 1 << 4
SFE_NO_PREMULTIPLY_ALPHA = 1 << 3
};
struct SurfaceFromElementResult {