Index: src/gpu/GrSurface.cpp |
diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp |
index 0aa5f681ab2d1a07657e9814b77ff20b039d9766..c2163770912216c5170a209c00e02e1436d6012f 100644 |
--- a/src/gpu/GrSurface.cpp |
+++ b/src/gpu/GrSurface.cpp |
@@ -10,8 +10,6 @@ |
#include "SkBitmap.h" |
#include "SkGr.h" |
-#include "SkImageEncoder.h" |
-#include <stdio.h> |
bool GrSurface::writePixels(int left, int top, int width, int height, |
GrPixelConfig config, const void* buffer, size_t rowBytes, |
@@ -49,32 +47,6 @@ SkImageInfo GrSurface::info() const { |
return SkImageInfo::Make(this->width(), this->height(), colorType, kPremul_SkAlphaType); |
} |
-// TODO: This should probably be a non-member helper function. It might only be needed in |
-// debug or developer builds. |
-bool GrSurface::savePixels(const char* filename) { |
- SkBitmap bm; |
- if (!bm.tryAllocPixels(SkImageInfo::MakeN32Premul(this->width(), this->height()))) { |
- return false; |
- } |
- |
- bool result = this->readPixels(0, 0, this->width(), this->height(), kSkia8888_GrPixelConfig, |
- bm.getPixels()); |
- if (!result) { |
- SkDebugf("------ failed to read pixels for %s\n", filename); |
- return false; |
- } |
- |
- // remove any previous version of this file |
- remove(filename); |
- |
- if (!SkImageEncoder::EncodeFile(filename, bm, SkImageEncoder::kPNG_Type, 100)) { |
- SkDebugf("------ failed to encode %s\n", filename); |
- remove(filename); // remove any partial file |
- return false; |
- } |
- |
- return true; |
-} |
void GrSurface::flushWrites() { |
if (!this->wasDestroyed()) { |