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

Unified Diff: src/core/SkBitmap.cpp

Issue 1199473002: change old picture serialization to really handle images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix check in new_array function Created 5 years, 6 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/c/sk_surface.cpp ('k') | src/core/SkImageGeneratorPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index 49e2c04bfb9a20215e39538e231ec043e0595351..8f799125e4d10a9252c3690ad14ea24ab25a1cd8 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -1270,7 +1270,9 @@ bool SkBitmap::requestLock(SkAutoPixmapUnlock* result) const {
return false;
}
- SkPixelRef::LockRequest req = { fInfo.dimensions(), kNone_SkFilterQuality };
+ // We have to lock the whole thing (using the pixelref's dimensions) until the api supports
+ // a partial lock (with offset/origin). Hence we can't use our fInfo.
+ SkPixelRef::LockRequest req = { pr->info().dimensions(), kNone_SkFilterQuality };
SkPixelRef::LockResult res;
if (pr->requestLock(req, &res)) {
SkASSERT(res.fPixels);
« no previous file with comments | « src/c/sk_surface.cpp ('k') | src/core/SkImageGeneratorPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698