aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bench_playback.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-11 19:06:46 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-11 19:06:46 +0000
commitd6489c957f5e41db1b438de44411278f00300cce (patch)
treef20ad64c0d8783517a312b30501f2afc14fe64c1 /tools/bench_playback.cpp
parentc3c67dfc73519910f173bd7b4da01b8583040096 (diff)
use the correct rowBytes so Debug build doesn't assert
BUG=skia:2378 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/235453002 git-svn-id: http://skia.googlecode.com/svn/trunk@14163 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/bench_playback.cpp')
-rw-r--r--tools/bench_playback.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/bench_playback.cpp b/tools/bench_playback.cpp
index 198e1f058b..b5dc57bd1d 100644
--- a/tools/bench_playback.cpp
+++ b/tools/bench_playback.cpp
@@ -28,8 +28,10 @@ static void bench(SkPMColor* scratch, SkPicture& src, const char* name) {
SkRecorder recorder(SkRecorder::kWriteOnly_Mode, &record, src.width(), src.height());
src.draw(&recorder);
- SkAutoTDelete<SkCanvas> canvas(
- SkCanvas::NewRasterDirectN32(src.width(), src.height(), scratch, 0));
+ SkAutoTDelete<SkCanvas> canvas(SkCanvas::NewRasterDirectN32(src.width(),
+ src.height(),
+ scratch,
+ src.width() * sizeof(SkPMColor)));
canvas->clipRect(SkRect::MakeWH(SkIntToScalar(FLAGS_tile), SkIntToScalar(FLAGS_tile)));
const SkMSec start = SkTime::GetMSecs();