1e5c31af7Sopenharmony_ci/*
2e5c31af7Sopenharmony_ci * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
3e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License.
5e5c31af7Sopenharmony_ci * You may obtain a copy of the License at
6e5c31af7Sopenharmony_ci *
7e5c31af7Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8e5c31af7Sopenharmony_ci *
9e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and
13e5c31af7Sopenharmony_ci * limitations under the License.
14e5c31af7Sopenharmony_ci */
15e5c31af7Sopenharmony_ci#ifndef _TCUOHOSROSENNATIVECONTEXT_HPP
16e5c31af7Sopenharmony_ci#define _TCUOHOSROSENNATIVECONTEXT_HPP
17e5c31af7Sopenharmony_ci
18e5c31af7Sopenharmony_ci#include "egluGLContextFactory.hpp"
19e5c31af7Sopenharmony_ci#include "eglwLibrary.hpp"
20e5c31af7Sopenharmony_ci#include "eglwFunctions.hpp"
21e5c31af7Sopenharmony_ci#include "eglwEnums.hpp"
22e5c31af7Sopenharmony_ci#include "deUniquePtr.hpp"
23e5c31af7Sopenharmony_ci#include "glwFunctions.hpp"
24e5c31af7Sopenharmony_ci#include "tcuRenderTarget.hpp"
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_ci#include "display/tcuOhosNativeDisplay.hpp"
27e5c31af7Sopenharmony_ci
28e5c31af7Sopenharmony_cinamespace tcu
29e5c31af7Sopenharmony_ci{
30e5c31af7Sopenharmony_cinamespace OHOS_ROSEN
31e5c31af7Sopenharmony_ci{
32e5c31af7Sopenharmony_cinamespace egl
33e5c31af7Sopenharmony_ci{
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ciusing std::string;
36e5c31af7Sopenharmony_ciusing de::MovePtr;
37e5c31af7Sopenharmony_ciusing de::UniquePtr;
38e5c31af7Sopenharmony_ciusing glu::ContextFactory;
39e5c31af7Sopenharmony_ciusing glu::RenderContext;
40e5c31af7Sopenharmony_ciusing eglu::GLContextFactory;
41e5c31af7Sopenharmony_ciusing eglu::NativeDisplay;
42e5c31af7Sopenharmony_ciusing eglu::NativeDisplayFactory;
43e5c31af7Sopenharmony_ciusing eglu::NativeWindow;
44e5c31af7Sopenharmony_ciusing eglu::NativeWindowFactory;
45e5c31af7Sopenharmony_ciusing eglu::NativePixmap;
46e5c31af7Sopenharmony_ciusing eglu::NativePixmapFactory;
47e5c31af7Sopenharmony_ciusing eglu::WindowParams;
48e5c31af7Sopenharmony_ciusing tcu::TextureLevel;
49e5c31af7Sopenharmony_ci
50e5c31af7Sopenharmony_ciclass OhosRendContext : public RenderContext
51e5c31af7Sopenharmony_ci{
52e5c31af7Sopenharmony_cipublic:
53e5c31af7Sopenharmony_ci    OhosRendContext(const glu::RenderConfig& config, const tcu::CommandLine& cmdLine);
54e5c31af7Sopenharmony_ci    virtual ~OhosRendContext(void);
55e5c31af7Sopenharmony_ci
56e5c31af7Sopenharmony_ci    glu::ContextType getType(void) const    { return m_contextType; }
57e5c31af7Sopenharmony_ci    const glw::Functions&        getFunctions    (void) const    { return m_glFunctions; }
58e5c31af7Sopenharmony_ci    const tcu::RenderTarget&    getRenderTarget    (void) const { return m_renderTarget; }
59e5c31af7Sopenharmony_ci    void postIterate    (void);
60e5c31af7Sopenharmony_ci
61e5c31af7Sopenharmony_ci    virtual glw::GenericFuncType    getProcAddress    (const char* name) const { return m_egl.getProcAddress(name); }
62e5c31af7Sopenharmony_ciprivate:
63e5c31af7Sopenharmony_ci    const eglw::DefaultLibrary      m_egl;
64e5c31af7Sopenharmony_ci    const glu::ContextType        m_contextType;
65e5c31af7Sopenharmony_ci    glw::Functions            m_glFunctions;
66e5c31af7Sopenharmony_ci    tcu::RenderTarget        m_renderTarget;
67e5c31af7Sopenharmony_ci};
68e5c31af7Sopenharmony_ci
69e5c31af7Sopenharmony_ci} // egl
70e5c31af7Sopenharmony_ci} // OHOS
71e5c31af7Sopenharmony_ci} // tcu
72e5c31af7Sopenharmony_ci#endif // _TCUOHOSROSENNATIVECONTEXT_HPP