1// Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Surface.hpp: Defines the gl::Surface class, which is the abstract interface
16// for an EGL surface as viewed by the GL implementation.
17
18#ifndef INCLUDE_SURFACE_H_
19#define INCLUDE_SURFACE_H_
20
21#include "Renderer/Surface.hpp"
22
23#include <EGL/egl.h>
24
25namespace egl
26{
27class Texture;
28class Image;
29}
30
31namespace gl
32{
33class [[clang::lto_visibility_public]] Surface
34{
35protected:
36 Surface();
37 virtual ~Surface() = 0;
38
39public:
40 virtual egl::Image *getRenderTarget() = 0;
41 virtual egl::Image *getDepthStencil() = 0;
42
43 virtual EGLint getWidth() const = 0;
44 virtual EGLint getHeight() const = 0;
45 virtual EGLenum getTextureTarget() const = 0;
46
47 virtual void setBoundTexture(egl::Texture *texture) = 0;
48};
49}
50
51#endif // INCLUDE_SURFACE_H_
52