aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/pipe')
-rw-r--r--src/pipe/SkGPipeRead.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
index b48389abea..fa746bf2e9 100644
--- a/src/pipe/SkGPipeRead.cpp
+++ b/src/pipe/SkGPipeRead.cpp
@@ -84,6 +84,10 @@ public:
~SkRefCntTDArray() { this->unrefAll(); }
};
+static inline uint32_t set_clear_mask(uint32_t bits, bool cond, uint32_t mask) {
+ return cond ? bits | mask : bits & ~mask;
+}
+
class SkGPipeState : public SkBitmapHeapReader {
public:
SkGPipeState();
@@ -213,7 +217,7 @@ private:
return;
}
bool crossProcess = SkToBool(fFlags & SkGPipeWriter::kCrossProcess_Flag);
- fReader->setFlags(SkSetClearMask(fReader->getFlags(), crossProcess,
+ fReader->setFlags(set_clear_mask(fReader->getFlags(), crossProcess,
SkReadBuffer::kCrossProcess_Flag));
if (crossProcess) {
fReader->setFactoryArray(&fFactoryArray);