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

Unified Diff: samplecode/SamplePicture.cpp

Issue 68973005: Expand pixelref to return SkImageInfo and rowbytes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: undo mod to GpuBitmapCopy test, and change bitmapdevice to not ask for alloc w/ kNo_Config 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
« no previous file with comments | « include/images/SkImageRef_GlobalPool.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePicture.cpp
diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp
index 66289affe0992219b6466051e622061aff94ce64..2f7d691d17af7b18aa64d556e59ffd9560b3982e 100644
--- a/samplecode/SamplePicture.cpp
+++ b/samplecode/SamplePicture.cpp
@@ -40,7 +40,9 @@ static SkBitmap load_bitmap() {
if (SkImageDecoder::DecodeStream(stream, &bm, SkBitmap::kNo_Config,
SkImageDecoder::kDecodeBounds_Mode)) {
- SkPixelRef* pr = new SkImageRef_GlobalPool(stream, bm.config(), 1);
+ SkImageInfo info;
+ bm.asImageInfo(&info);
+ SkPixelRef* pr = new SkImageRef_GlobalPool(info, stream, 1);
bm.setPixelRef(pr)->unref();
}
}
« no previous file with comments | « include/images/SkImageRef_GlobalPool.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698