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

Unified Diff: src/core/SkBitmap.cpp

Issue 2000713003: Add SkColorSpace to SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@public
Patch Set: Created 4 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/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 3bb763b4f43cf65f7117dbcdb79cbe8f444b79bb..f9deb837fad634a3ecd2697a3add42d240ff1644 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -53,6 +53,7 @@ SkBitmap& SkBitmap::operator=(const SkBitmap& src) {
// inc src reference counts
SkSafeRef(src.fPixelRef);
+ SkSafeRef(src.fInfo.colorSpace());
// we reset our locks if we get blown away
fPixelLockCount = 0;
@@ -97,6 +98,7 @@ void SkBitmap::swap(SkBitmap& other) {
void SkBitmap::reset() {
this->freePixels();
+ this->fInfo.reset();
sk_bzero(this, sizeof(*this));
}

Powered by Google App Engine
This is Rietveld 408576698