Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: include/core/SkDeviceProperties.h

Issue 14884010: Mask orientation and layout correctly. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Our mac port doesn't support vertical or bgr either. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/ports/SkFontHost_mac.cpp » ('j') | src/ports/SkFontHost_mac.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698