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

Unified Diff: src/pipe/SkGPipeRead.cpp

Issue 1548223002: remove cruft from SkTypes.h, including SkBool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | « src/core/SkPaint.cpp ('k') | src/utils/SkInterpolator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeRead.cpp
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp
index b48389abeac21194588f00680c0583080fa36236..fa746bf2e9682193d8b9e92c9ae46d5f90c05054 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);
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/utils/SkInterpolator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698