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

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

Issue 1322433006: Rename flag from "distance field" to "device independent." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add legacy alias for chrome Created 5 years, 3 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
« no previous file with comments | « gm/textblobmixedsizes.cpp ('k') | samplecode/SampleApp.cpp » ('j') | 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SK_API 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 kUseDeviceIndependentFonts_Flag = 1 << 2,
57 }; 57 };
58 /** Deprecated alias used by Chromium. Will be removed. */
59 static const Flags kUseDistanceFieldFonts_Flag = kUseDeviceIndependentFonts_ Flag;
60
58 SkSurfaceProps(uint32_t flags, SkPixelGeometry); 61 SkSurfaceProps(uint32_t flags, SkPixelGeometry);
59 62
60 enum InitType { 63 enum InitType {
61 kLegacyFontHost_InitType 64 kLegacyFontHost_InitType
62 }; 65 };
63 SkSurfaceProps(InitType); 66 SkSurfaceProps(InitType);
64 SkSurfaceProps(uint32_t flags, InitType); 67 SkSurfaceProps(uint32_t flags, InitType);
65 SkSurfaceProps(const SkSurfaceProps& other); 68 SkSurfaceProps(const SkSurfaceProps& other);
66 69
67 uint32_t flags() const { return fFlags; } 70 uint32_t flags() const { return fFlags; }
68 SkPixelGeometry pixelGeometry() const { return fPixelGeometry; } 71 SkPixelGeometry pixelGeometry() const { return fPixelGeometry; }
69 72
70 bool isDisallowAA() const { return SkToBool(fFlags & kDisallowAntiAlias_Flag ); } 73 bool isDisallowAA() const { return SkToBool(fFlags & kDisallowAntiAlias_Flag ); }
71 bool isDisallowDither() const { return SkToBool(fFlags & kDisallowDither_Fla g); } 74 bool isDisallowDither() const { return SkToBool(fFlags & kDisallowDither_Fla g); }
72 bool isUseDistanceFieldFonts() const { return SkToBool(fFlags & kUseDistance FieldFonts_Flag); } 75 bool isUseDeviceIndependentFonts() const {
76 return SkToBool(fFlags & kUseDeviceIndependentFonts_Flag);
77 }
73 78
74 private: 79 private:
75 SkSurfaceProps(); 80 SkSurfaceProps();
76 81
77 uint32_t fFlags; 82 uint32_t fFlags;
78 SkPixelGeometry fPixelGeometry; 83 SkPixelGeometry fPixelGeometry;
79 }; 84 };
80 85
81 #endif 86 #endif
OLDNEW
« no previous file with comments | « gm/textblobmixedsizes.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698