Revert "Revert "change SkColorTable to be immutable""

This reverts commit b8162cb840f4cb6002ef68d5ac775c6a122c52a9.

Fixed was call-sites in benches that used the (now gone) setIsOpaque api.

R=scroggo@google.com

Review URL: https://codereview.chromium.org/26572006

git-svn-id: http://skia.googlecode.com/svn/trunk@11695 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleDitherBitmap.cpp b/samplecode/SampleDitherBitmap.cpp
index df727c4..7f29305 100644
--- a/samplecode/SampleDitherBitmap.cpp
+++ b/samplecode/SampleDitherBitmap.cpp
@@ -54,14 +54,13 @@
 }
 
 static SkBitmap make_bitmap() {
-    SkBitmap bm;
-    SkColorTable* ctable = new SkColorTable(256);
-
-    SkPMColor* c = ctable->lockColors();
+    SkPMColor c[256];
     for (int i = 0; i < 256; i++) {
         c[i] = SkPackARGB32(0xFF, i, 0, 0);
     }
-    ctable->unlockColors(true);
+    SkColorTable* ctable = new SkColorTable(c, 256, kOpaque_SkAlphaType);
+
+    SkBitmap bm;
     bm.setConfig(SkBitmap::kIndex8_Config, 256, 32);
     bm.allocPixels(ctable);
     ctable->unref();
@@ -102,10 +101,14 @@
     static void setBitmapOpaque(SkBitmap* bm, bool isOpaque) {
         SkAutoLockPixels alp(*bm);  // needed for ctable
         bm->setIsOpaque(isOpaque);
+#if 0
         SkColorTable* ctable = bm->getColorTable();
         if (ctable) {
-            ctable->setIsOpaque(isOpaque);
+            if (ctable->isOpaque() != isOpaque) {
+                // how do we change a colortable? don't want to
+            }
         }
+#endif
     }
 
     static void draw2(SkCanvas* canvas, const SkBitmap& bm) {