| 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 2531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 SetGLError(GL_INVALID_OPERATION, func_name, | 2542 SetGLError(GL_INVALID_OPERATION, func_name, |
| 2543 "invalid unpack params combination"); | 2543 "invalid unpack params combination"); |
| 2544 return; | 2544 return; |
| 2545 } | 2545 } |
| 2546 | 2546 |
| 2547 uint32_t size; | 2547 uint32_t size; |
| 2548 uint32_t unpadded_row_size; | 2548 uint32_t unpadded_row_size; |
| 2549 uint32_t padded_row_size; | 2549 uint32_t padded_row_size; |
| 2550 uint32_t skip_size; | 2550 uint32_t skip_size; |
| 2551 PixelStoreParams params = GetUnpackParameters(k2D); | 2551 PixelStoreParams params = GetUnpackParameters(k2D); |
| 2552 |
| 2552 if (!GLES2Util::ComputeImageDataSizesES3(width, height, 1, | 2553 if (!GLES2Util::ComputeImageDataSizesES3(width, height, 1, |
| 2553 format, type, | 2554 format, type, |
| 2554 params, | 2555 params, |
| 2555 &size, | 2556 &size, |
| 2556 &unpadded_row_size, | 2557 &unpadded_row_size, |
| 2557 &padded_row_size, | 2558 &padded_row_size, |
| 2558 &skip_size, | 2559 &skip_size, |
| 2559 nullptr)) { | 2560 nullptr)) { |
| 2560 SetGLError(GL_INVALID_VALUE, func_name, "image size too large"); | 2561 SetGLError(GL_INVALID_VALUE, func_name, "image size too large"); |
| 2561 return; | 2562 return; |
| (...skipping 4463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7025 cached_extensions_.clear(); | 7026 cached_extensions_.clear(); |
| 7026 } | 7027 } |
| 7027 | 7028 |
| 7028 // Include the auto-generated part of this file. We split this because it means | 7029 // Include the auto-generated part of this file. We split this because it means |
| 7029 // we can easily edit the non-auto generated parts right here in this file | 7030 // we can easily edit the non-auto generated parts right here in this file |
| 7030 // instead of having to edit some template or the code generator. | 7031 // instead of having to edit some template or the code generator. |
| 7031 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 7032 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 7032 | 7033 |
| 7033 } // namespace gles2 | 7034 } // namespace gles2 |
| 7034 } // namespace gpu | 7035 } // namespace gpu |
| OLD | NEW |