Make castv2 performance test work.
[chromium-blink-merge.git] / ppapi / tests / test_compositor.h
blob6287e6dcd97c1aa5d25f5c9e138fd57d65e15709
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef PAPPI_TESTS_TEST_COMPOSITOR_H_
6 #define PAPPI_TESTS_TEST_COMPOSITOR_H_
8 #include <set>
9 #include <string>
11 #include "ppapi/cpp/compositor.h"
12 #include "ppapi/cpp/compositor_layer.h"
13 #include "ppapi/cpp/graphics_3d.h"
14 #include "ppapi/lib/gl/include/GLES2/gl2.h"
15 #include "ppapi/tests/test_case.h"
17 class TestCompositor : public TestCase {
18 public:
19 TestCompositor(TestingInstance* instance) : TestCase(instance) {}
21 // TestCase implementation.
22 virtual bool Init();
23 virtual void RunTests(const std::string& filter);
25 private:
26 // Various tests.
27 std::string TestRelease();
28 std::string TestReleaseWithoutCommit();
29 std::string TestCommitTwoTimesWithoutChange();
30 std::string TestGeneral();
32 std::string TestReleaseUnbound();
33 std::string TestReleaseWithoutCommitUnbound();
34 std::string TestCommitTwoTimesWithoutChangeUnbound();
35 std::string TestGeneralUnbound();
37 std::string TestBindUnbind();
39 std::string TestReleaseInternal(bool bind);
40 std::string TestReleaseWithoutCommitInternal(bool bind);
41 std::string TestCommitTwoTimesWithoutChangeInternal(bool bind);
42 std::string TestGeneralInternal(bool bind);
44 // Helper functions
45 std::string CreateTexture(uint32_t* texture);
46 std::string ReleaseTexture(uint32_t texture);
47 std::string CreateImage(pp::ImageData* image);
48 std::string SetColorLayer(pp::CompositorLayer layer, int32_t result);
52 #endif // PAPPI_TESTS_TEST_COMPOSItor_H_