| OLD | NEW |
| 1 /* |
| 2 * Copyright 2014 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 1 #include "Test.h" | 8 #include "Test.h" |
| 2 | 9 |
| 3 #include "SkRecording.h" | 10 #include "SkRecording.h" |
| 4 | 11 |
| 5 // Minimally exercise the public SkRecording API. | 12 // Minimally exercise the public SkRecording API. |
| 6 | 13 |
| 7 DEF_TEST(RecordingTest, r) { | 14 DEF_TEST(RecordingTest, r) { |
| 8 EXPERIMENTAL::SkRecording* recording = EXPERIMENTAL::SkRecording::Create(192
0, 1080); | 15 EXPERIMENTAL::SkRecording* recording = EXPERIMENTAL::SkRecording::Create(192
0, 1080); |
| 9 | 16 |
| 10 // Some very exciting commands here. | 17 // Some very exciting commands here. |
| 11 recording->canvas()->clipRect(SkRect::MakeWH(320, 240)); | 18 recording->canvas()->clipRect(SkRect::MakeWH(320, 240)); |
| 12 | 19 |
| 13 SkAutoTDelete<const EXPERIMENTAL::SkPlayback> playback( | 20 SkAutoTDelete<const EXPERIMENTAL::SkPlayback> playback( |
| 14 EXPERIMENTAL::SkRecording::Delete(recording)); | 21 EXPERIMENTAL::SkRecording::Delete(recording)); |
| 15 | 22 |
| 16 SkCanvas target; | 23 SkCanvas target; |
| 17 playback->draw(&target); | 24 playback->draw(&target); |
| 18 } | 25 } |
| OLD | NEW |