1 /*
2 * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "tcuOhosNativeContext.hpp"
17 #include "egluGLContextFactory.hpp"
18 #include "eglwLibrary.hpp"
19 #include "eglwFunctions.hpp"
20 #include "eglwEnums.hpp"
21 #include "deUniquePtr.hpp"
22 #include "tcuCommandLine.hpp"
23 #include "tcuOhosEglContextFactory.hpp"
24
25 using namespace tcu;
26 using namespace OHOS_ROSEN;
27 using namespace egl;
28
OhosContextFactory()29 OhosContextFactory::OhosContextFactory ()
30 : glu::ContextFactory ("ohos", "Render Context")
31 {
32 //TODO:
33 }
34
createContext(const glu::RenderConfig & config,const tcu::CommandLine & cmdline,const glu::RenderContext * sharedContext) const35 glu::RenderContext* OhosContextFactory::createContext (const glu::RenderConfig& config,
36 const tcu::CommandLine& cmdline, const glu::RenderContext* sharedContext) const
37 {
38 printf("---- cc h ----%p\n",sharedContext);
39 //TODO:
40 // printf("%d \n", sharedContext->getDefaultFramebuffer());
41 return new OhosRendContext(config, cmdline);
42 }
43