Index: src/device/xps/SkXPSDevice.cpp |
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp |
index 1c06235aef8db7bbf7f99e42e8a89b6aad71bdd4..d1525479c4af23e802d6d61848ecd812ed444cce 100644 |
--- a/src/device/xps/SkXPSDevice.cpp |
+++ b/src/device/xps/SkXPSDevice.cpp |
@@ -112,10 +112,25 @@ static SkBitmap make_fake_bitmap(int width, int height) { |
// TODO: should inherit from SkBaseDevice instead of SkBitmapDevice... |
SkXPSDevice::SkXPSDevice() |
- : SkBitmapDevice(make_fake_bitmap(10000, 10000)) |
+ : INHERITED(make_fake_bitmap(10000, 10000), SkSurfaceProps(0, kUnknown_SkPixelGeometry)) |
, fCurrentPage(0) { |
} |
+SkXPSDevice::SkXPSDevice(IXpsOMObjectFactory* xpsFactory) |
+ : INHERITED(make_fake_bitmap(10000, 10000), SkSurfaceProps(0, kUnknown_SkPixelGeometry)) |
+ , fCurrentPage(0) { |
+ |
+ HRVM(CoCreateInstance( |
+ CLSID_XpsOMObjectFactory, |
+ NULL, |
+ CLSCTX_INPROC_SERVER, |
+ IID_PPV_ARGS(&this->fXpsFactory)), |
+ "Could not create factory for layer."); |
+ |
+ HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
+ "Could not create canvas for layer."); |
+} |
+ |
SkXPSDevice::~SkXPSDevice() { |
} |
@@ -2259,18 +2274,3 @@ SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint* |
return new SkXPSDevice(this->fXpsFactory.get()); |
} |
-SkXPSDevice::SkXPSDevice(IXpsOMObjectFactory* xpsFactory) |
- : SkBitmapDevice(make_fake_bitmap(10000, 10000)) |
- , fCurrentPage(0) { |
- |
- HRVM(CoCreateInstance( |
- CLSID_XpsOMObjectFactory, |
- NULL, |
- CLSCTX_INPROC_SERVER, |
- IID_PPV_ARGS(&this->fXpsFactory)), |
- "Could not create factory for layer."); |
- |
- HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
- "Could not create canvas for layer."); |
-} |
- |