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

Unified Diff: tools/bench_playback.cpp

Issue 235453002: use the correct rowBytes so Debug build doesn't assert (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_playback.cpp
diff --git a/tools/bench_playback.cpp b/tools/bench_playback.cpp
index 198e1f058b91a5461cf18323743dcc8c517bc44e..b5dc57bd1d78679325daf6a11fe31efb12915612 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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698