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,EGLint * rects,EGLint n_rects)28 egl::Error SurfaceImpl::swapWithDamage(const gl::Context *context, EGLint *rects, EGLint n_rects)
29 {
30 UNREACHABLE();
31 return egl::EglBadSurface() << "swapWithDamage implementation missing.";
32 }
33
setPresentationTime(EGLnsecsANDROID time)34 egl::Error SurfaceImpl::setPresentationTime(EGLnsecsANDROID time)
35 {
36 UNREACHABLE();
37 return egl::EglBadSurface() << "setPresentationTime implementation missing.";
38 }
39
setFixedWidth(EGLint width)40 void SurfaceImpl::setFixedWidth(EGLint width)
41 {
42 UNREACHABLE();
43 }
44
setFixedHeight(EGLint height)45 void SurfaceImpl::setFixedHeight(EGLint height)
46 {
47 UNREACHABLE();
48 }
49
setTimestampsEnabled(bool enabled)50 void SurfaceImpl::setTimestampsEnabled(bool enabled)
51 {
52 UNREACHABLE();
53 }
54
getD3DTextureColorFormat() const55 const angle::Format *SurfaceImpl::getD3DTextureColorFormat() const
56 {
57 UNREACHABLE();
58 return nullptr;
59 }
60
getSupportedCompositorTimings() const61 egl::SupportedCompositorTimings SurfaceImpl::getSupportedCompositorTimings() const
62 {
63 UNREACHABLE();
64 return egl::SupportedCompositorTimings();
65 }
66
getCompositorTiming(EGLint numTimestamps,const EGLint * names,EGLnsecsANDROID * values) const67 egl::Error SurfaceImpl::getCompositorTiming(EGLint numTimestamps,
68 const EGLint *names,
69 EGLnsecsANDROID *values) const
70 {
71 UNREACHABLE();
72 return egl::EglBadDisplay();
73 }
74
getNextFrameId(EGLuint64KHR * frameId) const75 egl::Error SurfaceImpl::getNextFrameId(EGLuint64KHR *frameId) const
76 {
77 UNREACHABLE();
78 return egl::EglBadDisplay();
79 }
80
getSupportedTimestamps() const81 egl::SupportedTimestamps SurfaceImpl::getSupportedTimestamps() const
82 {
83 UNREACHABLE();
84 return egl::SupportedTimestamps();
85 }
86
getFrameTimestamps(EGLuint64KHR frameId,EGLint numTimestamps,const EGLint * timestamps,EGLnsecsANDROID * values) const87 egl::Error SurfaceImpl::getFrameTimestamps(EGLuint64KHR frameId,
88 EGLint numTimestamps,
89 const EGLint *timestamps,
90 EGLnsecsANDROID *values) const
91 {
92 UNREACHABLE();
93 return egl::EglBadDisplay();
94 }
95
swapWithFrameToken(const gl::Context * context,EGLFrameTokenANGLE frameToken)96 egl::Error SurfaceImpl::swapWithFrameToken(const gl::Context *context,
97 EGLFrameTokenANGLE frameToken)
98 {
99 UNREACHABLE();
100 return egl::EglBadDisplay();
101 }
102
getUserWidth(const egl::Display * display,EGLint * value) const103 egl::Error SurfaceImpl::getUserWidth(const egl::Display *display, EGLint *value) const
104 {
105 *value = getWidth();
106 return egl::NoError();
107 }
108
getUserHeight(const egl::Display * display,EGLint * value) const109 egl::Error SurfaceImpl::getUserHeight(const egl::Display *display, EGLint *value) const
110 {
111 *value = getHeight();
112 return egl::NoError();
113 }
114 } // namespace rx
115