mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 979905 - Make VectorImage use a Moz2D backed gfxContext. r=mattwoodrow
This commit is contained in:
parent
0cc9e2da9d
commit
cf3ab2df31
@ -14,6 +14,8 @@
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/dom/SVGSVGElement.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsIDOMEvent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIStreamListener.h"
|
||||
@ -680,7 +682,16 @@ VectorImage::GetFrame(uint32_t aWhichFrame,
|
||||
|
||||
nsRefPtr<gfxImageSurface> surface =
|
||||
new gfxImageSurface(surfaceSize, gfxImageFormat::ARGB32);
|
||||
nsRefPtr<gfxContext> context = new gfxContext(surface);
|
||||
|
||||
RefPtr<DrawTarget> drawTarget =
|
||||
Factory::CreateDrawTargetForData(BackendType::CAIRO,
|
||||
surface->Data(),
|
||||
IntSize(imageIntSize.width,
|
||||
imageIntSize.height),
|
||||
surface->Stride(),
|
||||
SurfaceFormat::B8G8R8A8);
|
||||
|
||||
nsRefPtr<gfxContext> context = new gfxContext(drawTarget);
|
||||
|
||||
// Draw to our surface!
|
||||
// --------------------
|
||||
|
Loading…
Reference in New Issue
Block a user