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

Unified Diff: src/core/SkPixelRef.cpp

Issue 110843006: Initialize SkPixelRef::fInfo. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Add note to make const. Created 7 years 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
« no previous file with comments | « include/core/SkPixelRef.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixelRef.cpp
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index b5daf0b57a90ca0321babf11c37da2eef05fab93..e93882a465ddd0cc2702df8c553d56648d3504cb 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -82,8 +82,9 @@ void SkPixelRef::setMutex(SkBaseMutex* mutex) {
// just need a > 0 value, so pick a funny one to aid in debugging
#define SKPIXELREF_PRELOCKED_LOCKCOUNT 123456789
-SkPixelRef::SkPixelRef(const SkImageInfo&, SkBaseMutex* mutex) {
+SkPixelRef::SkPixelRef(const SkImageInfo& info, SkBaseMutex* mutex) {
this->setMutex(mutex);
+ fInfo = info;
fPixels = NULL;
fColorTable = NULL; // we do not track ownership of this
fLockCount = 0;
@@ -92,8 +93,9 @@ SkPixelRef::SkPixelRef(const SkImageInfo&, SkBaseMutex* mutex) {
fPreLocked = false;
}
-SkPixelRef::SkPixelRef(const SkImageInfo&) {
+SkPixelRef::SkPixelRef(const SkImageInfo& info) {
this->setMutex(NULL);
+ fInfo = info;
fPixels = NULL;
fColorTable = NULL; // we do not track ownership of this
fLockCount = 0;
@@ -106,6 +108,8 @@ SkPixelRef::SkPixelRef(const SkImageInfo&) {
// THIS GUY IS DEPRECATED -- don't use me!
SkPixelRef::SkPixelRef(SkBaseMutex* mutex) {
this->setMutex(mutex);
+ // Fill with dummy values.
+ sk_bzero(&fInfo, sizeof(fInfo));
fPixels = NULL;
fColorTable = NULL; // we do not track ownership of this
fLockCount = 0;
« no previous file with comments | « include/core/SkPixelRef.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698