1 /************************************************************************** 2 * 3 * Copyright 2010, 2011 BMW Car IT GmbH 4 * Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh 5 * 6 * 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 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 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. 18 * 19 ****************************************************************************/ 20 #ifndef _WLEGLSURFACE_H_ 21 #define _WLEGLSURFACE_H_ 22 23 #include <EGL/egl.h> 24 #include <wayland-egl.h> 25 #include "WLSurface.h" 26 27 class WLEGLSurface : public WLSurface 28 { 29 // properties 30 protected: 31 struct wl_egl_window* m_wlEglWindow; 32 EGLDisplay m_eglDisplay; 33 EGLConfig m_eglConfig; 34 EGLSurface m_eglSurface; 35 EGLContext m_eglContext; 36 37 // methods 38 public: 39 WLEGLSurface(WLContext* wlContext); 40 virtual ~WLEGLSurface(); 41 42 EGLDisplay GetEGLDisplay() const; 43 EGLSurface GetEGLSurface() const; 44 EGLContext GetEGLContext() const; 45 46 protected: 47 virtual bool CreatePlatformSurface(); 48 }; 49 GetEGLDisplay()50inline EGLDisplay WLEGLSurface::GetEGLDisplay() const { return m_eglDisplay; } GetEGLSurface()51inline EGLSurface WLEGLSurface::GetEGLSurface() const { return m_eglSurface; } GetEGLContext()52inline EGLContext WLEGLSurface::GetEGLContext() const { return m_eglContext; } 53 54 #endif /* _WLEGLSURFACE_H_ */ 55