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

Unified Diff: bench/BitmapBench.cpp

Issue 345263005: add rowbytes option to allocPixels (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | include/core/SkBitmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BitmapBench.cpp
diff --git a/bench/BitmapBench.cpp b/bench/BitmapBench.cpp
index a269e906f6cdaf8f275c97dc57f502924bb7d643..e9ba1dcb918d1488575ee353f0933a1538936cac 100644
--- a/bench/BitmapBench.cpp
+++ b/bench/BitmapBench.cpp
@@ -107,12 +107,10 @@ protected:
SkBitmap bm;
if (kIndex_8_SkColorType == fColorType) {
- bm.setInfo(SkImageInfo::MakeN32(W, H, fAlphaType));
+ bm.allocPixels(SkImageInfo::MakeN32(W, H, fAlphaType));
} else {
- bm.setInfo(SkImageInfo::Make(W, H, fColorType, fAlphaType));
+ bm.allocPixels(SkImageInfo::Make(W, H, fColorType, fAlphaType));
}
-
- bm.allocPixels();
bm.eraseColor(kOpaque_SkAlphaType == fAlphaType ? SK_ColorBLACK : 0);
onDrawIntoBitmap(bm);
« no previous file with comments | « no previous file | include/core/SkBitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698