blob: ba6ccf4ad1f6a45232a544a16ca7169ff4134a58 [file] [log] [blame]
Corentin Wallez52445282015-06-09 09:15:54 +02001//
2// Copyright (c) 2015 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// OSPixmap.h: Definition of an abstract pixmap class
8
9#ifndef SAMPLE_UTIL_PIXMAP_H_
10#define SAMPLE_UTIL_PIXMAP_H_
11
Corentin Wallez27593e02015-09-15 08:19:09 -070012#include <stdlib.h>
13
Corentin Wallez52445282015-06-09 09:15:54 +020014#include <EGL/egl.h>
15#include <EGL/eglext.h>
16
Jamie Madillba319ba2018-12-29 10:29:33 -050017#include "util/Event.h"
18#include "util/util_export.h"
Corentin Wallez52445282015-06-09 09:15:54 +020019
Jamie Madillba319ba2018-12-29 10:29:33 -050020class ANGLE_UTIL_EXPORT OSPixmap
Corentin Wallez52445282015-06-09 09:15:54 +020021{
22 public:
23 OSPixmap() {}
24 virtual ~OSPixmap() {}
25
Jamie Madillba319ba2018-12-29 10:29:33 -050026 virtual bool initialize(EGLNativeDisplayType display,
27 size_t width,
28 size_t height,
29 int depth) = 0;
Corentin Wallez52445282015-06-09 09:15:54 +020030
31 virtual EGLNativePixmapType getNativePixmap() const = 0;
32};
33
Jamie Madillba319ba2018-12-29 10:29:33 -050034ANGLE_UTIL_EXPORT OSPixmap *CreateOSPixmap();
Corentin Wallez52445282015-06-09 09:15:54 +020035
Jamie Madillba319ba2018-12-29 10:29:33 -050036#endif // SAMPLE_UTIL_PIXMAP_H_