Blame include/wayland-egldevice.h

Packit Service f6fdc3
/*
Packit Service f6fdc3
 * Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
Packit Service f6fdc3
 *
Packit Service f6fdc3
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit Service f6fdc3
 * copy of this software and associated documentation files (the "Software"),
Packit Service f6fdc3
 * to deal in the Software without restriction, including without limitation
Packit Service f6fdc3
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit Service f6fdc3
 * and/or sell copies of the Software, and to permit persons to whom the
Packit Service f6fdc3
 * Software is furnished to do so, subject to the following conditions:
Packit Service f6fdc3
 *
Packit Service f6fdc3
 * The above copyright notice and this permission notice shall be included in
Packit Service f6fdc3
 * all copies or substantial portions of the Software.
Packit Service f6fdc3
 *
Packit Service f6fdc3
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit Service f6fdc3
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit Service f6fdc3
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
Packit Service f6fdc3
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit Service f6fdc3
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
Packit Service f6fdc3
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
Packit Service f6fdc3
 * DEALINGS IN THE SOFTWARE.
Packit Service f6fdc3
 */
Packit Service f6fdc3
Packit Service f6fdc3
#ifndef WAYLAND_EGLDEVICE_H
Packit Service f6fdc3
#define WAYLAND_EGLDEVICE_H
Packit Service f6fdc3
Packit Service f6fdc3
#include <EGL/egl.h>
Packit Service f6fdc3
#include <EGL/eglext.h>
Packit Service f6fdc3
#include <wayland-client.h>
Packit Service f6fdc3
#include "wayland-external-exports.h"
Packit Service f6fdc3
#include "wayland-eglhandle.h"
Packit Service f6fdc3
Packit Service f6fdc3
#ifdef __cplusplus
Packit Service f6fdc3
extern "C" {
Packit Service f6fdc3
#endif
Packit Service f6fdc3
Packit Service f6fdc3
/**
Packit Service f6fdc3
 * Keeps track of an internal display.
Packit Service f6fdc3
 *
Packit Service f6fdc3
 * Since the same internal display can be shared by multiple external displays,
Packit Service f6fdc3
 * the internal displays are always created with the EGL_TRACK_REFERENCES_KHR
Packit Service f6fdc3
 * flag set. If the driver doesn't support that extension, then we keep track
Packit Service f6fdc3
 * of an initialization count to produce the same behavior.
Packit Service f6fdc3
 */
Packit Service f6fdc3
typedef struct WlEglDeviceDpyRec {
Packit Service f6fdc3
    EGLDeviceEXT eglDevice;
Packit Service f6fdc3
    EGLDisplay   eglDisplay;
Packit Service f6fdc3
    WlEglPlatformData *data;
Packit Service f6fdc3
Packit Service f6fdc3
    unsigned int initCount;
Packit Service f6fdc3
    EGLint major;
Packit Service f6fdc3
    EGLint minor;
Packit Service f6fdc3
Packit Service f6fdc3
    struct {
Packit Service f6fdc3
        unsigned int stream                     : 1;
Packit Service f6fdc3
        unsigned int stream_attrib              : 1;
Packit Service f6fdc3
        unsigned int stream_cross_process_fd    : 1;
Packit Service f6fdc3
        unsigned int stream_remote              : 1;
Packit Service f6fdc3
        unsigned int stream_producer_eglsurface : 1;
Packit Service f6fdc3
        unsigned int stream_fifo_synchronous    : 1;
Packit Service f6fdc3
        unsigned int stream_sync                : 1;
Packit Service f6fdc3
        unsigned int stream_flush               : 1;
Packit Service f6fdc3
    } exts;
Packit Service f6fdc3
Packit Service f6fdc3
    struct wl_list link;
Packit Service f6fdc3
} WlEglDeviceDpy;
Packit Service f6fdc3
Packit Service f6fdc3
/**
Packit Service f6fdc3
 * Returns the WlEglDeviceDpy structure for a given device.
Packit Service f6fdc3
 * Note that the same device will always return the same WlEglDeviceDpy.
Packit Service f6fdc3
 */
Packit Service f6fdc3
WlEglDeviceDpy *wlGetInternalDisplay(WlEglPlatformData *data, EGLDeviceEXT device);
Packit Service f6fdc3
Packit Service f6fdc3
/**
Packit Service f6fdc3
 * Frees all of the WlEglDeviceDpy structures.
Packit Service f6fdc3
 */
Packit Service f6fdc3
void wlFreeAllInternalDisplays(WlEglPlatformData *data);
Packit Service f6fdc3
Packit Service f6fdc3
EGLBoolean wlInternalInitialize(WlEglDeviceDpy *devDpy);
Packit Service f6fdc3
EGLBoolean wlInternalTerminate(WlEglDeviceDpy *devDpy);
Packit Service f6fdc3
Packit Service f6fdc3
#ifdef __cplusplus
Packit Service f6fdc3
}
Packit Service f6fdc3
#endif
Packit Service f6fdc3
Packit Service f6fdc3
#endif // WAYLAND_EGLDEVICE_H