OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "RecordingBench.h" | 8 #include "RecordingBench.h" |
9 | 9 |
10 #include "SkBBHFactory.h" | 10 #include "SkBBHFactory.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 SkScalarCeilToInt(fSrc->cullRect().height())); | 28 SkScalarCeilToInt(fSrc->cullRect().height())); |
29 } | 29 } |
30 | 30 |
31 void RecordingBench::onDraw(const int loops, SkCanvas*) { | 31 void RecordingBench::onDraw(const int loops, SkCanvas*) { |
32 SkRTreeFactory factory; | 32 SkRTreeFactory factory; |
33 const SkScalar w = fSrc->cullRect().width(), | 33 const SkScalar w = fSrc->cullRect().width(), |
34 h = fSrc->cullRect().height(); | 34 h = fSrc->cullRect().height(); |
35 | 35 |
36 for (int i = 0; i < loops; i++) { | 36 for (int i = 0; i < loops; i++) { |
37 SkPictureRecorder recorder; | 37 SkPictureRecorder recorder; |
38 fSrc->playback(recorder.beginRecording(w, h, fUseBBH ? &factory : NULL))
; | 38 fSrc->playback(recorder.beginRecording(w, h, fUseBBH ? &factory : NULL, |
| 39 SkPictureRecorder::kComputeSaveLa
yerInfo_RecordFlag)); |
39 SkDELETE(recorder.endRecording()); | 40 SkDELETE(recorder.endRecording()); |
40 } | 41 } |
41 } | 42 } |
OLD | NEW |