summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 14:14:54 +0000
committerkaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 14:14:54 +0000
commitb10777795a1937981130a8f20ffa2a0996ac0df4 (patch)
tree272bee2b4fed5f09a90d261517b20dda70656763 /gpu
parent154b5e1fc77162eeca243bf9b24b81defdb31db2 (diff)
downloadchromium_src-b10777795a1937981130a8f20ffa2a0996ac0df4.zip
chromium_src-b10777795a1937981130a8f20ffa2a0996ac0df4.tar.gz
chromium_src-b10777795a1937981130a8f20ffa2a0996ac0df4.tar.bz2
Fix the indentation of a a few GLImage methods
BUG= Review URL: https://chromiumcodereview.appspot.com/16760004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc102
1 files changed, 49 insertions, 53 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 37c57b5..b784040 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -3724,18 +3724,16 @@ GLuint GLES2Implementation::CreateImageCHROMIUM(
}
void GLES2Implementation::DestroyImageCHROMIUMHelper(GLuint image_id) {
- GpuMemoryBuffer* gpu_buffer =
- gpu_memory_buffer_tracker_->GetBuffer(image_id);
- if (!gpu_buffer) {
- SetGLError(GL_INVALID_OPERATION, "glDestroyImageCHROMIUM",
- "invalid image");
- return;
- }
+ GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(image_id);
+ if (!gpu_buffer) {
+ SetGLError(GL_INVALID_OPERATION, "glDestroyImageCHROMIUM", "invalid image");
+ return;
+ }
- // Flush the command stream to make sure all pending commands
- // that may refer to the image_id are executed on the service side.
- helper_->CommandBufferHelper::Flush();
- gpu_memory_buffer_tracker_->RemoveBuffer(image_id);
+ // Flush the command stream to make sure all pending commands
+ // that may refer to the image_id are executed on the service side.
+ helper_->CommandBufferHelper::Flush();
+ gpu_memory_buffer_tracker_->RemoveBuffer(image_id);
}
void GLES2Implementation::DestroyImageCHROMIUM(GLuint image_id) {
@@ -3747,18 +3745,17 @@ void GLES2Implementation::DestroyImageCHROMIUM(GLuint image_id) {
}
void GLES2Implementation::UnmapImageCHROMIUMHelper(GLuint image_id) {
- GpuMemoryBuffer* gpu_buffer =
- gpu_memory_buffer_tracker_->GetBuffer(image_id);
- if (!gpu_buffer) {
- SetGLError(GL_INVALID_OPERATION, "glUnmapImageCHROMIUM", "invalid image");
- return;
- }
+ GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(image_id);
+ if (!gpu_buffer) {
+ SetGLError(GL_INVALID_OPERATION, "glUnmapImageCHROMIUM", "invalid image");
+ return;
+ }
- if (!gpu_buffer->IsMapped()) {
- SetGLError(GL_INVALID_OPERATION, "glUnmapImageCHROMIUM", "not mapped");
- return;
- }
- gpu_buffer->Unmap();
+ if (!gpu_buffer->IsMapped()) {
+ SetGLError(GL_INVALID_OPERATION, "glUnmapImageCHROMIUM", "not mapped");
+ return;
+ }
+ gpu_buffer->Unmap();
}
void GLES2Implementation::UnmapImageCHROMIUM(GLuint image_id) {
@@ -3772,37 +3769,36 @@ void GLES2Implementation::UnmapImageCHROMIUM(GLuint image_id) {
void* GLES2Implementation::MapImageCHROMIUMHelper(GLuint image_id,
GLenum access) {
- GpuMemoryBuffer* gpu_buffer =
- gpu_memory_buffer_tracker_->GetBuffer(image_id);
- if (!gpu_buffer) {
- SetGLError(GL_INVALID_OPERATION, "glMapImageCHROMIUM", "invalid image");
- return NULL;
- }
- GpuMemoryBuffer::AccessMode mode;
- switch(access) {
- case GL_WRITE_ONLY:
- mode = GpuMemoryBuffer::WRITE_ONLY;
- break;
- case GL_READ_ONLY:
- mode = GpuMemoryBuffer::READ_ONLY;
- break;
- case GL_READ_WRITE:
- mode = GpuMemoryBuffer::READ_WRITE;
- break;
- default:
- SetGLError(GL_INVALID_ENUM, "glMapImageCHROMIUM",
- "invalid GPU access mode");
- return NULL;
- }
-
- if (gpu_buffer->IsMapped()) {
- SetGLError(GL_INVALID_OPERATION, "glMapImageCHROMIUM", "already mapped");
- return NULL;
- }
-
- void* mapped_buffer = NULL;
- gpu_buffer->Map(mode, &mapped_buffer);
- return mapped_buffer;
+ GpuMemoryBuffer* gpu_buffer = gpu_memory_buffer_tracker_->GetBuffer(image_id);
+ if (!gpu_buffer) {
+ SetGLError(GL_INVALID_OPERATION, "glMapImageCHROMIUM", "invalid image");
+ return NULL;
+ }
+ GpuMemoryBuffer::AccessMode mode;
+ switch(access) {
+ case GL_WRITE_ONLY:
+ mode = GpuMemoryBuffer::WRITE_ONLY;
+ break;
+ case GL_READ_ONLY:
+ mode = GpuMemoryBuffer::READ_ONLY;
+ break;
+ case GL_READ_WRITE:
+ mode = GpuMemoryBuffer::READ_WRITE;
+ break;
+ default:
+ SetGLError(GL_INVALID_ENUM, "glMapImageCHROMIUM",
+ "invalid GPU access mode");
+ return NULL;
+ }
+
+ if (gpu_buffer->IsMapped()) {
+ SetGLError(GL_INVALID_OPERATION, "glMapImageCHROMIUM", "already mapped");
+ return NULL;
+ }
+
+ void* mapped_buffer = NULL;
+ gpu_buffer->Map(mode, &mapped_buffer);
+ return mapped_buffer;
}
void* GLES2Implementation::MapImageCHROMIUM(