Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftshader
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
swiftshader
Commits
557b14e5
Commit
557b14e5
authored
May 27, 2014
by
Nicolas Capens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make available EGL surface parameters queryable.
BUG=14959041 Change-Id: I0447c512554e3da98c3b5b0f7a88cdadb96ef4d4
parent
ae799b19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
22 deletions
+43
-22
Surface.cpp
src/GLES2/libEGL/Surface.cpp
+30
-10
Surface.h
src/GLES2/libEGL/Surface.h
+7
-3
libEGL.cpp
src/GLES2/libEGL/libEGL.cpp
+6
-9
No files found.
src/GLES2/libEGL/Surface.cpp
View file @
557b14e5
...
...
@@ -196,16 +196,6 @@ void Surface::swap()
}
}
EGLint
Surface
::
getWidth
()
const
{
return
mWidth
;
}
EGLint
Surface
::
getHeight
()
const
{
return
mHeight
;
}
gl
::
Image
*
Surface
::
getRenderTarget
()
{
if
(
backBuffer
)
...
...
@@ -238,6 +228,36 @@ void Surface::setSwapInterval(EGLint interval)
mSwapInterval
=
std
::
min
(
mSwapInterval
,
mDisplay
->
getMaxSwapInterval
());
}
EGLint
Surface
::
getConfigID
()
const
{
return
mConfig
->
mConfigID
;
}
EGLint
Surface
::
getWidth
()
const
{
return
mWidth
;
}
EGLint
Surface
::
getHeight
()
const
{
return
mHeight
;
}
EGLint
Surface
::
getPixelAspectRatio
()
const
{
return
mPixelAspectRatio
;
}
EGLenum
Surface
::
getRenderBuffer
()
const
{
return
mRenderBuffer
;
}
EGLenum
Surface
::
getSwapBehavior
()
const
{
return
mSwapBehavior
;
}
EGLenum
Surface
::
getTextureFormat
()
const
{
return
mTextureFormat
;
...
...
src/GLES2/libEGL/Surface.h
View file @
557b14e5
...
...
@@ -46,14 +46,18 @@ public:
void
swap
();
EGLNativeWindowType
getWindowHandle
();
virtual
EGLint
getWidth
()
const
;
virtual
EGLint
getHeight
()
const
;
virtual
gl
::
Image
*
getRenderTarget
();
virtual
gl
::
Image
*
getDepthStencil
();
void
setSwapInterval
(
EGLint
interval
);
virtual
EGLint
getConfigID
()
const
;
virtual
EGLint
getWidth
()
const
;
virtual
EGLint
getHeight
()
const
;
virtual
EGLint
getPixelAspectRatio
()
const
;
virtual
EGLenum
getRenderBuffer
()
const
;
virtual
EGLenum
getSwapBehavior
()
const
;
virtual
EGLenum
getTextureFormat
()
const
;
virtual
EGLenum
getTextureTarget
()
const
;
virtual
sw
::
Format
getInternalFormat
()
const
;
...
...
src/GLES2/libEGL/libEGL.cpp
View file @
557b14e5
...
...
@@ -448,7 +448,7 @@ EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLin
UNIMPLEMENTED
();
// FIXME
break
;
case
EGL_CONFIG_ID
:
UNIMPLEMENTED
();
// FIXME
*
value
=
eglSurface
->
getConfigID
();
break
;
case
EGL_HEIGHT
:
*
value
=
eglSurface
->
getHeight
();
...
...
@@ -469,19 +469,19 @@ EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, EGLin
UNIMPLEMENTED
();
// FIXME
break
;
case
EGL_PIXEL_ASPECT_RATIO
:
UNIMPLEMENTED
();
// FIXME
*
value
=
eglSurface
->
getPixelAspectRatio
();
break
;
case
EGL_RENDER_BUFFER
:
UNIMPLEMENTED
();
// FIXME
*
value
=
eglSurface
->
getRenderBuffer
();
break
;
case
EGL_SWAP_BEHAVIOR
:
UNIMPLEMENTED
();
// FIXME
*
value
=
eglSurface
->
getSwapBehavior
();
break
;
case
EGL_TEXTURE_FORMAT
:
UNIMPLEMENTED
();
// FIXME
*
value
=
eglSurface
->
getTextureFormat
();
break
;
case
EGL_TEXTURE_TARGET
:
UNIMPLEMENTED
();
// FIXME
*
value
=
eglSurface
->
getTextureTarget
();
break
;
case
EGL_VERTICAL_RESOLUTION
:
UNIMPLEMENTED
();
// FIXME
...
...
@@ -859,9 +859,6 @@ EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurfac
UNIMPLEMENTED
();
// FIXME
}
egl
::
Surface
*
previousDraw
=
static_cast
<
egl
::
Surface
*>
(
egl
::
getCurrentDrawSurface
());
egl
::
Surface
*
previousRead
=
static_cast
<
egl
::
Surface
*>
(
egl
::
getCurrentReadSurface
());
egl
::
setCurrentDisplay
(
dpy
);
egl
::
setCurrentDrawSurface
(
draw
);
egl
::
setCurrentReadSurface
(
read
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment