| Index: src/gpu/GrSurface.cpp
|
| diff --git a/src/gpu/GrSurface.cpp b/src/gpu/GrSurface.cpp
|
| index 1fcc4ff18be23eeb51dc843489a32c00dfbbf685..66ebe3b1e197226f73e3c9d07bdf01ff85cf0e35 100644
|
| --- a/src/gpu/GrSurface.cpp
|
| +++ b/src/gpu/GrSurface.cpp
|
| @@ -23,8 +23,10 @@ void GrSurface::asImageInfo(SkImageInfo* info) const {
|
|
|
| bool GrSurface::savePixels(const char* filename) {
|
| SkBitmap bm;
|
| - bm.setConfig(SkBitmap::kARGB_8888_Config, this->width(), this->height());
|
| - bm.allocPixels();
|
| + if (!bm.allocPixels(SkImageInfo::MakeN32Premul(this->width(),
|
| + this->height()))) {
|
| + return false;
|
| + }
|
|
|
| bool result = readPixels(0, 0, this->width(), this->height(), kSkia8888_GrPixelConfig,
|
| bm.getPixels());
|
|
|