diff options
author | 2015-06-18 05:27:18 -0700 | |
---|---|---|
committer | 2015-06-18 05:27:18 -0700 | |
commit | bcd7ab5c0d0e5c3432a9aaeb44f1b703fea94282 (patch) | |
tree | 56e2d6b486f4d93ab21ac485750b85aca643a64c /src/core | |
parent | 00b621cfc0dac2a0028757a974de33a78bb8579d (diff) |
Add useDFT field to SkDeviceProperties
Review URL: https://codereview.chromium.org/1191943002
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBitmapDevice.cpp | 2 | ||||
-rw-r--r-- | src/core/SkDeviceProperties.h | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index 343bbc8893..8e8c10244b 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -117,7 +117,7 @@ void SkBitmapDevice::replaceBitmapBackendForRasterSurface(const SkBitmap& bm) { } SkBaseDevice* SkBitmapDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint*) { - SkDeviceProperties leaky(cinfo.fPixelGeometry); + const SkDeviceProperties leaky(cinfo.fPixelGeometry); return SkBitmapDevice::Create(cinfo.fInfo, &leaky); } diff --git a/src/core/SkDeviceProperties.h b/src/core/SkDeviceProperties.h index 85f87bcb86..53c0fa3ae2 100644 --- a/src/core/SkDeviceProperties.h +++ b/src/core/SkDeviceProperties.h @@ -13,20 +13,24 @@ struct SkDeviceProperties { SkDeviceProperties(const SkDeviceProperties& src) : fGamma(src.fGamma) + , fUseDFT(src.fUseDFT) , fPixelGeometry(src.fPixelGeometry) { } SkDeviceProperties(float gamma = SK_GAMMA_EXPONENT) : fGamma(gamma) + , fUseDFT(false) , fPixelGeometry(SkSurfacePropsDefaultPixelGeometry()) {} - SkDeviceProperties(SkPixelGeometry geo, float gamma = SK_GAMMA_EXPONENT) + SkDeviceProperties(SkPixelGeometry geo, bool useDFT = false, float gamma = SK_GAMMA_EXPONENT) : fGamma(gamma) + , fUseDFT(useDFT) , fPixelGeometry(geo) {} float gamma() const { return fGamma; } + bool useDFT() const { return fUseDFT; } SkPixelGeometry pixelGeometry() const { return fPixelGeometry; } void setPixelGeometry(SkPixelGeometry geo) { @@ -35,6 +39,7 @@ struct SkDeviceProperties { private: const float fGamma; + const bool fUseDFT; SkPixelGeometry fPixelGeometry; }; |