Fix crash in bench when "--mode record" is used

R=mtklein@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/150633008

git-svn-id: http://skia.googlecode.com/svn/trunk@13310 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-02-04 19:32:37 +00:00
parent ea6e14a382
commit 0f53122f89

View File

@ -603,7 +603,7 @@ int tool_main(int argc, char** argv) {
if ((benchMode == kRecord_BenchMode || benchMode == kPictureRecord_BenchMode)) {
// Clear the recorded commands so that they do not accumulate.
canvas.reset(recordTo.beginRecording(dim.fX, dim.fY, kRecordFlags));
canvas.reset(SkRef(recordTo.beginRecording(dim.fX, dim.fY, kRecordFlags)));
}
timer.start();