Index: src/images/SkImageRef_ashmem.cpp |
diff --git a/src/images/SkImageRef_ashmem.cpp b/src/images/SkImageRef_ashmem.cpp |
index 0186bf6a55f89f980cb1a7070308e35a5beedee1..0dba1d119140d4d89615e72926994c6a6a7afb1c 100644 |
--- a/src/images/SkImageRef_ashmem.cpp |
+++ b/src/images/SkImageRef_ashmem.cpp |
@@ -134,6 +134,9 @@ bool SkImageRef_ashmem::onDecode(SkImageDecoder* codec, SkStreamRewindable* stre |
return this->INHERITED::onDecode(codec, stream, bitmap, config, mode); |
} |
+ // Ashmem memory is guaranteed to be initialized to 0. |
+ codec->setSkipWritingZeroes(true); |
+ |
AshmemAllocator alloc(&fRec, this->getURI()); |
codec->setAllocator(&alloc); |