Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: src/core/SkWriteBuffer.cpp

Issue 295793002: stop calling SkBitmap::flatten (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkWriteBuffer.cpp
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp
index cca7d8170ac52684b94ae4bf846fe43419bb03c5..f2be41b266b612207bc1222e4291feafa96fb1d1 100644
--- a/src/core/SkWriteBuffer.cpp
+++ b/src/core/SkWriteBuffer.cpp
@@ -206,9 +206,8 @@ void SkWriteBuffer::writeBitmap(const SkBitmap& bitmap) {
}
}
- // Bitmap was not encoded. Record a zero, implying that the reader need not decode.
- this->writeUInt(0);
- bitmap.flatten(*this);
+ this->writeUInt(0); // signal raw pixels
+ SkBitmap::WriteRawPixels(this, bitmap);
}
void SkWriteBuffer::writeTypeface(SkTypeface* obj) {

Powered by Google App Engine
This is Rietveld 408576698