aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RecordingTest.cpp
blob: 7d1dbf1a449bdb6d71b93702d74728c7089eb095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright 2014 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "Test.h"

#include "SkRecording.h"

// Minimally exercise the public SkRecording API.

DEF_TEST(RecordingTest, r) {
    EXPERIMENTAL::SkRecording* recording = EXPERIMENTAL::SkRecording::Create(1920, 1080);

    // Some very exciting commands here.
    recording->canvas()->clipRect(SkRect::MakeWH(320, 240));

    SkAutoTDelete<const EXPERIMENTAL::SkPlayback> playback(
        EXPERIMENTAL::SkRecording::Delete(recording));

    SkCanvas target;
    playback->draw(&target);
}