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

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

Issue 473543004: Revert of Remove SkPaintOptionsAndroid (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « gyp/tests.gypi ('k') | include/core/SkPaintOptionsAndroid.h » ('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 2
3 /* 3 /*
4 * Copyright 2006 The Android Open Source Project 4 * Copyright 2006 The Android Open Source Project
5 * 5 *
6 * Use of this source code is governed by a BSD-style license that can be 6 * Use of this source code is governed by a BSD-style license that can be
7 * found in the LICENSE file. 7 * found in the LICENSE file.
8 */ 8 */
9 9
10 10
11 #ifndef SkPaint_DEFINED 11 #ifndef SkPaint_DEFINED
12 #define SkPaint_DEFINED 12 #define SkPaint_DEFINED
13 13
14 #include "SkColor.h" 14 #include "SkColor.h"
15 #include "SkDrawLooper.h" 15 #include "SkDrawLooper.h"
16 #include "SkMatrix.h" 16 #include "SkMatrix.h"
17 #include "SkXfermode.h" 17 #include "SkXfermode.h"
18 #ifdef SK_BUILD_FOR_ANDROID
19 #include "SkPaintOptionsAndroid.h"
20 #endif
18 21
19 class SkAnnotation; 22 class SkAnnotation;
20 class SkAutoGlyphCache; 23 class SkAutoGlyphCache;
21 class SkColorFilter; 24 class SkColorFilter;
22 class SkDescriptor; 25 class SkDescriptor;
23 struct SkDeviceProperties; 26 struct SkDeviceProperties;
24 class SkReadBuffer; 27 class SkReadBuffer;
25 class SkWriteBuffer; 28 class SkWriteBuffer;
26 struct SkGlyph; 29 struct SkGlyph;
27 struct SkRect; 30 struct SkRect;
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 */ 934 */
932 void getTextPath(const void* text, size_t length, SkScalar x, SkScalar y, 935 void getTextPath(const void* text, size_t length, SkScalar x, SkScalar y,
933 SkPath* path) const; 936 SkPath* path) const;
934 937
935 void getPosTextPath(const void* text, size_t length, 938 void getPosTextPath(const void* text, size_t length,
936 const SkPoint pos[], SkPath* path) const; 939 const SkPoint pos[], SkPath* path) const;
937 940
938 #ifdef SK_BUILD_FOR_ANDROID 941 #ifdef SK_BUILD_FOR_ANDROID
939 uint32_t getGenerationID() const; 942 uint32_t getGenerationID() const;
940 void setGenerationID(uint32_t generationID); 943 void setGenerationID(uint32_t generationID);
944
945 const SkPaintOptionsAndroid& getPaintOptionsAndroid() const {
946 return fPaintOptionsAndroid;
947 }
948 void setPaintOptionsAndroid(const SkPaintOptionsAndroid& options);
941 #endif 949 #endif
942 950
943 // returns true if the paint's settings (e.g. xfermode + alpha) resolve to 951 // returns true if the paint's settings (e.g. xfermode + alpha) resolve to
944 // mean that we need not draw at all (e.g. SrcOver + 0-alpha) 952 // mean that we need not draw at all (e.g. SrcOver + 0-alpha)
945 bool nothingToDraw() const; 953 bool nothingToDraw() const;
946 954
947 /////////////////////////////////////////////////////////////////////////// 955 ///////////////////////////////////////////////////////////////////////////
948 // would prefer to make these private... 956 // would prefer to make these private...
949 957
950 /** Returns true if the current paint settings allow for fast computation of 958 /** Returns true if the current paint settings allow for fast computation of
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 friend class SkDraw; 1131 friend class SkDraw;
1124 friend class SkGraphics; // So Term() can be called. 1132 friend class SkGraphics; // So Term() can be called.
1125 friend class SkPDFDevice; 1133 friend class SkPDFDevice;
1126 friend class GrBitmapTextContext; 1134 friend class GrBitmapTextContext;
1127 friend class GrDistanceFieldTextContext; 1135 friend class GrDistanceFieldTextContext;
1128 friend class GrStencilAndCoverTextContext; 1136 friend class GrStencilAndCoverTextContext;
1129 friend class SkTextToPathIter; 1137 friend class SkTextToPathIter;
1130 friend class SkCanonicalizePaint; 1138 friend class SkCanonicalizePaint;
1131 1139
1132 #ifdef SK_BUILD_FOR_ANDROID 1140 #ifdef SK_BUILD_FOR_ANDROID
1141 SkPaintOptionsAndroid fPaintOptionsAndroid;
1142
1133 // In order for the == operator to work properly this must be the last field 1143 // In order for the == operator to work properly this must be the last field
1134 // in the struct so that we can do a memcmp to this field's offset. 1144 // in the struct so that we can do a memcmp to this field's offset.
1135 uint32_t fGenerationID; 1145 uint32_t fGenerationID;
1136 #endif 1146 #endif
1137 }; 1147 };
1138 1148
1139 #endif 1149 #endif
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | include/core/SkPaintOptionsAndroid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698