aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/device
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-06-22 09:46:59 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-22 09:46:59 -0700
commit9a53fd7c41554630124522f4b6eedc16912abbb7 (patch)
tree20550e4369717dfa1082ba4913a4dc646d040b5e /src/device
parent462a33c7ac6ad82ac3511884d6448491e9e9a647 (diff)
Begin kLegacyFontHost_InitType cleanup
This CL starts the process of pushing kLegacyFontHost_InitType-type SkSurfaceProps up the call stack and out of Skia. It: Gets rid of the default SkBaseDevice ctor. This means everyone has to always hand an explicit SkSurfaceProps to it. It makes public the SkBitmapDevice creation methods that require SkSurfaceProps. Removes (in Skia's code base) all SkBitmapDevice ctor calls w/o SkSurfaceProps. Makes the "recording" canvases (e.g., pdf, svg, xps) explicitly not use kLegacyFontHost_InitType. Replicates the creating canvas/device's flags on saveLayer devices BUG=skia:3934 Review URL: https://codereview.chromium.org/1204433002
Diffstat (limited to 'src/device')
-rw-r--r--src/device/xps/SkXPSDevice.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp
index 1c06235aef..d1525479c4 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.");
-}
-