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

Unified Diff: src/core/SkRemote_protocol.h

Issue 1418863002: SkRemote: refactoring (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ID is not protocol sensitive Created 5 years, 2 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 | « src/core/SkRemote.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRemote_protocol.h
diff --git a/src/core/SkRemote_protocol.h b/src/core/SkRemote_protocol.h
index d34a4b6c4b0cfbae49430cca81b6f0e29991ba90..b89d491379dcfb618aba854f2fbef46489b8c822 100644
--- a/src/core/SkRemote_protocol.h
+++ b/src/core/SkRemote_protocol.h
@@ -15,8 +15,6 @@ namespace SkRemote {
// It is safe to append to this enum without breaking protocol compatibility.
// Resorting, deleting, or inserting anywhere but the end will break compatibility.
enum class Type : uint8_t {
- kNone,
-
kMatrix,
kMisc,
kPath,
@@ -25,30 +23,6 @@ namespace SkRemote {
kXfermode,
};
- class ID {
- public:
- explicit ID(Type type = Type::kNone) : fVal((uint64_t)type << 56) {}
- ID(Type type, uint64_t val) {
- fVal = (uint64_t)type << 56 | val;
- SkASSERT(this->type() == type && this->val() == val);
- }
-
- Type type() const { return (Type)(fVal >> 56); }
- uint64_t val() const { return fVal & ~((uint64_t)0xFF << 56); }
-
- bool operator==(ID o) const { return fVal == o.fVal; }
- ID operator++() {
- ++fVal;
- SkASSERT(this->val() != 0); // Overflow is particularly bad as it'd change our Type.
- return *this;
- }
-
- private:
- // High 8 bits hold a Type. Low 56 bits are unique within that Type.
- // Any change to this format will break protocol compatibility.
- uint64_t fVal;
- };
-
} // namespace SkRemote
#endif//SkRemote_protocol_DEFINED
« no previous file with comments | « src/core/SkRemote.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698