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 "display/tcuOhosNativeDisplay.hpp"
17 #include "tcuOhosPixmapFactory.hpp"
18 #include "tcuOhosNativePixmap.hpp"
19 #include "egluGLContextFactory.hpp"
20 #include "eglwLibrary.hpp"
21 #include "eglwFunctions.hpp"
22 #include "eglwEnums.hpp"
23 #include "deUniquePtr.hpp"
24
25 namespace tcu
26 {
27 namespace OHOS_ROSEN
28 {
29 namespace egl
30 {
31
32 using std::string;
33 using de::MovePtr;
34 using de::UniquePtr;
35 using glu::ContextFactory;
36 using eglu::GLContextFactory;
37 using eglu::NativeDisplay;
38 using eglu::NativeDisplayFactory;
39 using eglu::NativeWindow;
40 using eglu::NativeWindowFactory;
41 using eglu::NativePixmap;
42 using eglu::NativePixmapFactory;
43 using eglu::WindowParams;
44 using tcu::TextureLevel;
45
createPixmap(NativeDisplay * nativeDisplay,int width,int height) const46 NativePixmap* OhosPixmapFactory::createPixmap (NativeDisplay* nativeDisplay,
47 int width,
48 int height) const
49 {
50 //TODO create pixmap
51 // OhosDisplay* display = dynamic_cast<OhosDisplay*>(nativeDisplay);
52 if (nativeDisplay != nullptr) {
53 printf("OhosPixmapFactory::createPixmap width=%d, height=%d,\n", width, height);
54 }
55
56 return new OhosPixmap();
57 }
58
59 } // egl
60 } // OHOS
61 } // tcu