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

Side by Side Diff: components/view_manager/gles2/command_buffer_driver.cc

Issue 1280513002: Add GenericSharedMemoryId and use w/ GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trackpools
Patch Set: remove "tracing" from name Created 5 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/view_manager/gles2/command_buffer_driver.h" 5 #include "components/view_manager/gles2/command_buffer_driver.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "components/view_manager/gles2/command_buffer_type_conversions.h" 10 #include "components/view_manager/gles2/command_buffer_type_conversions.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 249 }
250 250
251 if (type != gfx::SHARED_MEMORY_BUFFER) { 251 if (type != gfx::SHARED_MEMORY_BUFFER) {
252 NOTIMPLEMENTED(); 252 NOTIMPLEMENTED();
253 return; 253 return;
254 } 254 }
255 255
256 gfx::GpuMemoryBufferHandle gfx_handle; 256 gfx::GpuMemoryBufferHandle gfx_handle;
257 // TODO(jam): create mojo enum for this and converter 257 // TODO(jam): create mojo enum for this and converter
258 gfx_handle.type = static_cast<gfx::GpuMemoryBufferType>(type); 258 gfx_handle.type = static_cast<gfx::GpuMemoryBufferType>(type);
259 gfx_handle.id = id; 259 gfx_handle.id = gfx::GpuMemoryBufferId(id);
260 260
261 MojoPlatformHandle platform_handle; 261 MojoPlatformHandle platform_handle;
262 MojoResult extract_result = MojoExtractPlatformHandle( 262 MojoResult extract_result = MojoExtractPlatformHandle(
263 memory_handle.release().value(), 263 memory_handle.release().value(),
264 &platform_handle); 264 &platform_handle);
265 if (extract_result != MOJO_RESULT_OK) { 265 if (extract_result != MOJO_RESULT_OK) {
266 NOTREACHED(); 266 NOTREACHED();
267 return; 267 return;
268 } 268 }
269 269
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 void CommandBufferDriver::DestroyDecoder() { 334 void CommandBufferDriver::DestroyDecoder() {
335 if (decoder_) { 335 if (decoder_) {
336 bool have_context = decoder_->MakeCurrent(); 336 bool have_context = decoder_->MakeCurrent();
337 decoder_->Destroy(have_context); 337 decoder_->Destroy(have_context);
338 decoder_.reset(); 338 decoder_.reset();
339 } 339 }
340 } 340 }
341 341
342 } // namespace gles2 342 } // namespace gles2
OLDNEW
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.cc ('k') | components/view_manager/gles2/mojo_gpu_memory_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698