Bug 940811 - Enable the gradient cache for canvas. r=Bas

This commit is contained in:
Matt Woodrow 2013-11-20 16:50:46 +13:00
parent 9f6b17cb86
commit 73c6c76ff1

View File

@ -12,6 +12,7 @@
#include "mozilla/dom/CanvasRenderingContext2D.h"
#include "mozilla/gfx/2D.h"
#include "nsWrapperCache.h"
#include "gfxGradientCache.h"
namespace mozilla {
namespace dom {
@ -41,7 +42,10 @@ public:
return mStops;
}
mStops = aRT->CreateGradientStops(mRawStops.Elements(), mRawStops.Length());
mStops =
gfx::gfxGradientCache::GetOrCreateGradientStops(aRT,
mRawStops,
gfx;:EXTEND_CLAMP);
return mStops;
}