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

Unified Diff: src/core/SkValue.h

Issue 1613053006: SkValue: to/from SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@skvalue_xfermode2
Patch Set: 2016-01-21 (Thursday) 17:20:39 EST Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkValueKeys.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkValue.h
diff --git a/src/core/SkValue.h b/src/core/SkValue.h
index 5a6453f9080d2815fcfd645fe708a30f421dbd7b..2bfbc9cdacdfa2c0844e0e24374ac843bb3d4b1b 100644
--- a/src/core/SkValue.h
+++ b/src/core/SkValue.h
@@ -25,6 +25,7 @@ public:
kMaxBuiltin = 0xFF,
// 256-2147483647 may be used by Skia for public Object types.
+ Image,
Matrix,
ArithmeticXfermode,
@@ -65,6 +66,12 @@ public:
static SkValue Object(Type);
Type type() const { return fType; }
+ bool isData() const {
+ return Bytes == fType
+ || U16s == fType
+ || U32s == fType
+ || F32s == fType;
+ }
// These remaining methods may assert they're called on a value of the appropriate type.
@@ -103,12 +110,6 @@ private:
SkValue(Type);
bool isObject() const { return fType > kMaxBuiltin; }
- bool isData() const {
- return Bytes == fType
- || U16s == fType
- || U32s == fType
- || F32s == fType;
- }
template <typename T> static SkValue FromT(SkValue::Type, T SkValue::*, T);
template <typename T> static SkValue FromTs(SkValue::Type, SkData*);
template <typename T> const T* asTs(SkValue::Type, int*) const;
« no previous file with comments | « no previous file | src/core/SkValueKeys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698