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 "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <queue> | 11 #include <queue> |
12 #include <GLES2/gl2ext.h> | 12 #include <GLES2/gl2ext.h> |
13 #include "../client/mapped_memory.h" | 13 #include "../client/mapped_memory.h" |
14 #include "../client/program_info_manager.h" | 14 #include "../client/program_info_manager.h" |
15 #include "../client/query_tracker.h" | 15 #include "../client/query_tracker.h" |
16 #include "../client/transfer_buffer.h" | 16 #include "../client/transfer_buffer.h" |
17 #include "../common/gles2_cmd_utils.h" | 17 #include "../common/gles2_cmd_utils.h" |
18 #include "../common/trace_event.h" | 18 #include "../common/trace_event.h" |
19 | 19 |
20 #if defined(__native_client__) && !defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) | 20 #if defined(__native_client__) && !defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) |
21 #define GLES2_SUPPORT_CLIENT_SIDE_ARRAYS | 21 #define GLES2_SUPPORT_CLIENT_SIDE_ARRAYS |
22 #endif | 22 #endif |
23 | 23 |
24 #if defined(GPU_CLIENT_DEBUG) | 24 #if defined(GPU_CLIENT_DEBUG) |
25 #include "ui/gfx/gl/gl_switches.h" | 25 #include "ui/gl/gl_switches.h" |
26 #include "base/command_line.h" | 26 #include "base/command_line.h" |
27 #endif | 27 #endif |
28 | 28 |
29 namespace gpu { | 29 namespace gpu { |
30 namespace gles2 { | 30 namespace gles2 { |
31 | 31 |
32 // A 32-bit and 64-bit compatible way of converting a pointer to a GLuint. | 32 // A 32-bit and 64-bit compatible way of converting a pointer to a GLuint. |
33 static GLuint ToGLuint(const void* ptr) { | 33 static GLuint ToGLuint(const void* ptr) { |
34 return static_cast<GLuint>(reinterpret_cast<size_t>(ptr)); | 34 return static_cast<GLuint>(reinterpret_cast<size_t>(ptr)); |
35 } | 35 } |
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3154 helper_->GenMailboxCHROMIUM(kResultBucketId); | 3154 helper_->GenMailboxCHROMIUM(kResultBucketId); |
3155 | 3155 |
3156 std::vector<GLbyte> result; | 3156 std::vector<GLbyte> result; |
3157 GetBucketContents(kResultBucketId, &result); | 3157 GetBucketContents(kResultBucketId, &result); |
3158 | 3158 |
3159 std::copy(result.begin(), result.end(), mailbox); | 3159 std::copy(result.begin(), result.end(), mailbox); |
3160 } | 3160 } |
3161 | 3161 |
3162 } // namespace gles2 | 3162 } // namespace gles2 |
3163 } // namespace gpu | 3163 } // namespace gpu |
OLD | NEW |