| Index: src/core/SkDeviceProperties.h
|
| diff --git a/src/core/SkDeviceProperties.h b/src/core/SkDeviceProperties.h
|
| index 11ecd651570dcb4c9cfc5994b2be83a93a98f4eb..e79f21a2350f1e4b958c73c66e631562cc99be87 100644
|
| --- a/src/core/SkDeviceProperties.h
|
| +++ b/src/core/SkDeviceProperties.h
|
| @@ -14,13 +14,27 @@ struct SkDeviceProperties {
|
| enum InitType {
|
| kLegacyLCD_InitType
|
| };
|
| - SkDeviceProperties(InitType) : fPixelGeometry(SkSurfacePropsDefaultPixelGeometry()) {}
|
| - SkDeviceProperties(SkPixelGeometry geo) : fPixelGeometry(geo) {}
|
|
|
| - SkPixelGeometry fPixelGeometry;
|
| + SkDeviceProperties(InitType, float gamma = SK_GAMMA_EXPONENT)
|
| + : fGamma(gamma)
|
| + , fPixelGeometry(SkSurfacePropsDefaultPixelGeometry())
|
| + {}
|
| +
|
| + SkDeviceProperties(SkPixelGeometry geo, float gamma = SK_GAMMA_EXPONENT)
|
| + : fGamma(gamma)
|
| + , fPixelGeometry(geo)
|
| + {}
|
| +
|
| + SkPixelGeometry pixelGeometry() const { return fPixelGeometry; }
|
| + float gamma() const { return fGamma; }
|
|
|
| - // read-only attribute -- until we actually store a value (future CL)
|
| - float getGamma() const { return SK_GAMMA_EXPONENT; }
|
| + void setPixelGeometry(SkPixelGeometry geo) {
|
| + fPixelGeometry = geo;
|
| + }
|
| +
|
| +private:
|
| + const float fGamma;
|
| + SkPixelGeometry fPixelGeometry;
|
| };
|
|
|
| #endif
|
|
|