OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 emluate GLES2 over command buffers. | 5 // A class to emluate 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 // TODO(gman): remove when all functions have been implemented. | 8 // TODO(gman): remove when all functions have been implemented. |
9 #include "gpu/command_buffer/client/gles2_implementation_gen.h" | 9 #include "gpu/command_buffer/client/gles2_implementation_gen.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
11 | 11 |
12 namespace gpu { | 12 namespace gpu { |
13 namespace gles2 { | 13 namespace gles2 { |
14 | 14 |
15 // A 32-bit and 64-bit compatible way of converting a pointer to a GLuint. | 15 // A 32-bit and 64-bit compatible way of converting a pointer to a GLuint. |
16 static GLuint ToGLuint(const void* ptr) { | 16 static GLuint ToGLuint(const void* ptr) { |
17 return static_cast<GLuint>(reinterpret_cast<size_t>(ptr)); | 17 return static_cast<GLuint>(reinterpret_cast<size_t>(ptr)); |
18 } | 18 } |
19 | 19 |
| 20 #if !defined(COMPILER_MSVC) |
| 21 const size_t GLES2Implementation::kMaxSizeOfSimpleResult; |
| 22 #endif |
| 23 |
20 GLES2Implementation::GLES2Implementation( | 24 GLES2Implementation::GLES2Implementation( |
21 GLES2CmdHelper* helper, | 25 GLES2CmdHelper* helper, |
22 size_t transfer_buffer_size, | 26 size_t transfer_buffer_size, |
23 void* transfer_buffer, | 27 void* transfer_buffer, |
24 int32 transfer_buffer_id) | 28 int32 transfer_buffer_id) |
25 : util_(0), // TODO(gman): Get real number of compressed texture formats. | 29 : util_(0), // TODO(gman): Get real number of compressed texture formats. |
26 helper_(helper), | 30 helper_(helper), |
27 transfer_buffer_(transfer_buffer_size, helper, transfer_buffer), | 31 transfer_buffer_(transfer_buffer_size, helper, transfer_buffer), |
28 transfer_buffer_id_(transfer_buffer_id), | 32 transfer_buffer_id_(transfer_buffer_id), |
29 pack_alignment_(4), | 33 pack_alignment_(4), |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 251 } |
248 ++yoffset; | 252 ++yoffset; |
249 source += padded_row_size; | 253 source += padded_row_size; |
250 } | 254 } |
251 } | 255 } |
252 } | 256 } |
253 | 257 |
254 | 258 |
255 } // namespace gles2 | 259 } // namespace gles2 |
256 } // namespace gpu | 260 } // namespace gpu |
OLD | NEW |