diff options
Diffstat (limited to 'src/core/SkBitmapDevice.h')
-rw-r--r-- | src/core/SkBitmapDevice.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/SkBitmapDevice.h b/src/core/SkBitmapDevice.h index e040b6b0c6..f80cba6ee4 100644 --- a/src/core/SkBitmapDevice.h +++ b/src/core/SkBitmapDevice.h @@ -55,10 +55,19 @@ public: * any drawing to this device will have no effect. */ SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps, - void* externalHandle = nullptr); + void* externalHandle, const SkBitmap* coverage); static SkBitmapDevice* Create(const SkImageInfo&, const SkSurfaceProps&, - SkRasterHandleAllocator* = nullptr); + bool trackCoverage, + SkRasterHandleAllocator*); + + static SkBitmapDevice* Create(const SkImageInfo& info, const SkSurfaceProps& props) { + return Create(info, props, false, nullptr); + } + + const SkPixmap* accessCoverage() const { + return fCoverage ? &fCoverage->pixmap() : nullptr; + } protected: void* getRasterHandle() const override { return fRasterHandle; } @@ -165,6 +174,7 @@ private: SkBitmap fBitmap; void* fRasterHandle = nullptr; SkRasterClipStack fRCStack; + std::unique_ptr<SkBitmap> fCoverage; // if non-null, will have the same dimensions as fBitmap typedef SkBaseDevice INHERITED; }; |