aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRemote_protocol.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-10-21 10:46:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-21 10:46:02 -0700
commitb6b8f2727f6b08bbc307aeebac23beeba1e4984f (patch)
tree99bd4ea9af4e0a206b6f84c1baf2036d3e217526 /src/core/SkRemote_protocol.h
parent0d3f061262a53b775f0a92b0abf8a4a846290d65 (diff)
SkRemote: refactoring
- Cache becomes CachingEncoder that wraps another Encoder - Encoders provide IDs - syntaxy improvements to Client - ID isn't really protocol sensitive. - I don't think we need Type::kNone. No diffs. https://gold.skia.org/search2?issue=1418863002&unt=true&query=source_type%3Dgm&master=false&include=true BUG=skia: Review URL: https://codereview.chromium.org/1418863002
Diffstat (limited to 'src/core/SkRemote_protocol.h')
-rw-r--r--src/core/SkRemote_protocol.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/core/SkRemote_protocol.h b/src/core/SkRemote_protocol.h
index d34a4b6c4b..b89d491379 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