Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
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 */
16 #ifndef GONKDISPLAYICS_H
17 #define GONKDISPLAYICS_H
19 #include <string.h>
21 #include "GonkDisplay.h"
22 #include "ui/FramebufferNativeWindow.h"
23 #include "hardware/hwcomposer.h"
24 #include "utils/RefBase.h"
26 namespace mozilla {
28 class GonkDisplayICS : public GonkDisplay {
29 public:
30 GonkDisplayICS();
31 ~GonkDisplayICS();
33 virtual ANativeWindow* GetNativeWindow();
35 virtual void SetEnabled(bool enabled);
37 virtual void OnEnabled(OnEnabledCallbackType callback);
39 virtual void* GetHWCDevice();
41 virtual void* GetFBSurface();
43 virtual bool SwapBuffers(EGLDisplay dpy, EGLSurface sur);
45 virtual ANativeWindowBuffer* DequeueBuffer();
47 virtual bool QueueBuffer(ANativeWindowBuffer* handle);
49 virtual void UpdateFBSurface(EGLDisplay dpy, EGLSurface sur);
51 virtual void SetFBReleaseFd(int fd);
53 virtual int GetPrevFBAcquireFd()
54 {
55 return -1;
56 }
58 private:
59 hw_module_t const* mModule;
60 hwc_composer_device_t* mHwc;
61 android::sp<android::FramebufferNativeWindow> mFBSurface;
62 };
64 }
66 #endif /* GONKDISPLAYICS_H */