|
|
@ -66,6 +66,10 @@ public class ObjectToPack extends PackedObjectInfo { |
|
|
|
|
|
|
|
|
|
|
|
private static final int EDGE = 1 << 3; |
|
|
|
private static final int EDGE = 1 << 3; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int DELTA_ATTEMPTED = 1 << 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int ATTEMPT_DELTA_MASK = REUSE_AS_IS | DELTA_ATTEMPTED; |
|
|
|
|
|
|
|
|
|
|
|
private static final int TYPE_SHIFT = 5; |
|
|
|
private static final int TYPE_SHIFT = 5; |
|
|
|
|
|
|
|
|
|
|
|
private static final int EXT_SHIFT = 8; |
|
|
|
private static final int EXT_SHIFT = 8; |
|
|
@ -88,7 +92,7 @@ public class ObjectToPack extends PackedObjectInfo { |
|
|
|
* <li>1 bit: canReuseAsIs</li> |
|
|
|
* <li>1 bit: canReuseAsIs</li> |
|
|
|
* <li>1 bit: doNotDelta</li> |
|
|
|
* <li>1 bit: doNotDelta</li> |
|
|
|
* <li>1 bit: edgeObject</li> |
|
|
|
* <li>1 bit: edgeObject</li> |
|
|
|
* <li>1 bit: unused</li> |
|
|
|
* <li>1 bit: deltaAttempted</li> |
|
|
|
* <li>3 bits: type</li> |
|
|
|
* <li>3 bits: type</li> |
|
|
|
* <li>4 bits: subclass flags (if any)</li> |
|
|
|
* <li>4 bits: subclass flags (if any)</li> |
|
|
|
* <li>--</li> |
|
|
|
* <li>--</li> |
|
|
@ -265,6 +269,22 @@ public class ObjectToPack extends PackedObjectInfo { |
|
|
|
flags |= EDGE; |
|
|
|
flags |= EDGE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean doNotAttemptDelta() { |
|
|
|
|
|
|
|
// Do not attempt if delta attempted and object reuse.
|
|
|
|
|
|
|
|
return (flags & ATTEMPT_DELTA_MASK) == ATTEMPT_DELTA_MASK; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean isDeltaAttempted() { |
|
|
|
|
|
|
|
return (flags & DELTA_ATTEMPTED) != 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void setDeltaAttempted(boolean deltaAttempted) { |
|
|
|
|
|
|
|
if (deltaAttempted) |
|
|
|
|
|
|
|
flags |= DELTA_ATTEMPTED; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
flags &= ~DELTA_ATTEMPTED; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** @return the extended flags on this object, in the range [0x0, 0xf]. */ |
|
|
|
/** @return the extended flags on this object, in the range [0x0, 0xf]. */ |
|
|
|
protected int getExtendedFlags() { |
|
|
|
protected int getExtendedFlags() { |
|
|
|
return (flags >>> EXT_SHIFT) & EXT_MASK; |
|
|
|
return (flags >>> EXT_SHIFT) & EXT_MASK; |
|
|
|