Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
src
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MediaTek
aiot
chromium
src
Commits
aebb4928
Commit
aebb4928
authored
15 years ago
by
gman@google.com
Browse files
Options
Downloads
Patches
Plain Diff
fix for gl cb
git-svn-id:
svn://svn.chromium.org/chrome/trunk/src@26892
0039d316-1c4b-4281-b951-d872f2087c98
parent
9dcb5966
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
o3d/command_buffer/service/cross/gl/render_surface_gl.cc
+16
-16
16 additions, 16 deletions
o3d/command_buffer/service/cross/gl/render_surface_gl.cc
with
16 additions
and
16 deletions
o3d/command_buffer/service/cross/gl/render_surface_gl.cc
+
16
−
16
View file @
aebb4928
...
...
@@ -118,11 +118,11 @@ BufferSyncInterface::ParseError GAPIGL::CreateRenderSurface(
ResourceID
texture_id
)
{
if
(
id
==
current_surface_id_
)
{
// This will delete the current surface which would be bad.
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
TextureGL
*
texture
=
textures_
.
Get
(
texture_id
);
if
(
!
texture
->
render_surfaces_enabled
())
{
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
else
{
RenderSurfaceGL
*
render_surface
=
RenderSurfaceGL
::
Create
(
width
,
height
,
...
...
@@ -130,20 +130,20 @@ BufferSyncInterface::ParseError GAPIGL::CreateRenderSurface(
side
,
texture
);
if
(
render_surface
==
NULL
)
{
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
render_surfaces_
.
Assign
(
id
,
render_surface
);
}
return
BufferSyncInterface
::
PARSE_NO_ERROR
;
return
BufferSyncInterface
::
kParseNoError
;
}
BufferSyncInterface
::
ParseError
GAPIGL
::
DestroyRenderSurface
(
ResourceID
id
)
{
if
(
id
==
current_surface_id_
)
{
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
return
render_surfaces_
.
Destroy
(
id
)
?
BufferSyncInterface
::
PARSE_NO_ERROR
:
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
BufferSyncInterface
::
kParseNoError
:
BufferSyncInterface
::
kParseInvalidArguments
;
}
BufferSyncInterface
::
ParseError
GAPIGL
::
CreateDepthSurface
(
...
...
@@ -152,24 +152,24 @@ BufferSyncInterface::ParseError GAPIGL::CreateDepthSurface(
unsigned
int
height
)
{
if
(
id
==
current_depth_surface_id_
)
{
// This will delete the current surface which would be bad.
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
RenderDepthStencilSurfaceGL
*
depth_surface
=
RenderDepthStencilSurfaceGL
::
Create
(
width
,
height
);
if
(
depth_surface
==
NULL
)
{
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
depth_surfaces_
.
Assign
(
id
,
depth_surface
);
return
BufferSyncInterface
::
PARSE_NO_ERROR
;
return
BufferSyncInterface
::
kParseNoError
;
}
BufferSyncInterface
::
ParseError
GAPIGL
::
DestroyDepthSurface
(
ResourceID
id
)
{
if
(
id
==
current_depth_surface_id_
)
{
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
return
depth_surfaces_
.
Destroy
(
id
)
?
BufferSyncInterface
::
PARSE_NO_ERROR
:
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
BufferSyncInterface
::
kParseNoError
:
BufferSyncInterface
::
kParseInvalidArguments
;
}
void
ResetBoundAttachments
()
{
...
...
@@ -224,7 +224,7 @@ BufferSyncInterface::ParseError GAPIGL::SetRenderSurface(
ResourceID
depth_stencil_id
)
{
if
(
render_surfaces_
.
Get
(
render_surface_id
)
==
NULL
&&
depth_surfaces_
.
Get
(
depth_stencil_id
)
==
NULL
)
{
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
::
glBindFramebufferEXT
(
GL_FRAMEBUFFER
,
render_surface_framebuffer_
);
...
...
@@ -237,7 +237,7 @@ BufferSyncInterface::ParseError GAPIGL::SetRenderSurface(
if
(
!
render_surface
->
texture
()
->
InstallFrameBufferObjects
(
render_surface
)
||
!
BindDepthStencilBuffer
(
depth_surface
))
{
return
BufferSyncInterface
::
PARSE_INVALID_ARGUMENTS
;
return
BufferSyncInterface
::
kParseInvalidArguments
;
}
// RenderSurface rendering is performed with an inverted Y, so the front
...
...
@@ -247,7 +247,7 @@ BufferSyncInterface::ParseError GAPIGL::SetRenderSurface(
current_surface_id_
=
render_surface_id
;
current_depth_surface_id_
=
depth_stencil_id
;
return
BufferSyncInterface
::
PARSE_NO_ERROR
;
return
BufferSyncInterface
::
kParseNoError
;
}
void
GAPIGL
::
SetBackSurfaces
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment