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

Unified Diff: src/core/SkMaskFilter.cpp

Issue 68973005: Expand pixelref to return SkImageInfo and rowbytes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: new convention: require SkImageInfo in constructor Created 7 years 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
Index: src/core/SkMaskFilter.cpp
diff --git a/src/core/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp
index cd2571637749ac1f318ada65167ba7ab1aa0187e..e02b83b84f0f207e86b19df1a773255ab4b4d78b 100644
--- a/src/core/SkMaskFilter.cpp
+++ b/src/core/SkMaskFilter.cpp
@@ -351,10 +351,14 @@ bool SkMaskFilter::filterMaskGPU(GrContext* context,
if (!result) {
return false;
}
+ SkAutoUnref aur(dst);
+ SkImageInfo info;
resultBM->setConfig(srcBM.config(), dst->width(), dst->height());
- resultBM->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (dst)))->unref();
- dst->unref();
+ if (resultBM->asImageInfo(&info)) {
+ return false;
+ }
+ resultBM->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, dst)))->unref();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698