SkXPS: Begin refactoring SkXPSDevice
A later CL will move all document-level fields and methods into
SkXPSDocument.
* SkXPSDocument cnstructor requires a xps factory ptr.
* All device layers share ownership of a single factory.
* renames SkDocument_XPS to the easier-to-say SkXPSDocument.
* Moves autocoinitialize to DM.
TODO: pipe the IXpsOMObjectFactory* into the SkDocument api.
No change in rendered documents.
Change-Id: I8a4680a3603951b1ce5f6c1de48714d4902061a9
Reviewed-on: https://skia-review.googlesource.com/7998
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/src/xps/SkXPSDevice.h b/src/xps/SkXPSDevice.h
index db8436d..0ad9939 100644
--- a/src/xps/SkXPSDevice.h
+++ b/src/xps/SkXPSDevice.h
@@ -40,7 +40,7 @@
SK_API SkXPSDevice(SkISize);
SK_API virtual ~SkXPSDevice();
- bool beginPortfolio(SkWStream* outputStream);
+ bool beginPortfolio(SkWStream* outputStream, IXpsOMObjectFactory*);
/**
@param unitsPerMeter converts geometry units into physical units.
@param pixelsPerMeter resolution to use when geometry must be rasterized.
@@ -161,9 +161,8 @@
};
friend HRESULT subset_typeface(TypefaceUse* current);
- SkXPSDevice(SkISize, IXpsOMObjectFactory*);
+ bool createCanvasForLayer();
- SkAutoCoInitialize fAutoCo;
SkTScopedComPtr<IXpsOMObjectFactory> fXpsFactory;
SkTScopedComPtr<IStream> fOutputStream;
SkTScopedComPtr<IXpsOMPackageWriter> fPackageWriter;