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

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

Issue 693973003: Export (SK_API) SkSurfaceProps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkSurfaceProps_DEFINED 8 #ifndef SkSurfaceProps_DEFINED
9 #define SkSurfaceProps_DEFINED 9 #define SkSurfaceProps_DEFINED
10 10
(...skipping 30 matching lines...) Expand all
41 // Returns true iff geo is a known geometry and is vertical. 41 // Returns true iff geo is a known geometry and is vertical.
42 static inline bool SkPixelGeometryIsV(SkPixelGeometry geo) { 42 static inline bool SkPixelGeometryIsV(SkPixelGeometry geo) {
43 return kRGB_V_SkPixelGeometry == geo || kBGR_V_SkPixelGeometry == geo; 43 return kRGB_V_SkPixelGeometry == geo || kBGR_V_SkPixelGeometry == geo;
44 } 44 }
45 45
46 /** 46 /**
47 * Describes properties and constraints of a given SkSurface. The rendering eng ine can parse these 47 * Describes properties and constraints of a given SkSurface. The rendering eng ine can parse these
48 * during drawing, and can sometimes optimize its performance (e.g. disabling a n expensive 48 * during drawing, and can sometimes optimize its performance (e.g. disabling a n expensive
49 * feature). 49 * feature).
50 */ 50 */
51 class SkSurfaceProps { 51 class SK_API SkSurfaceProps {
52 public: 52 public:
53 enum Flags { 53 enum Flags {
54 kDisallowAntiAlias_Flag = 1 << 0, 54 kDisallowAntiAlias_Flag = 1 << 0,
55 kDisallowDither_Flag = 1 << 1, 55 kDisallowDither_Flag = 1 << 1,
56 kUseDistanceFieldFonts_Flag = 1 << 2, 56 kUseDistanceFieldFonts_Flag = 1 << 2,
57 }; 57 };
58 SkSurfaceProps(uint32_t flags, SkPixelGeometry); 58 SkSurfaceProps(uint32_t flags, SkPixelGeometry);
59 59
60 enum InitType { 60 enum InitType {
61 kLegacyFontHost_InitType 61 kLegacyFontHost_InitType
62 }; 62 };
63 SkSurfaceProps(InitType); 63 SkSurfaceProps(InitType);
64 SkSurfaceProps(uint32_t flags, InitType); 64 SkSurfaceProps(uint32_t flags, InitType);
65 65
66 uint32_t flags() const { return fFlags; } 66 uint32_t flags() const { return fFlags; }
67 SkPixelGeometry pixelGeometry() const { return fPixelGeometry; } 67 SkPixelGeometry pixelGeometry() const { return fPixelGeometry; }
68 68
69 bool isDisallowAA() const { return SkToBool(fFlags & kDisallowAntiAlias_Flag ); } 69 bool isDisallowAA() const { return SkToBool(fFlags & kDisallowAntiAlias_Flag ); }
70 bool isDisallowDither() const { return SkToBool(fFlags & kDisallowDither_Fla g); } 70 bool isDisallowDither() const { return SkToBool(fFlags & kDisallowDither_Fla g); }
71 bool isUseDistanceFieldFonts() const { return SkToBool(fFlags & kUseDistance FieldFonts_Flag); } 71 bool isUseDistanceFieldFonts() const { return SkToBool(fFlags & kUseDistance FieldFonts_Flag); }
72 72
73 private: 73 private:
74 SkSurfaceProps(); 74 SkSurfaceProps();
75 75
76 uint32_t fFlags; 76 uint32_t fFlags;
77 SkPixelGeometry fPixelGeometry; 77 SkPixelGeometry fPixelGeometry;
78 }; 78 };
79 79
80 #endif 80 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698