hide SkBitmap::Config entirely (behind a flag)
patch from issue 339463002
TBR=
I think the NoGPU failure is unrelated, so ignoring
NOTRY=True
Author: reed@google.com
Review URL: https://codereview.chromium.org/340533002
diff --git a/gm/bitmapfilters.cpp b/gm/bitmapfilters.cpp
index 37d49c3..eaaa11a 100644
--- a/gm/bitmapfilters.cpp
+++ b/gm/bitmapfilters.cpp
@@ -1,11 +1,12 @@
-
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
#include "gm.h"
+#include "sk_tool_utils.h"
namespace skiagm {
@@ -46,15 +47,6 @@
return x + draw_bm(c, bm, x, 0, p);
}
-static const char* gConfigNames[] = {
- "unknown config",
- "A8",
- "Index8",
- "565",
- "4444",
- "8888"
-};
-
static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) {
SkAutoCanvasRestore acr(canvas, true);
@@ -63,7 +55,7 @@
const int scale = 32;
paint.setAntiAlias(true);
- const char* name = gConfigNames[bm.config()];
+ const char* name = sk_tool_utils::colortype_name(bm.colorType());
canvas->drawText(name, strlen(name), x, SkIntToScalar(bm.height())*scale*5/8,
paint);
canvas->translate(SkIntToScalar(48), 0);