Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: command_buffer/service/win/d3d9/render_surface_d3d9.cc

Issue 212018: Change command buffer client code to use structures.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « command_buffer/service/win/d3d9/geometry_d3d9.cc ('k') | command_buffer/service/win/d3d9/sampler_d3d9.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: command_buffer/service/win/d3d9/render_surface_d3d9.cc
===================================================================
--- command_buffer/service/win/d3d9/render_surface_d3d9.cc (revision 26638)
+++ command_buffer/service/win/d3d9/render_surface_d3d9.cc (working copy)
@@ -136,11 +136,11 @@
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;
}
TextureD3D9 *texture = textures_.Get(texture_id);
if (!texture->render_surfaces_enabled()) {
- return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ return BufferSyncInterface::kParseInvalidArguments;
} else {
RenderSurfaceD3D9 *render_surface = RenderSurfaceD3D9::Create(this,
width,
@@ -149,20 +149,20 @@
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 GAPID3D9::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 GAPID3D9::CreateDepthSurface(
@@ -171,24 +171,24 @@
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;
}
RenderDepthStencilSurfaceD3D9 *depth_surface =
RenderDepthStencilSurfaceD3D9::Create(this, 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 GAPID3D9::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;
}
BufferSyncInterface::ParseError GAPID3D9::SetRenderSurface(
@@ -200,7 +200,7 @@
depth_surfaces_.Get(depth_stencil_id);
if (d3d_render_surface == NULL && d3d_render_depth_surface == NULL) {
- return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ return BufferSyncInterface::kParseInvalidArguments;
}
IDirect3DSurface9 *d3d_surface =
@@ -215,7 +215,7 @@
HR(device->SetDepthStencilSurface(d3d_depth_surface));
current_surface_id_ = render_surface_id;
current_depth_surface_id_ = depth_stencil_id;
- return BufferSyncInterface::PARSE_NO_ERROR;
+ return BufferSyncInterface::kParseNoError;
}
void GAPID3D9::SetBackSurfaces() {
« no previous file with comments | « command_buffer/service/win/d3d9/geometry_d3d9.cc ('k') | command_buffer/service/win/d3d9/sampler_d3d9.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698