Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1386)

Unified Diff: samplecode/SampleApp.cpp

Issue 340533002: hide SkBitmap::Config entirely (behind a flag) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/SkGr.h ('k') | samplecode/SampleFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 35021cba9f643423bf314ae8e3efb844a5ffe9bd..eee379cf8bb15222f57cf5de636047134fc40874 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -44,6 +44,7 @@ class GrContext;
#include "SamplePipeControllers.h"
#include "OverView.h"
#include "TransitionView.h"
+#include "sk_tool_utils.h"
extern SampleView* CreateSamplePictFileView(const char filename[]);
@@ -2082,19 +2083,6 @@ void SampleWindow::loadView(SkView* view) {
this->updateTitle();
}
-static const char* gConfigNames[] = {
- "unknown config",
- "A8",
- "Index8",
- "565",
- "4444",
- "8888"
-};
-
-static const char* configToString(SkBitmap::Config c) {
- return gConfigNames[c];
-}
-
static const char* gDeviceTypePrefix[] = {
"raster: ",
"picture: ",
@@ -2130,7 +2118,7 @@ void SampleWindow::updateTitle() {
title.prepend(gDeviceTypePrefix[fDeviceType]);
title.prepend(" ");
- title.prepend(configToString(this->getBitmap().config()));
+ title.prepend(sk_tool_utils::colortype_name(this->getBitmap().colorType()));
if (fTilingMode != kNo_Tiling) {
title.prependf("<T: %s> ", gTilingInfo[fTilingMode].label);
« no previous file with comments | « include/gpu/SkGr.h ('k') | samplecode/SampleFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698