OLD | NEW |
1 #ifndef SkDeviceProperties_DEFINED | 1 #ifndef SkDeviceProperties_DEFINED |
2 #define SkDeviceProperties_DEFINED | 2 #define SkDeviceProperties_DEFINED |
3 | 3 |
4 #ifndef SK_GAMMA_EXPONENT | 4 #ifndef SK_GAMMA_EXPONENT |
5 #define SK_GAMMA_EXPONENT (2.2f) | 5 #define SK_GAMMA_EXPONENT (2.2f) |
6 #endif | 6 #endif |
7 | 7 |
8 #ifdef SK_GAMMA_SRGB | 8 #ifdef SK_GAMMA_SRGB |
9 #undef SK_GAMMA_EXPONENT | 9 #undef SK_GAMMA_EXPONENT |
10 #define SK_GAMMA_EXPONENT (0.0f) | 10 #define SK_GAMMA_EXPONENT (0.0f) |
(...skipping 28 matching lines...) Expand all Loading... |
39 kUnknown_Layout = 0x0, | 39 kUnknown_Layout = 0x0, |
40 kKnown_Layout = 0x8, | 40 kKnown_Layout = 0x8, |
41 | 41 |
42 kRGB_Layout = 0x8, //!< this is the default | 42 kRGB_Layout = 0x8, //!< this is the default |
43 kBGR_Layout = 0xC, | 43 kBGR_Layout = 0xC, |
44 | 44 |
45 kLayoutMask = 0xC, | 45 kLayoutMask = 0xC, |
46 }; | 46 }; |
47 | 47 |
48 Orientation getOrientation() { | 48 Orientation getOrientation() { |
49 return static_cast<Orientation>(fGeometry | kOrientationMask); | 49 return static_cast<Orientation>(fGeometry & kOrientationMask); |
50 } | 50 } |
51 Layout getLayout() { | 51 Layout getLayout() { |
52 return static_cast<Layout>(fGeometry | kLayoutMask); | 52 return static_cast<Layout>(fGeometry & kLayoutMask); |
53 } | 53 } |
54 | 54 |
55 bool isOrientationKnown() { | 55 bool isOrientationKnown() { |
56 return SkToBool(fGeometry & kKnown_Orientation); | 56 return SkToBool(fGeometry & kKnown_Orientation); |
57 } | 57 } |
58 bool isLayoutKnown() { | 58 bool isLayoutKnown() { |
59 return SkToBool(fGeometry & kKnown_Layout); | 59 return SkToBool(fGeometry & kKnown_Layout); |
60 } | 60 } |
61 | 61 |
62 private: | 62 private: |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 /** Each pixel of an image will have some number of channels. | 104 /** Each pixel of an image will have some number of channels. |
105 * Can the layout of those channels be exploited? */ | 105 * Can the layout of those channels be exploited? */ |
106 Geometry fGeometry; | 106 Geometry fGeometry; |
107 | 107 |
108 /** Represents the color space of the image. This is a woefully inadequate b
eginning. */ | 108 /** Represents the color space of the image. This is a woefully inadequate b
eginning. */ |
109 SkScalar fGamma; | 109 SkScalar fGamma; |
110 }; | 110 }; |
111 | 111 |
112 #endif | 112 #endif |
OLD | NEW |