Index: src/animator/SkSnapshot.cpp |
diff --git a/src/animator/SkSnapshot.cpp b/src/animator/SkSnapshot.cpp |
index 6f818a627d7e19f364c8c84d0229705ec50a6721..b61d602047a67811d15c0d62a987d750bee13e45 100644 |
--- a/src/animator/SkSnapshot.cpp |
+++ b/src/animator/SkSnapshot.cpp |
@@ -60,8 +60,10 @@ bool SkSnapshot::draw(SkAnimateMaker& maker) { |
name.append(".jpg"); |
else if (type == SkImageEncoder::kPNG_Type) |
name.append(".png"); |
- encoder->encodeFile(name.c_str(), |
- maker.fCanvas->getDevice()->accessBitmap(false), |
- SkScalarFloorToInt(quality)); |
+ |
+ SkBitmap pixels; |
+ pixels.allocPixels(maker.fCanvas->imageInfo()); |
+ maker.fCanvas->readPixels(&pixels, 0, 0); |
+ encoder->encodeFile(name.c_str(), pixels, SkScalarFloorToInt(quality)); |
return false; |
} |