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

Unified Diff: tools/sk_tool_utils.cpp

Issue 199413013: add new readPixels with direct memory parameters (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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
« src/core/SkCanvas.cpp ('K') | « tools/sk_tool_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sk_tool_utils.cpp
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp
index 11973886949baf9542c9baa900bc7ad68bd88858..d13b0d81f8e2561fdd01cf1b0cae5d38a04f7b2f 100644
--- a/tools/sk_tool_utils.cpp
+++ b/tools/sk_tool_utils.cpp
@@ -2,6 +2,21 @@
namespace sk_tool_utils {
+const char* colortype_name(SkColorType ct) {
+ switch (ct) {
+ case kUnknown_SkColorType: return "Unknown";
+ case kAlpha_8_SkColorType: return "Alpha_8";
+ case kIndex_8_SkColorType: return "Index_8";
+ case kARGB_4444_SkColorType: return "ARGB_4444";
+ case kRGB_565_SkColorType: return "RGB_565";
+ case kRGBA_8888_SkColorType: return "RGBA_8888";
+ case kBGRA_8888_SkColorType: return "BGRA_8888";
+ default:
+ SkASSERT(false);
+ return "unexpected colortype";
+ }
+}
+
void config8888_to_imagetypes(SkCanvas::Config8888 config, SkColorType* ct, SkAlphaType* at) {
switch (config) {
case SkCanvas::kNative_Premul_Config8888:
« src/core/SkCanvas.cpp ('K') | « tools/sk_tool_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698