Index: src/core/SkMallocPixelRef.cpp |
diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp |
index c3e605c358748b56cee33af1fb50b0c4f8ee6f19..c86d33bf18fb49044626bb8fee6e0d8934654d4e 100644 |
--- a/src/core/SkMallocPixelRef.cpp |
+++ b/src/core/SkMallocPixelRef.cpp |
@@ -152,7 +152,7 @@ SkMallocPixelRef::SkMallocPixelRef(const SkImageInfo& info, void* storage, |
fRB = rowBytes; |
SkSafeRef(ctable); |
- this->setPreLocked(fStorage, fCTable); |
+ this->setPreLocked(fStorage, fRB, fCTable); |
} |
SkMallocPixelRef::SkMallocPixelRef(const SkImageInfo& info, void* storage, |
@@ -174,8 +174,8 @@ SkMallocPixelRef::SkMallocPixelRef(const SkImageInfo& info, void* storage, |
fCTable = ctable; |
fRB = rowBytes; |
SkSafeRef(ctable); |
- |
- this->setPreLocked(fStorage, fCTable); |
+ |
+ this->setPreLocked(fStorage, fRB, fCTable); |
} |
@@ -186,9 +186,11 @@ SkMallocPixelRef::~SkMallocPixelRef() { |
} |
} |
-void* SkMallocPixelRef::onLockPixels(SkColorTable** ctable) { |
- *ctable = fCTable; |
- return fStorage; |
+bool SkMallocPixelRef::onNewLockPixels(LockRec* rec) { |
+ rec->fPixels = fStorage; |
+ rec->fRowBytes = fRB; |
+ rec->fColorTable = fCTable; |
+ return true; |
} |
void SkMallocPixelRef::onUnlockPixels() { |
@@ -234,5 +236,5 @@ SkMallocPixelRef::SkMallocPixelRef(SkFlattenableReadBuffer& buffer) |
fCTable = NULL; |
} |
- this->setPreLocked(fStorage, fCTable); |
+ this->setPreLocked(fStorage, fRB, fCTable); |
} |