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

Unified Diff: bench/subset/SubsetTranslateBench.cpp

Issue 1213983003: Fix CodecSubset benches seg faults for kIndex8 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: bench/subset/SubsetTranslateBench.cpp
diff --git a/bench/subset/SubsetTranslateBench.cpp b/bench/subset/SubsetTranslateBench.cpp
index 620b6f4903b8da291ee0c8eb34809385825fb188..90abc05c1ea8908b5c70d685f45f552df54bff75 100644
--- a/bench/subset/SubsetTranslateBench.cpp
+++ b/bench/subset/SubsetTranslateBench.cpp
@@ -68,7 +68,7 @@ void SubsetTranslateBench::onDraw(const int n, SkCanvas* canvas) {
SkBitmap bitmap;
// Note that we use the same bitmap for all of the subsets.
// It might be larger than necessary for the end subsets.
- bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight));
+ alloc_pixels(bitmap, fColorType, fSubsetWidth, fSubsetHeight, colors, colorCount);
for (int x = 0; x < info.width(); x += fSubsetWidth) {
for (int y = 0; y < info.height(); y += fSubsetHeight) {

Powered by Google App Engine
This is Rietveld 408576698