aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-29 20:44:39 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-29 20:44:39 +0000
commit950923b43761c10d9c8ffc1dfc0c878100d1e702 (patch)
treeca34a2820d5eb5b4fad6b3386f94a562cdf90e5c /include/core
parent89ff3dd5af99fb31931a63298617d9a91bff2ca6 (diff)
All SkAnnotations are no-draw. Propose we fold that through.
BUG= R=edisonn@google.com, reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/48523008 git-svn-id: http://skia.googlecode.com/svn/trunk@12008 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkAnnotation.h12
-rw-r--r--include/core/SkPaint.h11
2 files changed, 5 insertions, 18 deletions
diff --git a/include/core/SkAnnotation.h b/include/core/SkAnnotation.h
index 9814f8f76f..4d17b79004 100644
--- a/include/core/SkAnnotation.h
+++ b/include/core/SkAnnotation.h
@@ -24,18 +24,9 @@ struct SkPoint;
*/
class SkAnnotation : public SkRefCnt {
public:
- enum Flags {
- // If set, the associated drawing primitive should not be drawn
- kNoDraw_Flag = 1 << 0,
- };
-
- SkAnnotation(const char key[], SkData* value, uint32_t flags);
+ SkAnnotation(const char key[], SkData* value);
virtual ~SkAnnotation();
- uint32_t getFlags() const { return fFlags; }
-
- bool isNoDraw() const { return SkToBool(fFlags & kNoDraw_Flag); }
-
/**
* Return the data for the specified key, or NULL.
*/
@@ -47,7 +38,6 @@ public:
private:
SkString fKey;
SkData* fData;
- uint32_t fFlags;
typedef SkRefCnt INHERITED;
};
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 52321ddaf6..6c3a10f9ef 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -638,10 +638,10 @@ public:
/**
* Returns true if there is an annotation installed on this paint, and
* the annotation specifics no-drawing.
+ *
+ * Deprecated: all annotations are no-draw. Please just check getAnnotation().
*/
- bool isNoDrawAnnotation() const {
- return SkToBool(fPrivFlags & kNoDrawAnnotation_PrivFlag);
- }
+ bool isNoDrawAnnotation() const { return this->getAnnotation() != NULL; }
/**
* Return the paint's SkDrawLooper (if any). Does not affect the looper's
@@ -1006,11 +1006,8 @@ private:
unsigned fStyle : 2;
unsigned fTextEncoding : 2; // 3 values
unsigned fHinting : 2;
- unsigned fPrivFlags : 4; // these are not flattened/unflattened
+ //unsigned fFreeBits : 4;
- enum PrivFlags {
- kNoDrawAnnotation_PrivFlag = 1 << 0,
- };
SkDrawCacheProc getDrawCacheProc() const;
SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir,