TestScene.h revision 8160f20b0aca8c6595d4b385d673f59b6bcd16a4
1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef TESTS_TESTSCENE_H
17#define TESTS_TESTSCENE_H
18
19namespace android {
20namespace uirenderer {
21class RenderNode;
22
23#if HWUI_NEW_OPS
24class RecordingCanvas;
25typedef RecordingCanvas TestCanvas;
26#else
27class DisplayListCanvas;
28typedef DisplayListCanvas TestCanvas;
29#endif
30
31namespace test {
32
33class TestScene {
34public:
35    virtual ~TestScene() {}
36    virtual void createContent(int width, int height, TestCanvas& renderer) = 0;
37    virtual void doFrame(int frameNr) = 0;
38};
39
40} // namespace test
41} // namespace uirenderer
42} // namespace android
43
44#endif /* TESTS_TESTSCENE_H */
45