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

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: 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 SkRasterizer* setRasterizer(SkRasterizer* rasterizer); 630 SkRasterizer* setRasterizer(SkRasterizer* rasterizer);
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.
edisonn 2013/10/29 19:44:36 update comment
reed1 2013/10/29 19:48:49 Perhaps mark as DEPRECATED, since getAnnotation al
mtklein 2013/10/29 20:28:53 Done.
641 */ 641 */
642 bool isNoDrawAnnotation() const { 642 bool isNoDrawAnnotation() const {
643 return SkToBool(fPrivFlags & kNoDrawAnnotation_PrivFlag); 643 // All annotations are no-draw.
644 return this->getAnnotation() != NULL;
644 } 645 }
645 646
646 /** 647 /**
647 * Return the paint's SkDrawLooper (if any). Does not affect the looper's 648 * Return the paint's SkDrawLooper (if any). Does not affect the looper's
648 * reference count. 649 * reference count.
649 */ 650 */
650 SkDrawLooper* getLooper() const { return fLooper; } 651 SkDrawLooper* getLooper() const { return fLooper; }
651 652
652 /** 653 /**
653 * Set or clear the looper object. 654 * Set or clear the looper object.
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 SkScalar fWidth; 1000 SkScalar fWidth;
1000 SkScalar fMiterLimit; 1001 SkScalar fMiterLimit;
1001 // all of these bitfields should add up to 32 1002 // all of these bitfields should add up to 32
1002 unsigned fFlags : 16; 1003 unsigned fFlags : 16;
1003 unsigned fTextAlign : 2; 1004 unsigned fTextAlign : 2;
1004 unsigned fCapType : 2; 1005 unsigned fCapType : 2;
1005 unsigned fJoinType : 2; 1006 unsigned fJoinType : 2;
1006 unsigned fStyle : 2; 1007 unsigned fStyle : 2;
1007 unsigned fTextEncoding : 2; // 3 values 1008 unsigned fTextEncoding : 2; // 3 values
1008 unsigned fHinting : 2; 1009 unsigned fHinting : 2;
1009 unsigned fPrivFlags : 4; // these are not flattened/unflattened 1010 //unsigned fFreeBits : 4;
1010 1011
1011 enum PrivFlags {
1012 kNoDrawAnnotation_PrivFlag = 1 << 0,
1013 };
1014 1012
1015 SkDrawCacheProc getDrawCacheProc() const; 1013 SkDrawCacheProc getDrawCacheProc() const;
1016 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, 1014 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,
1017 bool needFullMetrics) const; 1015 bool needFullMetrics) const;
1018 1016
1019 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, 1017 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length,
1020 int* count, SkRect* bounds) const; 1018 int* count, SkRect* bounds) const;
1021 1019
1022 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const SkMatrix*) const; 1020 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const SkMatrix*) const;
1023 1021
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 #ifdef SK_BUILD_FOR_ANDROID 1077 #ifdef SK_BUILD_FOR_ANDROID
1080 SkPaintOptionsAndroid fPaintOptionsAndroid; 1078 SkPaintOptionsAndroid fPaintOptionsAndroid;
1081 1079
1082 // In order for the == operator to work properly this must be the last field 1080 // 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. 1081 // in the struct so that we can do a memcmp to this field's offset.
1084 uint32_t fGenerationID; 1082 uint32_t fGenerationID;
1085 #endif 1083 #endif
1086 }; 1084 };
1087 1085
1088 #endif 1086 #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