• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2002 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 // SurfaceImpl.cpp: Implementation of Surface stub method class
8 
9 #include "libANGLE/renderer/SurfaceImpl.h"
10 
11 namespace rx
12 {
13 
SurfaceImpl(const egl::SurfaceState & state)14 SurfaceImpl::SurfaceImpl(const egl::SurfaceState &state) : mState(state) {}
15 
~SurfaceImpl()16 SurfaceImpl::~SurfaceImpl() {}
17 
makeCurrent(const gl::Context * context)18 egl::Error SurfaceImpl::makeCurrent(const gl::Context *context)
19 {
20     return egl::NoError();
21 }
22 
unMakeCurrent(const gl::Context * context)23 egl::Error SurfaceImpl::unMakeCurrent(const gl::Context *context)
24 {
25     return egl::NoError();
26 }
27 
swapWithDamage(const gl::Context * context,const EGLint * rects,EGLint n_rects)28 egl::Error SurfaceImpl::swapWithDamage(const gl::Context *context,
29                                        const EGLint *rects,
30                                        EGLint n_rects)
31 {
32     UNREACHABLE();
33     return egl::EglBadSurface() << "swapWithDamage implementation missing.";
34 }
35 
setPresentationTime(EGLnsecsANDROID time)36 egl::Error SurfaceImpl::setPresentationTime(EGLnsecsANDROID time)
37 {
38     UNREACHABLE();
39     return egl::EglBadSurface() << "setPresentationTime implementation missing.";
40 }
41 
setFixedWidth(EGLint width)42 void SurfaceImpl::setFixedWidth(EGLint width)
43 {
44     UNREACHABLE();
45 }
46 
setFixedHeight(EGLint height)47 void SurfaceImpl::setFixedHeight(EGLint height)
48 {
49     UNREACHABLE();
50 }
51 
setTimestampsEnabled(bool enabled)52 void SurfaceImpl::setTimestampsEnabled(bool enabled)
53 {
54     UNREACHABLE();
55 }
56 
getD3DTextureColorFormat() const57 const angle::Format *SurfaceImpl::getD3DTextureColorFormat() const
58 {
59     UNREACHABLE();
60     return nullptr;
61 }
62 
getSupportedCompositorTimings() const63 egl::SupportedCompositorTimings SurfaceImpl::getSupportedCompositorTimings() const
64 {
65     UNREACHABLE();
66     return egl::SupportedCompositorTimings();
67 }
68 
getCompositorTiming(EGLint numTimestamps,const EGLint * names,EGLnsecsANDROID * values) const69 egl::Error SurfaceImpl::getCompositorTiming(EGLint numTimestamps,
70                                             const EGLint *names,
71                                             EGLnsecsANDROID *values) const
72 {
73     UNREACHABLE();
74     return egl::EglBadDisplay();
75 }
76 
getNextFrameId(EGLuint64KHR * frameId) const77 egl::Error SurfaceImpl::getNextFrameId(EGLuint64KHR *frameId) const
78 {
79     UNREACHABLE();
80     return egl::EglBadDisplay();
81 }
82 
getSupportedTimestamps() const83 egl::SupportedTimestamps SurfaceImpl::getSupportedTimestamps() const
84 {
85     UNREACHABLE();
86     return egl::SupportedTimestamps();
87 }
88 
getFrameTimestamps(EGLuint64KHR frameId,EGLint numTimestamps,const EGLint * timestamps,EGLnsecsANDROID * values) const89 egl::Error SurfaceImpl::getFrameTimestamps(EGLuint64KHR frameId,
90                                            EGLint numTimestamps,
91                                            const EGLint *timestamps,
92                                            EGLnsecsANDROID *values) const
93 {
94     UNREACHABLE();
95     return egl::EglBadDisplay();
96 }
97 
swapWithFrameToken(const gl::Context * context,EGLFrameTokenANGLE frameToken)98 egl::Error SurfaceImpl::swapWithFrameToken(const gl::Context *context,
99                                            EGLFrameTokenANGLE frameToken)
100 {
101     UNREACHABLE();
102     return egl::EglBadDisplay();
103 }
104 
getUserWidth(const egl::Display * display,EGLint * value) const105 egl::Error SurfaceImpl::getUserWidth(const egl::Display *display, EGLint *value) const
106 {
107     *value = getWidth();
108     return egl::NoError();
109 }
110 
getUserHeight(const egl::Display * display,EGLint * value) const111 egl::Error SurfaceImpl::getUserHeight(const egl::Display *display, EGLint *value) const
112 {
113     *value = getHeight();
114     return egl::NoError();
115 }
116 
getBufferAge(const gl::Context * context,EGLint * age)117 egl::Error SurfaceImpl::getBufferAge(const gl::Context *context, EGLint *age)
118 {
119     UNREACHABLE();
120     return egl::EglBadMatch();
121 }
122 
lockSurface(const egl::Display * display,EGLint usageHint,bool preservePixels,uint8_t ** bufferPtrOut,EGLint * bufferPitchOut)123 egl::Error SurfaceImpl::lockSurface(const egl::Display *display,
124                                     EGLint usageHint,
125                                     bool preservePixels,
126                                     uint8_t **bufferPtrOut,
127                                     EGLint *bufferPitchOut)
128 {
129     UNREACHABLE();
130     return egl::EglBadMatch();
131 }
132 
unlockSurface(const egl::Display * display,bool preservePixels)133 egl::Error SurfaceImpl::unlockSurface(const egl::Display *display, bool preservePixels)
134 {
135     UNREACHABLE();
136     return egl::EglBadMatch();
137 }
138 
origin() const139 EGLint SurfaceImpl::origin() const
140 {
141     return EGL_LOWER_LEFT_KHR;
142 }
143 
setRenderBuffer(EGLint renderBuffer)144 egl::Error SurfaceImpl::setRenderBuffer(EGLint renderBuffer)
145 {
146     return egl::NoError();
147 }
148 }  // namespace rx
149