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

Unified Diff: src/images/SkImageRef_ashmem.cpp

Issue 105523008: Revert "Revert "Revert of https://codereview.chromium.org/110593003/"" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 14dedf8bd3e7d502ab918a3cd16267a42503ba2a..269199faf849a5427bdb2398e0d45a2fe4521a34 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
}
}
-bool SkImageRef_ashmem::onNewLockPixels(LockRec* rec) {
+void* SkImageRef_ashmem::onLockPixels(SkColorTable** ct) {
SkASSERT(fBitmap.getPixels() == NULL);
SkASSERT(fBitmap.getColorTable() == NULL);
@@ -185,13 +185,17 @@ bool SkImageRef_ashmem::onNewLockPixels(LockRec* rec) {
#endif
} else {
SkDebugf("===== ashmem pin_region(%d) returned %d\n", fRec.fFD, pin);
- return false;
+ // return null result for failure
+ if (ct) {
+ *ct = NULL;
+ }
+ return NULL;
}
} else {
// no FD, will create an ashmem region in allocator
}
- return this->INHERITED::onNewLockPixels(rec);
+ return this->INHERITED::onLockPixels(ct);
}
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