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

Unified Diff: include/core/SkPixelRef.h

Issue 1155403003: add asserts around results from requestLock (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/core/SkPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPixelRef.h
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 7c3156ee743339a0c5ec32f3da06eaf278cb95c8..3898269ef458e16440ae09006ceb34fbe199f16f 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -75,6 +75,8 @@ public:
* Calling lockPixels returns a LockRec struct (on success).
*/
struct LockRec {
+ LockRec() : fPixels(NULL), fColorTable(NULL) {}
+
void* fPixels;
SkColorTable* fColorTable;
size_t fRowBytes;
@@ -199,11 +201,13 @@ public:
};
struct LockResult {
+ LockResult() : fPixels(NULL), fCTable(NULL) {}
+
void (*fUnlockProc)(void* ctx);
void* fUnlockContext;
- SkColorTable* fCTable; // should be NULL unless colortype is kIndex8
const void* fPixels;
+ SkColorTable* fCTable; // should be NULL unless colortype is kIndex8
size_t fRowBytes;
SkISize fSize;
@@ -345,7 +349,7 @@ private:
LockRec fRec;
int fLockCount;
- bool lockPixelsInsideMutex(LockRec* rec);
+ bool lockPixelsInsideMutex();
// Bottom bit indicates the Gen ID is unique.
bool genIDIsUnique() const { return SkToBool(fTaggedGenID.load() & 1); }
« no previous file with comments | « no previous file | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698