This file is indexed.

/usr/include/hybris/hwcomposerwindow/hwcomposer_window.h is in libhybris-dev 0.1.0+git20151016+6d424c9-0ubuntu7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
 * Copyright (C) 2013 libhybris
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef FBDEV_WINDOW_H
#define FBDEV_WINDOW_H

#include "nativewindowbase.h"
#include <linux/fb.h>
#include <hardware/gralloc.h>

#include <list>


class HWComposerNativeWindowBuffer : public BaseNativeWindowBuffer {
friend class HWComposerNativeWindow;

protected:
    HWComposerNativeWindowBuffer(alloc_device_t* alloc,
                            unsigned int width,
                            unsigned int height,
                            unsigned int format,
                            unsigned int usage) ;
   virtual ~HWComposerNativeWindowBuffer() ;

protected:
    int busy;
    int fenceFd;
    int status;
    alloc_device_t* m_alloc;
};


class HWComposerNativeWindow : public BaseNativeWindow {
public:
    HWComposerNativeWindow(unsigned int width, unsigned int height, unsigned int format);
    ~HWComposerNativeWindow();
    void setup(gralloc_module_t* gralloc, alloc_device_t* alloc);


    int getFenceBufferFd(HWComposerNativeWindowBuffer *buffer);
    void setFenceBufferFd(HWComposerNativeWindowBuffer *buffer, int fd);
protected:
    // overloads from BaseNativeWindow
    virtual int setSwapInterval(int interval);

    virtual int dequeueBuffer(BaseNativeWindowBuffer** buffer, int* fenceFd);
    virtual int queueBuffer(BaseNativeWindowBuffer* buffer, int fenceFd);
    virtual int cancelBuffer(BaseNativeWindowBuffer* buffer, int fenceFd);
    virtual int lockBuffer(BaseNativeWindowBuffer* buffer);

    virtual unsigned int type() const;
    virtual unsigned int width() const;
    virtual unsigned int height() const;
    virtual unsigned int format() const;
    virtual unsigned int defaultWidth() const;
    virtual unsigned int defaultHeight() const;
    virtual unsigned int queueLength() const;
    virtual unsigned int transformHint() const;
    // perform calls
    virtual int setUsage(int usage);
    virtual int setBuffersFormat(int format);
    virtual int setBuffersDimensions(int width, int height);
    virtual int setBufferCount(int cnt);
    virtual void present(HWComposerNativeWindowBuffer *buffer) = 0;
private:
    void destroyBuffers();

private:
    framebuffer_device_t* m_fbDev;
    alloc_device_t* m_alloc;
    unsigned int m_usage;
    unsigned int m_bufFormat;
    int m_freeBufs;
    std::list<HWComposerNativeWindowBuffer*> m_bufList;
    HWComposerNativeWindowBuffer* m_frontBuf;

    int m_width;
    int m_height;

};

#endif
// vim: noai:ts=4:sw=4:ss=4:expandtab