OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "mojo/gles2/command_buffer_client_impl.h" | 5 #include "mojo/gles2/command_buffer_client_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 if (!base::SharedMemory::IsHandleValid(handle)) | 118 if (!base::SharedMemory::IsHandleValid(handle)) |
119 return NULL; | 119 return NULL; |
120 | 120 |
121 *id = ++next_transfer_buffer_id_; | 121 *id = ++next_transfer_buffer_id_; |
122 | 122 |
123 AllocationScope scope; | 123 AllocationScope scope; |
124 command_buffer_->RegisterTransferBuffer( | 124 command_buffer_->RegisterTransferBuffer( |
125 *id, handle, static_cast<uint32_t>(size)); | 125 *id, handle, static_cast<uint32_t>(size)); |
126 | 126 |
127 scoped_refptr<gpu::Buffer> buffer = | 127 scoped_refptr<gpu::Buffer> buffer = |
128 new gpu::Buffer(shared_memory.Pass(), size); | 128 gpu::MakeBufferFromSharedMemory(shared_memory.Pass(), size); |
129 return buffer; | 129 return buffer; |
130 } | 130 } |
131 | 131 |
132 void CommandBufferClientImpl::DestroyTransferBuffer(int32 id) { | 132 void CommandBufferClientImpl::DestroyTransferBuffer(int32 id) { |
133 command_buffer_->DestroyTransferBuffer(id); | 133 command_buffer_->DestroyTransferBuffer(id); |
134 } | 134 } |
135 | 135 |
136 gpu::Capabilities CommandBufferClientImpl::GetCapabilities() { | 136 gpu::Capabilities CommandBufferClientImpl::GetCapabilities() { |
137 // TODO(piman) | 137 // TODO(piman) |
138 NOTIMPLEMENTED(); | 138 NOTIMPLEMENTED(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 return; | 237 return; |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 void CommandBufferClientImpl::DrawAnimationFrame() { | 241 void CommandBufferClientImpl::DrawAnimationFrame() { |
242 delegate_->DrawAnimationFrame(); | 242 delegate_->DrawAnimationFrame(); |
243 } | 243 } |
244 | 244 |
245 } // namespace gles2 | 245 } // namespace gles2 |
246 } // namespace mojo | 246 } // namespace mojo |
OLD | NEW |