Remove kImageIsImmutable_Flag.

This flag was only used when setting or checking SkBitmap's
immutability when it did not have an SkPixelRef. Now that an
SkBitmap *must* have one in order to draw (e.g. you can no
longer have an SkBitmap that owns its pixels directly), its
immutabity without an SkPixelRef makes no sense.

Also, now that the flags are not contiguous starting from
0x01, use a more appropriate check to ensure only meaningful
flags are used.

R=reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/387083002
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index c95accb..0e847f2 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -726,7 +726,6 @@
 
     enum Flags {
         kImageIsVolatile_Flag   = 0x02,
-        kImageIsImmutable_Flag  = 0x04,
 #ifdef SK_BUILD_FOR_ANDROID
         /* A hint for the renderer responsible for drawing this bitmap
          * indicating that it should attempt to use mipmaps when this bitmap
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 1d68aee..e675db2 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -486,15 +486,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 bool SkBitmap::isImmutable() const {
-    return fPixelRef ? fPixelRef->isImmutable() :
-        fFlags & kImageIsImmutable_Flag;
+    return fPixelRef ? fPixelRef->isImmutable() : false;
 }
 
 void SkBitmap::setImmutable() {
     if (fPixelRef) {
         fPixelRef->setImmutable();
-    } else {
-        fFlags |= kImageIsImmutable_Flag;
     }
 }
 
@@ -1332,11 +1329,11 @@
     }
 
     SkASSERT(fInfo.validRowBytes(fRowBytes));
-    uint8_t allFlags = kImageIsVolatile_Flag | kImageIsImmutable_Flag;
+    uint8_t allFlags = kImageIsVolatile_Flag;
 #ifdef SK_BUILD_FOR_ANDROID
     allFlags |= kHasHardwareMipMap_Flag;
 #endif
-    SkASSERT(fFlags <= allFlags);
+    SkASSERT((~allFlags & fFlags) == 0);
     SkASSERT(fPixelLockCount >= 0);
 
     if (fPixels) {