Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Side by Side Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 213353005: Refactor gpu::Buffer to allow different types of backing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix pointer alignment in tests Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/transfer_buffer_manager_unittest.cc ('k') | mojo/services/gles2/command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698