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

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

Issue 14761003: API modifications needed to upstream Android font changes. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: addressing comments 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
« no previous file with comments | « gyp/core.gyp ('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 "SkXfermode.h" 16 #include "SkXfermode.h"
17 #ifdef SK_BUILD_FOR_ANDROID
18 #include "SkPaintOptionsAndroid.h"
19 #endif
17 20
18 class SkAnnotation; 21 class SkAnnotation;
19 class SkAutoGlyphCache; 22 class SkAutoGlyphCache;
20 class SkColorFilter; 23 class SkColorFilter;
21 class SkDescriptor; 24 class SkDescriptor;
22 struct SkDeviceProperties; 25 struct SkDeviceProperties;
23 class SkFlattenableReadBuffer; 26 class SkFlattenableReadBuffer;
24 class SkFlattenableWriteBuffer; 27 class SkFlattenableWriteBuffer;
25 struct SkGlyph; 28 struct SkGlyph;
26 struct SkRect; 29 struct SkRect;
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*); 856 const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*);
854 const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*); 857 const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*);
855 const void* findImage(const SkGlyph&, const SkMatrix*); 858 const void* findImage(const SkGlyph&, const SkMatrix*);
856 859
857 uint32_t getGenerationID() const; 860 uint32_t getGenerationID() const;
858 void setGenerationID(uint32_t generationID); 861 void setGenerationID(uint32_t generationID);
859 862
860 /** Returns the base glyph count for the strike associated with this paint 863 /** Returns the base glyph count for the strike associated with this paint
861 */ 864 */
862 unsigned getBaseGlyphCount(SkUnichar text) const; 865 unsigned getBaseGlyphCount(SkUnichar text) const;
866
867 const SkPaintOptionsAndroid& getPaintOptionsAndroid() const {
868 return fPaintOptionsAndroid;
869 }
870 void setPaintOptionsAndroid(const SkPaintOptionsAndroid& options);
863 #endif 871 #endif
864 872
865 // returns true if the paint's settings (e.g. xfermode + alpha) resolve to 873 // returns true if the paint's settings (e.g. xfermode + alpha) resolve to
866 // mean that we need not draw at all (e.g. SrcOver + 0-alpha) 874 // mean that we need not draw at all (e.g. SrcOver + 0-alpha)
867 bool nothingToDraw() const; 875 bool nothingToDraw() const;
868 876
869 /////////////////////////////////////////////////////////////////////////// 877 ///////////////////////////////////////////////////////////////////////////
870 // would prefer to make these private... 878 // would prefer to make these private...
871 879
872 /** Returns true if the current paint settings allow for fast computation of 880 /** Returns true if the current paint settings allow for fast computation of
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 kCanonicalTextSizeForPaths = 64 991 kCanonicalTextSizeForPaths = 64
984 }; 992 };
985 friend class SkAutoGlyphCache; 993 friend class SkAutoGlyphCache;
986 friend class SkCanvas; 994 friend class SkCanvas;
987 friend class SkDraw; 995 friend class SkDraw;
988 friend class SkGraphics; // So Term() can be called. 996 friend class SkGraphics; // So Term() can be called.
989 friend class SkPDFDevice; 997 friend class SkPDFDevice;
990 friend class SkTextToPathIter; 998 friend class SkTextToPathIter;
991 999
992 #ifdef SK_BUILD_FOR_ANDROID 1000 #ifdef SK_BUILD_FOR_ANDROID
1001 SkPaintOptionsAndroid fPaintOptionsAndroid;
1002
993 // In order for the == operator to work properly this must be the last field 1003 // In order for the == operator to work properly this must be the last field
994 // in the struct so that we can do a memcmp to this field's offset. 1004 // in the struct so that we can do a memcmp to this field's offset.
995 uint32_t fGenerationID; 1005 uint32_t fGenerationID;
996 #endif 1006 #endif
997 }; 1007 };
998 1008
999 #endif 1009 #endif
OLDNEW
« no previous file with comments | « gyp/core.gyp ('k') | include/core/SkPaintOptionsAndroid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698