Index: samplecode/SampleEncode.cpp |
diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp |
index 185208b35bd8bece2ddd4d4049594493e4dbbff4..fc7d60a40bb6a1a2b1123ebe871e3a871c338d47 100644 |
--- a/samplecode/SampleEncode.cpp |
+++ b/samplecode/SampleEncode.cpp |
@@ -9,6 +9,7 @@ |
#include "SkView.h" |
#include "SkCanvas.h" |
#include "SkData.h" |
+#include "SkEncodedFormat.h" |
#include "SkImageGenerator.h" |
#include "SkGradientShader.h" |
#include "SkGraphics.h" |
@@ -91,10 +92,10 @@ static const char* const gConfigLabels[] = { |
"8888", "565", "Index8", "Index8 alpha" |
}; |
-// types to encode into. Can be at most these 3. Must match up with gExt[] |
-static const SkImageEncoder::Type gTypes[] = { |
- SkImageEncoder::kJPEG_Type, |
- SkImageEncoder::kPNG_Type |
+// types to encode into. Can be at most these 2. Must match up with gExt[] |
+static const SkEncodedFormat gTypes[] = { |
+ kJPEG_SkEncodedFormat, |
+ kPNG_SkEncodedFormat, |
}; |
// must match up with gTypes[] |
@@ -133,9 +134,9 @@ public: |
__FILE__, __LINE__,gConfigLabels[i], gExt[j]); |
continue; |
} |
- if (SkImageEncoder::kJPEG_Type == gTypes[j]) { |
+ if (kJPEG_SkEncodedFormat == gTypes[j]) { |
fEncodedJPEGs[i].reset(data.detach()); |
- } else if (SkImageEncoder::kPNG_Type == gTypes[j]) { |
+ } else if (kPNG_SkEncodedFormat == gTypes[j]) { |
fEncodedPNGs[i].reset(data.detach()); |
} |
} |
@@ -187,9 +188,9 @@ protected: |
SkBitmap bm; |
SkData* encoded = NULL; |
- if (SkImageEncoder::kJPEG_Type == gTypes[j]) { |
+ if (kJPEG_SkEncodedFormat == gTypes[j]) { |
encoded = fEncodedJPEGs[i].get(); |
- } else if (SkImageEncoder::kPNG_Type == gTypes[j]) { |
+ } else if (kPNG_SkEncodedFormat == gTypes[j]) { |
encoded = fEncodedPNGs[i].get(); |
} |
if (encoded) { |