| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
| (...skipping 5504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5515 if (height <= 0) { | 5515 if (height <= 0) { |
| 5516 SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "height <= 0"); | 5516 SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "height <= 0"); |
| 5517 return 0; | 5517 return 0; |
| 5518 } | 5518 } |
| 5519 | 5519 |
| 5520 if (!ValidImageFormat(internalformat, capabilities_)) { | 5520 if (!ValidImageFormat(internalformat, capabilities_)) { |
| 5521 SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "invalid format"); | 5521 SetGLError(GL_INVALID_VALUE, "glCreateImageCHROMIUM", "invalid format"); |
| 5522 return 0; | 5522 return 0; |
| 5523 } | 5523 } |
| 5524 | 5524 |
| 5525 ShallowFlushCHROMIUM(); | |
| 5526 int32_t image_id = | 5525 int32_t image_id = |
| 5527 gpu_control_->CreateImage(buffer, width, height, internalformat); | 5526 gpu_control_->CreateImage(buffer, width, height, internalformat); |
| 5528 if (image_id < 0) { | 5527 if (image_id < 0) { |
| 5529 SetGLError(GL_OUT_OF_MEMORY, "glCreateImageCHROMIUM", "image_id < 0"); | 5528 SetGLError(GL_OUT_OF_MEMORY, "glCreateImageCHROMIUM", "image_id < 0"); |
| 5530 return 0; | 5529 return 0; |
| 5531 } | 5530 } |
| 5532 return image_id; | 5531 return image_id; |
| 5533 } | 5532 } |
| 5534 | 5533 |
| 5535 GLuint GLES2Implementation::CreateImageCHROMIUM(ClientBuffer buffer, | 5534 GLuint GLES2Implementation::CreateImageCHROMIUM(ClientBuffer buffer, |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6362 CheckGLError(); | 6361 CheckGLError(); |
| 6363 } | 6362 } |
| 6364 | 6363 |
| 6365 // Include the auto-generated part of this file. We split this because it means | 6364 // Include the auto-generated part of this file. We split this because it means |
| 6366 // we can easily edit the non-auto generated parts right here in this file | 6365 // we can easily edit the non-auto generated parts right here in this file |
| 6367 // instead of having to edit some template or the code generator. | 6366 // instead of having to edit some template or the code generator. |
| 6368 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 6367 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 6369 | 6368 |
| 6370 } // namespace gles2 | 6369 } // namespace gles2 |
| 6371 } // namespace gpu | 6370 } // namespace gpu |
| OLD | NEW |