diff --git a/gfx/thebes/gfxBlur.h b/gfx/thebes/gfxBlur.h index 5031a68afc52..5c2a7f774f1c 100644 --- a/gfx/thebes/gfxBlur.h +++ b/gfx/thebes/gfxBlur.h @@ -102,6 +102,23 @@ public: */ static gfxIntSize CalculateBlurRadius(const gfxPoint& aStandardDeviation); + /** + * Blurs a coloured rectangle onto aDestinationCtx. This is equivalent + * to calling Init(), drawing a rectangle onto the returned surface + * and then calling Paint, but may let us optimize better in the + * backend. + * + * @param aDestinationCtx The destination to blur to. + * @param aRect The rectangle to blur in device pixels. + * @param aCornerRadii Corner radii for aRect, if it is a rounded + * rectangle. + * @param aBlurRadius The standard deviation of the blur. + * @param aShadowColor The color to draw the blurred shadow. + * @param aDirtyRect An area in device pixels that is dirty and needs + * to be redrawn. + * @param aSkipRect An area in device pixels to avoid blurring over, + * to prevent unnecessary work. + */ static void BlurRectangle(gfxContext *aDestinationCtx, const gfxRect& aRect, gfxCornerSizes* aCornerRadii, diff --git a/layout/base/nsCSSRendering.h b/layout/base/nsCSSRendering.h index 9c9f4b06e8d6..623f047dddf8 100644 --- a/layout/base/nsCSSRendering.h +++ b/layout/base/nsCSSRendering.h @@ -807,6 +807,27 @@ public: static nsMargin GetBlurRadiusMargin(nscoord aBlurRadius, int32_t aAppUnitsPerDevPixel); + /** + * Blurs a coloured rectangle onto aDestinationCtx. This is equivalent + * to calling Init(), drawing a rectangle onto the returned surface + * and then calling DoPaint, but may let us optimize better in the + * backend. + * + * @param aDestinationCtx The destination to blur to. + * @param aRect The rectangle to blur in app units. + * @param aAppUnitsPerDevPixel The number of app units in a device pixel, + * for conversion. Most of the time you'll + * pass this from the current PresContext if + * available. + * @param aCornerRadii Corner radii for aRect, if it is a rounded + * rectangle. + * @param aBlurRadius The blur radius in app units. + * @param aShadowColor The color to draw the blurred shadow. + * @param aDirtyRect The absolute dirty rect in app units. Used to + * optimize the temporary surface size and speed up blur. + * @param aSkipRect An area in device pixels (NOT app units!) to avoid + * blurring over, to prevent unnecessary work. + */ static void BlurRectangle(gfxContext* aDestinationCtx, const nsRect& aRect, int32_t aAppUnitsPerDevPixel,