1 /* Copyright 2013 Mozilla Foundation and Mozilla contributors
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <system/window.h>
27 typedef void * EGLDisplay
;
28 typedef void * EGLSurface
;
32 virtual ANativeWindow
* GetNativeWindow() = 0;
34 virtual void SetEnabled(bool enabled
) = 0;
36 typedef void (*OnEnabledCallbackType
)(bool enabled
);
38 virtual void OnEnabled(OnEnabledCallbackType callback
) = 0;
40 virtual void* GetHWCDevice() = 0;
42 virtual void* GetFBSurface() = 0;
44 virtual bool SwapBuffers(EGLDisplay dpy
, EGLSurface sur
) = 0;
46 virtual ANativeWindowBuffer
* DequeueBuffer() = 0;
48 virtual bool QueueBuffer(ANativeWindowBuffer
* buf
) = 0;
50 virtual void UpdateFBSurface(EGLDisplay dpy
, EGLSurface sur
) = 0;
52 virtual void SetFBReleaseFd(int fd
) = 0;
54 virtual int GetPrevFBAcquireFd() = 0;
57 uint32_t surfaceformat
;
60 __attribute__ ((weak
))
61 GonkDisplay
* GetGonkDisplay();
64 #endif /* GONKDISPLAY_H */