aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBitmapDevice.h
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 /include/core/SkBitmapDevice.h
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 'include/core/SkBitmapDevice.h')
-rw-r--r--include/core/SkBitmapDevice.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/include/core/SkBitmapDevice.h b/include/core/SkBitmapDevice.h
index 3ce06b0cc3..7e2b476611 100644
--- a/include/core/SkBitmapDevice.h
+++ b/include/core/SkBitmapDevice.h
@@ -20,21 +20,24 @@ public:
* Construct a new device with the specified bitmap as its backend. It is
* valid for the bitmap to have no pixels associated with it. In that case,
* any drawing to this device will have no effect.
- */
+ */
SkBitmapDevice(const SkBitmap& bitmap);
-protected:
+
+ /**
+ * Create a new device along with its requisite pixel memory using
+ * default SkSurfaceProps (i.e., kLegacyFontHost_InitType-style).
+ * Note: this entry point is slated for removal - no one should call it.
+ */
+ static SkBitmapDevice* Create(const SkImageInfo& info);
+
/**
* Construct a new device with the specified bitmap as its backend. It is
* valid for the bitmap to have no pixels associated with it. In that case,
* any drawing to this device will have no effect.
- */
+ */
SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps);
-private:
- static SkBitmapDevice* Create(const SkImageInfo&, const SkSurfaceProps*);
-public:
- static SkBitmapDevice* Create(const SkImageInfo& info) {
- return Create(info, NULL);
- }
+
+ static SkBitmapDevice* Create(const SkImageInfo&, const SkSurfaceProps&);
SkImageInfo imageInfo() const override;