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

Unified Diff: command_buffer/service/cross/gl/texture_gl.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/cross/gl/sampler_gl.cc ('k') | command_buffer/service/cross/mocks.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: command_buffer/service/cross/gl/texture_gl.cc
===================================================================
--- command_buffer/service/cross/gl/texture_gl.cc (revision 26638)
+++ command_buffer/service/cross/gl/texture_gl.cc (working copy)
@@ -564,8 +564,8 @@
// Dirty effect, because this texture id may be used.
DirtyEffect();
return textures_.Destroy(id) ?
- BufferSyncInterface::PARSE_NO_ERROR :
- BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ BufferSyncInterface::kParseNoError :
+ BufferSyncInterface::kParseInvalidArguments;
}
// Creates a 2D texture resource.
@@ -578,11 +578,11 @@
unsigned int flags) {
Texture2DGL *texture = Texture2DGL::Create(width, height, levels, format,
flags);
- if (!texture) return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ if (!texture) return BufferSyncInterface::kParseInvalidArguments;
// Dirty effect, because this texture id may be used.
DirtyEffect();
textures_.Assign(id, texture);
- return BufferSyncInterface::PARSE_NO_ERROR;
+ return BufferSyncInterface::kParseNoError;
}
// Creates a 3D texture resource.
@@ -596,11 +596,11 @@
unsigned int flags) {
Texture3DGL *texture = Texture3DGL::Create(width, height, depth, levels,
format, flags);
- if (!texture) return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ if (!texture) return BufferSyncInterface::kParseInvalidArguments;
// Dirty effect, because this texture id may be used.
DirtyEffect();
textures_.Assign(id, texture);
- return BufferSyncInterface::PARSE_NO_ERROR;
+ return BufferSyncInterface::kParseNoError;
}
// Creates a cube map texture resource.
@@ -611,11 +611,11 @@
texture::Format format,
unsigned int flags) {
TextureCubeGL *texture = TextureCubeGL::Create(side, levels, format, flags);
- if (!texture) return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ if (!texture) return BufferSyncInterface::kParseInvalidArguments;
// Dirty effect, because this texture id may be used.
DirtyEffect();
textures_.Assign(id, texture);
- return BufferSyncInterface::PARSE_NO_ERROR;
+ return BufferSyncInterface::kParseNoError;
}
// Copies the data into a texture resource.
@@ -635,15 +635,15 @@
const void *data) {
TextureGL *texture = textures_.Get(id);
if (!texture)
- return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ return BufferSyncInterface::kParseInvalidArguments;
Volume volume = {x, y, z, width, height, depth};
// Dirty effect: SetData may need to call glBindTexture which will mess up the
// sampler parameters.
DirtyEffect();
return texture->SetData(volume, level, face, row_pitch, slice_pitch,
size, data) ?
- BufferSyncInterface::PARSE_NO_ERROR :
- BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ BufferSyncInterface::kParseNoError :
+ BufferSyncInterface::kParseInvalidArguments;
}
// Copies the data from a texture resource.
@@ -663,15 +663,15 @@
void *data) {
TextureGL *texture = textures_.Get(id);
if (!texture)
- return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ return BufferSyncInterface::kParseInvalidArguments;
Volume volume = {x, y, z, width, height, depth};
// Dirty effect: GetData may need to call glBindTexture which will mess up the
// sampler parameters.
DirtyEffect();
return texture->GetData(volume, level, face, row_pitch, slice_pitch,
size, data) ?
- BufferSyncInterface::PARSE_NO_ERROR :
- BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ BufferSyncInterface::kParseNoError :
+ BufferSyncInterface::kParseInvalidArguments;
}
} // namespace command_buffer
« no previous file with comments | « command_buffer/service/cross/gl/sampler_gl.cc ('k') | command_buffer/service/cross/mocks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698