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

Unified Diff: tools/picture_utils.cpp

Issue 1018953003: Add SkEncodedFormat, used by SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use a common enum for SkImageEncoder and SkImageDecoder and SkCodec Created 5 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
Index: tools/picture_utils.cpp
diff --git a/tools/picture_utils.cpp b/tools/picture_utils.cpp
index 5c120b010d98ca56ebd7fe079eb01c0740190f36..142430ed897f300dfee9e8fef6b7c8673a661340 100644
--- a/tools/picture_utils.cpp
+++ b/tools/picture_utils.cpp
@@ -8,6 +8,7 @@
#include "picture_utils.h"
#include "SkBitmap.h"
#include "SkColorPriv.h"
+#include "SkEncodedFormat.h"
#include "SkImageEncoder.h"
#include "SkOSFile.h"
#include "SkPicture.h"
@@ -61,7 +62,7 @@ namespace sk_tools {
partialPath.set(dirPath);
}
SkString fullPath = SkOSPath::Join(partialPath.c_str(), baseName.c_str());
- if (SkImageEncoder::EncodeFile(fullPath.c_str(), bm, SkImageEncoder::kPNG_Type, 100)) {
+ if (SkImageEncoder::EncodeFile(fullPath.c_str(), bm, kPNG_SkEncodedFormat, 100)) {
return true;
} else {
SkDebugf("Failed to write the bitmap to %s.\n", fullPath.c_str());

Powered by Google App Engine
This is Rietveld 408576698