widget/gonk/libdisplay/GonkDisplayICS.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/widget/gonk/libdisplay/GonkDisplayICS.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,66 @@
     1.4 +/* Copyright 2013 Mozilla Foundation and Mozilla contributors
     1.5 + *
     1.6 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.7 + * you may not use this file except in compliance with the License.
     1.8 + * You may obtain a copy of the License at
     1.9 + *
    1.10 + *     http://www.apache.org/licenses/LICENSE-2.0
    1.11 + *
    1.12 + * Unless required by applicable law or agreed to in writing, software
    1.13 + * distributed under the License is distributed on an "AS IS" BASIS,
    1.14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    1.15 + * See the License for the specific language governing permissions and
    1.16 + * limitations under the License.
    1.17 + */
    1.18 +
    1.19 +#ifndef GONKDISPLAYICS_H
    1.20 +#define GONKDISPLAYICS_H
    1.21 +
    1.22 +#include <string.h>
    1.23 +
    1.24 +#include "GonkDisplay.h"
    1.25 +#include "ui/FramebufferNativeWindow.h"
    1.26 +#include "hardware/hwcomposer.h"
    1.27 +#include "utils/RefBase.h"
    1.28 +
    1.29 +namespace mozilla {
    1.30 +
    1.31 +class GonkDisplayICS : public GonkDisplay {
    1.32 +public:
    1.33 +    GonkDisplayICS();
    1.34 +    ~GonkDisplayICS();
    1.35 +
    1.36 +    virtual ANativeWindow* GetNativeWindow();
    1.37 +
    1.38 +    virtual void SetEnabled(bool enabled);
    1.39 +
    1.40 +    virtual void OnEnabled(OnEnabledCallbackType callback);
    1.41 +
    1.42 +    virtual void* GetHWCDevice();
    1.43 +
    1.44 +    virtual void* GetFBSurface();
    1.45 +
    1.46 +    virtual bool SwapBuffers(EGLDisplay dpy, EGLSurface sur);
    1.47 +
    1.48 +    virtual ANativeWindowBuffer* DequeueBuffer();
    1.49 +
    1.50 +    virtual bool QueueBuffer(ANativeWindowBuffer* handle);
    1.51 +
    1.52 +    virtual void UpdateFBSurface(EGLDisplay dpy, EGLSurface sur);
    1.53 +
    1.54 +    virtual void SetFBReleaseFd(int fd);
    1.55 +
    1.56 +    virtual int GetPrevFBAcquireFd()
    1.57 +    {
    1.58 +        return -1;
    1.59 +    }
    1.60 +
    1.61 +private:
    1.62 +    hw_module_t const*        mModule;
    1.63 +    hwc_composer_device_t*    mHwc;
    1.64 +    android::sp<android::FramebufferNativeWindow> mFBSurface;
    1.65 +};
    1.66 +
    1.67 +}
    1.68 +
    1.69 +#endif /* GONKDISPLAYICS_H */

mercurial