1 #ifndef DALI_INTERNAL_EGL_IMAGE_EXTENSIONS_H
2 #define DALI_INTERNAL_EGL_IMAGE_EXTENSIONS_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/images/pixel.h>
25 #include <dali/internal/graphics/common/egl-include.h>
33 class EglImplementation;
36 * EglImageExtensions class provides EGL image extension support
38 class EglImageExtensions
44 EglImageExtensions(EglImplementation* impl);
49 ~EglImageExtensions();
52 public: // EGLImageKHR extension support
55 * If the EGL Image extension is available this function returns a
57 * @param clientBuffer Client buffer to use for image creation
58 * @return an object that holds a EGLImageKHR
60 void* CreateImageKHR(EGLClientBuffer clientBuffer);
63 * If the EGL Image extension is available this function
64 * destroys the a EGLImageKHR
65 * @param eglImageKHR Object that holds a EGLImageKHR
67 void DestroyImageKHR(void* eglImageKHR);
70 * defines a 2D texture
71 * @param eglImageKHR Object that holds a EGLImageKHR
73 void TargetTextureKHR(void* eglImageKHR);
76 * Get the functions for using ImageKHR
78 void InitializeEglImageKHR();
81 EglImplementation* mEglImplementation;
83 bool mImageKHRInitialized; ///< Flag for whether extended KHR functions loaded
84 bool mImageKHRInitializeFailed; ///< Flag to avoid trying to reload extended KHR functions, if
85 /// it fails the first time
88 } // namespace Adaptor
90 } // namespace Internal
94 #endif // DALI_INTERNAL_EGL_IMAGE_EXTENSIONS_H