зеркало из https://github.com/mozilla/gecko-dev.git
Bug 979905 - Make VectorImage use a Moz2D backed gfxContext. r=mattwoodrow
This commit is contained in:
Родитель
b67b8321a1
Коммит
1490825198
|
@ -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!
|
||||
// --------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче