Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* Copyright 2013 Mozilla Foundation and Mozilla contributors |
michael@0 | 2 | * |
michael@0 | 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
michael@0 | 4 | * you may not use this file except in compliance with the License. |
michael@0 | 5 | * You may obtain a copy of the License at |
michael@0 | 6 | * |
michael@0 | 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
michael@0 | 8 | * |
michael@0 | 9 | * Unless required by applicable law or agreed to in writing, software |
michael@0 | 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
michael@0 | 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
michael@0 | 12 | * See the License for the specific language governing permissions and |
michael@0 | 13 | * limitations under the License. |
michael@0 | 14 | */ |
michael@0 | 15 | |
michael@0 | 16 | #ifndef GONKDISPLAYJB_H |
michael@0 | 17 | #define GONKDISPLAYJB_H |
michael@0 | 18 | |
michael@0 | 19 | #include "GonkDisplay.h" |
michael@0 | 20 | #include "FramebufferSurface.h" |
michael@0 | 21 | #include "hardware/hwcomposer.h" |
michael@0 | 22 | #include "hardware/power.h" |
michael@0 | 23 | #include "ui/Fence.h" |
michael@0 | 24 | #include "utils/RefBase.h" |
michael@0 | 25 | |
michael@0 | 26 | namespace mozilla { |
michael@0 | 27 | |
michael@0 | 28 | class GonkDisplayJB : public GonkDisplay { |
michael@0 | 29 | public: |
michael@0 | 30 | GonkDisplayJB(); |
michael@0 | 31 | ~GonkDisplayJB(); |
michael@0 | 32 | |
michael@0 | 33 | virtual ANativeWindow* GetNativeWindow(); |
michael@0 | 34 | |
michael@0 | 35 | virtual void SetEnabled(bool enabled); |
michael@0 | 36 | |
michael@0 | 37 | virtual void OnEnabled(OnEnabledCallbackType callback); |
michael@0 | 38 | |
michael@0 | 39 | virtual void* GetHWCDevice(); |
michael@0 | 40 | |
michael@0 | 41 | virtual void* GetFBSurface(); |
michael@0 | 42 | |
michael@0 | 43 | virtual bool SwapBuffers(EGLDisplay dpy, EGLSurface sur); |
michael@0 | 44 | |
michael@0 | 45 | virtual ANativeWindowBuffer* DequeueBuffer(); |
michael@0 | 46 | |
michael@0 | 47 | virtual bool QueueBuffer(ANativeWindowBuffer* buf); |
michael@0 | 48 | |
michael@0 | 49 | virtual void UpdateFBSurface(EGLDisplay dpy, EGLSurface sur); |
michael@0 | 50 | |
michael@0 | 51 | virtual void SetFBReleaseFd(int fd); |
michael@0 | 52 | |
michael@0 | 53 | virtual int GetPrevFBAcquireFd(); |
michael@0 | 54 | |
michael@0 | 55 | bool Post(buffer_handle_t buf, int fence); |
michael@0 | 56 | |
michael@0 | 57 | private: |
michael@0 | 58 | hw_module_t const* mModule; |
michael@0 | 59 | hw_module_t const* mFBModule; |
michael@0 | 60 | hwc_composer_device_1_t* mHwc; |
michael@0 | 61 | framebuffer_device_t* mFBDevice; |
michael@0 | 62 | power_module_t* mPowerModule; |
michael@0 | 63 | android::sp<android::FramebufferSurface> mFBSurface; |
michael@0 | 64 | android::sp<ANativeWindow> mSTClient; |
michael@0 | 65 | android::sp<android::IGraphicBufferAlloc> mAlloc; |
michael@0 | 66 | android::sp<android::GraphicBuffer> mBootAnimBuffer; |
michael@0 | 67 | hwc_display_contents_1_t* mList; |
michael@0 | 68 | uint32_t mWidth; |
michael@0 | 69 | uint32_t mHeight; |
michael@0 | 70 | OnEnabledCallbackType mEnabledCallback; |
michael@0 | 71 | }; |
michael@0 | 72 | |
michael@0 | 73 | } |
michael@0 | 74 | |
michael@0 | 75 | #endif /* GONKDISPLAYJB_H */ |