2 * Copyright 2014 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
10 #include "../include/record/SkRecording.h"
12 // Minimally exercise the public SkRecording API.
14 DEF_TEST(SkRecording, r) {
15 EXPERIMENTAL::SkRecording recording(1920, 1080);
17 // Some very exciting commands here.
18 recording.canvas()->clipRect(SkRect::MakeWH(320, 240));
20 SkAutoTDelete<const EXPERIMENTAL::SkPlayback> playback(recording.releasePlayback());
23 playback->draw(&target);
25 // Here's another recording we never call releasePlayback().
26 // However pointless, this should be safe.
27 EXPERIMENTAL::SkRecording pointless(1920, 1080);
28 pointless.canvas()->clipRect(SkRect::MakeWH(320, 240));