--- a/image/src/SurfaceCache.h+++ b/image/src/SurfaceCache.h@@ -275,20 +275,23 @@ struct SurfaceCache * surface, but the inverse is not true: Insert() may take more information * into account than just image size when deciding whether to cache the * surface, so Insert() may still fail even if CanHold() returns true. * * Use CanHold() to avoid the need to create a temporary surface when we know * for sure the cache can't hold it. * * @param aSize The dimensions of a surface in pixels.+ * @param aBytesPerPixel How many bytes each pixel of the surface requires.+ * Defaults to 4, which is appropriate for RGBA or RGBX+ * images. * * @return false if the surface cache can't hold a surface of that size. */- static bool CanHold(const IntSize& aSize);+ static bool CanHold(const IntSize& aSize, uint32_t aBytesPerPixel = 4); static bool CanHold(size_t aSize); /** * Locks an image. Any of the image's persistent surfaces which are either * inserted or accessed while the image is locked will not expire. * * Locking an image does not automatically lock that image's existing * surfaces. A call to LockImage() guarantees that persistent surfaces which