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

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
« no previous file with comments | « bench/subset/SubsetSingleBench.cpp ('k') | bench/subset/SubsetZoomBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/subset/SubsetTranslateBench.cpp
diff --git a/bench/subset/SubsetTranslateBench.cpp b/bench/subset/SubsetTranslateBench.cpp
index 620b6f4903b8da291ee0c8eb34809385825fb188..076901515ccf27bb7234e82972f78b3ec53303b6 100644
--- a/bench/subset/SubsetTranslateBench.cpp
+++ b/bench/subset/SubsetTranslateBench.cpp
@@ -68,7 +68,8 @@ 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));
+ SkImageInfo subsetInfo = info.makeWH(fSubsetWidth, fSubsetHeight);
+ alloc_pixels(&bitmap, subsetInfo, colors, colorCount);
for (int x = 0; x < info.width(); x += fSubsetWidth) {
for (int y = 0; y < info.height(); y += fSubsetHeight) {
« no previous file with comments | « bench/subset/SubsetSingleBench.cpp ('k') | bench/subset/SubsetZoomBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698