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

Unified Diff: src/core/SkMallocPixelRef.cpp

Issue 119753009: Revert of Add onNewLockPixels, that returns rowbytes and relies on info in pixelref (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 12 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 | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMallocPixelRef.cpp
diff --git a/src/core/SkMallocPixelRef.cpp b/src/core/SkMallocPixelRef.cpp
index c86d33bf18fb49044626bb8fee6e0d8934654d4e..c3e605c358748b56cee33af1fb50b0c4f8ee6f19 100644
--- a/src/core/SkMallocPixelRef.cpp
+++ b/src/core/SkMallocPixelRef.cpp
@@ -152,7 +152,7 @@
fRB = rowBytes;
SkSafeRef(ctable);
- this->setPreLocked(fStorage, fRB, fCTable);
+ this->setPreLocked(fStorage, fCTable);
}
SkMallocPixelRef::SkMallocPixelRef(const SkImageInfo& info, void* storage,
@@ -174,8 +174,8 @@
fCTable = ctable;
fRB = rowBytes;
SkSafeRef(ctable);
-
- this->setPreLocked(fStorage, fRB, fCTable);
+
+ this->setPreLocked(fStorage, fCTable);
}
@@ -186,11 +186,9 @@
}
}
-bool SkMallocPixelRef::onNewLockPixels(LockRec* rec) {
- rec->fPixels = fStorage;
- rec->fRowBytes = fRB;
- rec->fColorTable = fCTable;
- return true;
+void* SkMallocPixelRef::onLockPixels(SkColorTable** ctable) {
+ *ctable = fCTable;
+ return fStorage;
}
void SkMallocPixelRef::onUnlockPixels() {
@@ -236,5 +234,5 @@
fCTable = NULL;
}
- this->setPreLocked(fStorage, fRB, fCTable);
-}
+ this->setPreLocked(fStorage, fCTable);
+}
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698