diff options
author | 2015-05-29 15:46:36 -0700 | |
---|---|---|
committer | 2015-05-29 15:46:36 -0700 | |
commit | 6980f5a96455c8062403c995a64b654a0e9a1319 (patch) | |
tree | fc25729404587d686e21c43d83578933cef52db7 /include | |
parent | 3953d360417655b8000df0951699121383db45c3 (diff) |
add asserts around results from requestLock (patchset #3 id:40001 of https://codereview.chromium.org/1155403003/)"
This reverts commit 3953d360417655b8000df0951699121383db45c3.
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1165583005
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkPixelRef.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h index 7c3156ee74..3898269ef4 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); } |