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

Unified Diff: src/images/SkImageRef_ashmem.cpp

Issue 123223007: Revert "Revert "Revert "Revert of https://codereview.chromium.org/110593003/""" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix compatibility mode for onLockPixels by pre-nulling colortable Created 6 years, 11 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/images/SkImageRef_ashmem.h ('k') | src/lazy/SkCachingPixelRef.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageRef_ashmem.cpp
diff --git a/src/images/SkImageRef_ashmem.cpp b/src/images/SkImageRef_ashmem.cpp
index 269199faf849a5427bdb2398e0d45a2fe4521a34..14dedf8bd3e7d502ab918a3cd16267a42503ba2a 100644
--- a/src/images/SkImageRef_ashmem.cpp
+++ b/src/images/SkImageRef_ashmem.cpp
@@ -159,7 +159,7 @@ bool SkImageRef_ashmem::onDecode(SkImageDecoder* codec, SkStreamRewindable* stre
}
}
-void* SkImageRef_ashmem::onLockPixels(SkColorTable** ct) {
+bool SkImageRef_ashmem::onNewLockPixels(LockRec* rec) {
SkASSERT(fBitmap.getPixels() == NULL);
SkASSERT(fBitmap.getColorTable() == NULL);
@@ -185,17 +185,13 @@ void* SkImageRef_ashmem::onLockPixels(SkColorTable** ct) {
#endif
} else {
SkDebugf("===== ashmem pin_region(%d) returned %d\n", fRec.fFD, pin);
- // return null result for failure
- if (ct) {
- *ct = NULL;
- }
- return NULL;
+ return false;
}
} else {
// no FD, will create an ashmem region in allocator
}
- return this->INHERITED::onLockPixels(ct);
+ return this->INHERITED::onNewLockPixels(rec);
}
void SkImageRef_ashmem::onUnlockPixels() {
« no previous file with comments | « src/images/SkImageRef_ashmem.h ('k') | src/lazy/SkCachingPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698