| 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> | 9 #include <GLES2/gl2ext.h> |
| 10 #include <GLES2/gl2extchromium.h> | 10 #include <GLES2/gl2extchromium.h> |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 ss << std::hex << this; | 128 ss << std::hex << this; |
| 129 this_in_hex_ = ss.str(); | 129 this_in_hex_ = ss.str(); |
| 130 | 130 |
| 131 GPU_CLIENT_LOG_CODE_BLOCK({ | 131 GPU_CLIENT_LOG_CODE_BLOCK({ |
| 132 debug_ = CommandLine::ForCurrentProcess()->HasSwitch( | 132 debug_ = CommandLine::ForCurrentProcess()->HasSwitch( |
| 133 switches::kEnableGPUClientLogging); | 133 switches::kEnableGPUClientLogging); |
| 134 }); | 134 }); |
| 135 | 135 |
| 136 share_group_ = | 136 share_group_ = |
| 137 (share_group ? share_group : new ShareGroup(bind_generates_resource)); | 137 (share_group ? share_group : new ShareGroup(bind_generates_resource)); |
| 138 DCHECK(share_group_->bind_generates_resource() == bind_generates_resource); |
| 138 | 139 |
| 139 memset(&reserved_ids_, 0, sizeof(reserved_ids_)); | 140 memset(&reserved_ids_, 0, sizeof(reserved_ids_)); |
| 140 } | 141 } |
| 141 | 142 |
| 142 bool GLES2Implementation::Initialize( | 143 bool GLES2Implementation::Initialize( |
| 143 unsigned int starting_transfer_buffer_size, | 144 unsigned int starting_transfer_buffer_size, |
| 144 unsigned int min_transfer_buffer_size, | 145 unsigned int min_transfer_buffer_size, |
| 145 unsigned int max_transfer_buffer_size, | 146 unsigned int max_transfer_buffer_size, |
| 146 unsigned int mapped_memory_limit) { | 147 unsigned int mapped_memory_limit) { |
| 147 TRACE_EVENT0("gpu", "GLES2Implementation::Initialize"); | 148 TRACE_EVENT0("gpu", "GLES2Implementation::Initialize"); |
| (...skipping 4041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4189 return true; | 4190 return true; |
| 4190 } | 4191 } |
| 4191 | 4192 |
| 4192 // Include the auto-generated part of this file. We split this because it means | 4193 // Include the auto-generated part of this file. We split this because it means |
| 4193 // we can easily edit the non-auto generated parts right here in this file | 4194 // we can easily edit the non-auto generated parts right here in this file |
| 4194 // instead of having to edit some template or the code generator. | 4195 // instead of having to edit some template or the code generator. |
| 4195 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 4196 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 4196 | 4197 |
| 4197 } // namespace gles2 | 4198 } // namespace gles2 |
| 4198 } // namespace gpu | 4199 } // namespace gpu |
| OLD | NEW |