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

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

Issue 48523008: All SkAnnotations are no-draw. Propose we fold that through. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: deprecate Created 7 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkAnnotation.h ('k') | src/core/SkAnnotation.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 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
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 SkImageFilter* getImageFilter() const { return fImageFilter; } 632 SkImageFilter* getImageFilter() const { return fImageFilter; }
633 SkImageFilter* setImageFilter(SkImageFilter*); 633 SkImageFilter* setImageFilter(SkImageFilter*);
634 634
635 SkAnnotation* getAnnotation() const { return fAnnotation; } 635 SkAnnotation* getAnnotation() const { return fAnnotation; }
636 SkAnnotation* setAnnotation(SkAnnotation*); 636 SkAnnotation* setAnnotation(SkAnnotation*);
637 637
638 /** 638 /**
639 * Returns true if there is an annotation installed on this paint, and 639 * Returns true if there is an annotation installed on this paint, and
640 * the annotation specifics no-drawing. 640 * the annotation specifics no-drawing.
641 *
642 * Deprecated: all annotations are no-draw. Please just check getAnnotatio n().
641 */ 643 */
642 bool isNoDrawAnnotation() const { 644 bool isNoDrawAnnotation() const { return this->getAnnotation() != NULL; }
643 return SkToBool(fPrivFlags & kNoDrawAnnotation_PrivFlag);
644 }
645 645
646 /** 646 /**
647 * Return the paint's SkDrawLooper (if any). Does not affect the looper's 647 * Return the paint's SkDrawLooper (if any). Does not affect the looper's
648 * reference count. 648 * reference count.
649 */ 649 */
650 SkDrawLooper* getLooper() const { return fLooper; } 650 SkDrawLooper* getLooper() const { return fLooper; }
651 651
652 /** 652 /**
653 * Set or clear the looper object. 653 * Set or clear the looper object.
654 * <p /> 654 * <p />
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 SkScalar fWidth; 999 SkScalar fWidth;
1000 SkScalar fMiterLimit; 1000 SkScalar fMiterLimit;
1001 // all of these bitfields should add up to 32 1001 // all of these bitfields should add up to 32
1002 unsigned fFlags : 16; 1002 unsigned fFlags : 16;
1003 unsigned fTextAlign : 2; 1003 unsigned fTextAlign : 2;
1004 unsigned fCapType : 2; 1004 unsigned fCapType : 2;
1005 unsigned fJoinType : 2; 1005 unsigned fJoinType : 2;
1006 unsigned fStyle : 2; 1006 unsigned fStyle : 2;
1007 unsigned fTextEncoding : 2; // 3 values 1007 unsigned fTextEncoding : 2; // 3 values
1008 unsigned fHinting : 2; 1008 unsigned fHinting : 2;
1009 unsigned fPrivFlags : 4; // these are not flattened/unflattened 1009 //unsigned fFreeBits : 4;
1010 1010
1011 enum PrivFlags {
1012 kNoDrawAnnotation_PrivFlag = 1 << 0,
1013 };
1014 1011
1015 SkDrawCacheProc getDrawCacheProc() const; 1012 SkDrawCacheProc getDrawCacheProc() const;
1016 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, 1013 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,
1017 bool needFullMetrics) const; 1014 bool needFullMetrics) const;
1018 1015
1019 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, 1016 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
1020 int* count, SkRect* bounds) const; 1017 int* count, SkRect* bounds) const;
1021 1018
1022 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const SkMatrix*) const; 1019 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const SkMatrix*) const;
1023 1020
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 #ifdef SK_BUILD_FOR_ANDROID 1076 #ifdef SK_BUILD_FOR_ANDROID
1080 SkPaintOptionsAndroid fPaintOptionsAndroid; 1077 SkPaintOptionsAndroid fPaintOptionsAndroid;
1081 1078
1082 // In order for the == operator to work properly this must be the last field 1079 // In order for the == operator to work properly this must be the last field
1083 // in the struct so that we can do a memcmp to this field's offset. 1080 // in the struct so that we can do a memcmp to this field's offset.
1084 uint32_t fGenerationID; 1081 uint32_t fGenerationID;
1085 #endif 1082 #endif
1086 }; 1083 };
1087 1084
1088 #endif 1085 #endif
OLDNEW
« no previous file with comments | « include/core/SkAnnotation.h ('k') | src/core/SkAnnotation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698