#define DRAWOPS_FLAG_MASK ((1 << DRAWOPS_FLAG_BITS) - 1)
#define DRAWOPS_DATA_MASK ((1 << DRAWOPS_DATA_BITS) - 1)
-static unsigned DrawOp_unpackOp(uint32_t op32) {
+static inline unsigned DrawOp_unpackOp(uint32_t op32) {
return (op32 >> (DRAWOPS_FLAG_BITS + DRAWOPS_DATA_BITS));
}
-static unsigned DrawOp_unpackFlags(uint32_t op32) {
+static inline unsigned DrawOp_unpackFlags(uint32_t op32) {
return (op32 >> DRAWOPS_DATA_BITS) & DRAWOPS_FLAG_MASK;
}
-static unsigned DrawOp_unpackData(uint32_t op32) {
+static inline unsigned DrawOp_unpackData(uint32_t op32) {
return op32 & DRAWOPS_DATA_MASK;
}
-static uint32_t DrawOp_packOpFlagData(DrawOps op, unsigned flags, unsigned data) {
+static inline uint32_t DrawOp_packOpFlagData(DrawOps op, unsigned flags, unsigned data) {
SkASSERT(0 == (op & ~DRAWOPS_OP_MASK));
SkASSERT(0 == (flags & ~DRAWOPS_FLAG_MASK));
SkASSERT(0 == (data & ~DRAWOPS_DATA_MASK));
#define PAINTOPS_FLAG_MASK ((1 << PAINTOPS_FLAG_BITS) - 1)
#define PAINTOPS_DATA_MASK ((1 << PAINTOPS_DATA_BITS) - 1)
-static unsigned PaintOp_unpackOp(uint32_t op32) {
+static inline unsigned PaintOp_unpackOp(uint32_t op32) {
return (op32 >> (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS));
}
-static unsigned PaintOp_unpackFlags(uint32_t op32) {
+static inline unsigned PaintOp_unpackFlags(uint32_t op32) {
return (op32 >> PAINTOPS_DATA_BITS) & PAINTOPS_FLAG_MASK;
}
-static unsigned PaintOp_unpackData(uint32_t op32) {
+static inline unsigned PaintOp_unpackData(uint32_t op32) {
return op32 & PAINTOPS_DATA_MASK;
}
-static uint32_t PaintOp_packOp(PaintOps op) {
+static inline uint32_t PaintOp_packOp(PaintOps op) {
SkASSERT(0 == (op & ~PAINTOPS_OP_MASK));
return op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS);
}
-static uint32_t PaintOp_packOpData(PaintOps op, unsigned data) {
+static inline uint32_t PaintOp_packOpData(PaintOps op, unsigned data) {
SkASSERT(0 == (op & ~PAINTOPS_OP_MASK));
SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK));
return (op << (PAINTOPS_FLAG_BITS + PAINTOPS_DATA_BITS)) | data;
}
-static uint32_t PaintOp_packOpFlagData(PaintOps op, unsigned flags, unsigned data) {
+static inline uint32_t PaintOp_packOpFlagData(PaintOps op, unsigned flags, unsigned data) {
SkASSERT(0 == (op & ~PAINTOPS_OP_MASK));
SkASSERT(0 == (flags & ~PAINTOPS_FLAG_MASK));
SkASSERT(0 == (data & ~PAINTOPS_DATA_MASK));