| 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/gl2ext.h> |
| 10 #include <GLES2/gl2extchromium.h> |
| 9 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <limits> |
| 10 #include <map> | 13 #include <map> |
| 11 #include <queue> | 14 #include <queue> |
| 12 #include <set> | 15 #include <set> |
| 13 #include <limits> | |
| 14 #include <sstream> | 16 #include <sstream> |
| 15 #include <string> | 17 #include <string> |
| 16 #include <GLES2/gl2ext.h> | |
| 17 #include <GLES2/gl2extchromium.h> | |
| 18 #include "base/bind.h" | 18 #include "base/bind.h" |
| 19 #include "gpu/command_buffer/client/buffer_tracker.h" | 19 #include "gpu/command_buffer/client/buffer_tracker.h" |
| 20 #include "gpu/command_buffer/client/gpu_control.h" |
| 20 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h" | 21 #include "gpu/command_buffer/client/gpu_memory_buffer_tracker.h" |
| 21 #include "gpu/command_buffer/client/program_info_manager.h" | 22 #include "gpu/command_buffer/client/program_info_manager.h" |
| 22 #include "gpu/command_buffer/client/query_tracker.h" | 23 #include "gpu/command_buffer/client/query_tracker.h" |
| 23 #include "gpu/command_buffer/client/transfer_buffer.h" | 24 #include "gpu/command_buffer/client/transfer_buffer.h" |
| 24 #include "gpu/command_buffer/client/vertex_array_object_manager.h" | 25 #include "gpu/command_buffer/client/vertex_array_object_manager.h" |
| 25 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 26 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 26 #include "gpu/command_buffer/common/gpu_control.h" | |
| 27 #include "gpu/command_buffer/common/trace_event.h" | 27 #include "gpu/command_buffer/common/trace_event.h" |
| 28 #include "ui/gfx/gpu_memory_buffer.h" | 28 #include "ui/gfx/gpu_memory_buffer.h" |
| 29 | 29 |
| 30 #if defined(__native_client__) && !defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) | 30 #if defined(__native_client__) && !defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) |
| 31 #define GLES2_SUPPORT_CLIENT_SIDE_ARRAYS | 31 #define GLES2_SUPPORT_CLIENT_SIDE_ARRAYS |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 #if defined(GPU_CLIENT_DEBUG) | 34 #if defined(GPU_CLIENT_DEBUG) |
| 35 #include "base/command_line.h" |
| 35 #include "ui/gl/gl_switches.h" | 36 #include "ui/gl/gl_switches.h" |
| 36 #include "base/command_line.h" | |
| 37 #endif | 37 #endif |
| 38 | 38 |
| 39 namespace gpu { | 39 namespace gpu { |
| 40 namespace gles2 { | 40 namespace gles2 { |
| 41 | 41 |
| 42 // A 32-bit and 64-bit compatible way of converting a pointer to a GLuint. | 42 // A 32-bit and 64-bit compatible way of converting a pointer to a GLuint. |
| 43 static GLuint ToGLuint(const void* ptr) { | 43 static GLuint ToGLuint(const void* ptr) { |
| 44 return static_cast<GLuint>(reinterpret_cast<size_t>(ptr)); | 44 return static_cast<GLuint>(reinterpret_cast<size_t>(ptr)); |
| 45 } | 45 } |
| 46 | 46 |
| (...skipping 4090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4137 return true; | 4137 return true; |
| 4138 } | 4138 } |
| 4139 | 4139 |
| 4140 // Include the auto-generated part of this file. We split this because it means | 4140 // Include the auto-generated part of this file. We split this because it means |
| 4141 // we can easily edit the non-auto generated parts right here in this file | 4141 // we can easily edit the non-auto generated parts right here in this file |
| 4142 // instead of having to edit some template or the code generator. | 4142 // instead of having to edit some template or the code generator. |
| 4143 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 4143 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 4144 | 4144 |
| 4145 } // namespace gles2 | 4145 } // namespace gles2 |
| 4146 } // namespace gpu | 4146 } // namespace gpu |
| OLD | NEW |