widget/gonk/libdisplay/GonkDisplayICS.h

branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
equal deleted inserted replaced
-1:000000000000 0:f2b2b1a669bd
1 /* Copyright 2013 Mozilla Foundation and Mozilla contributors
2 *
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 #ifndef GONKDISPLAYICS_H
17 #define GONKDISPLAYICS_H
18
19 #include <string.h>
20
21 #include "GonkDisplay.h"
22 #include "ui/FramebufferNativeWindow.h"
23 #include "hardware/hwcomposer.h"
24 #include "utils/RefBase.h"
25
26 namespace mozilla {
27
28 class GonkDisplayICS : public GonkDisplay {
29 public:
30 GonkDisplayICS();
31 ~GonkDisplayICS();
32
33 virtual ANativeWindow* GetNativeWindow();
34
35 virtual void SetEnabled(bool enabled);
36
37 virtual void OnEnabled(OnEnabledCallbackType callback);
38
39 virtual void* GetHWCDevice();
40
41 virtual void* GetFBSurface();
42
43 virtual bool SwapBuffers(EGLDisplay dpy, EGLSurface sur);
44
45 virtual ANativeWindowBuffer* DequeueBuffer();
46
47 virtual bool QueueBuffer(ANativeWindowBuffer* handle);
48
49 virtual void UpdateFBSurface(EGLDisplay dpy, EGLSurface sur);
50
51 virtual void SetFBReleaseFd(int fd);
52
53 virtual int GetPrevFBAcquireFd()
54 {
55 return -1;
56 }
57
58 private:
59 hw_module_t const* mModule;
60 hwc_composer_device_t* mHwc;
61 android::sp<android::FramebufferNativeWindow> mFBSurface;
62 };
63
64 }
65
66 #endif /* GONKDISPLAYICS_H */

mercurial