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

Side by Side Diff: content/common/gpu/client/gpu_channel_host.cc

Issue 458313002: Browser side OZONE_NATIVE_BUFFER allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 (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 #include "content/common/gpu/client/gpu_channel_host.h" 5 #include "content/common/gpu/client/gpu_channel_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess( 298 gfx::GpuMemoryBufferHandle GpuChannelHost::ShareGpuMemoryBufferToGpuProcess(
299 gfx::GpuMemoryBufferHandle source_handle) { 299 gfx::GpuMemoryBufferHandle source_handle) {
300 switch (source_handle.type) { 300 switch (source_handle.type) {
301 case gfx::SHARED_MEMORY_BUFFER: { 301 case gfx::SHARED_MEMORY_BUFFER: {
302 gfx::GpuMemoryBufferHandle handle; 302 gfx::GpuMemoryBufferHandle handle;
303 handle.type = gfx::SHARED_MEMORY_BUFFER; 303 handle.type = gfx::SHARED_MEMORY_BUFFER;
304 handle.handle = ShareToGpuProcess(source_handle.handle); 304 handle.handle = ShareToGpuProcess(source_handle.handle);
305 return handle; 305 return handle;
306 } 306 }
307 #if defined(USE_OZONE)
308 case gfx::OZONE_NATIVE_BUFFER:
309 return source_handle;
310 #endif
307 #if defined(OS_MACOSX) 311 #if defined(OS_MACOSX)
308 case gfx::IO_SURFACE_BUFFER: 312 case gfx::IO_SURFACE_BUFFER:
309 return source_handle; 313 return source_handle;
310 #endif 314 #endif
311 #if defined(OS_ANDROID) 315 #if defined(OS_ANDROID)
312 case gfx::SURFACE_TEXTURE_BUFFER: 316 case gfx::SURFACE_TEXTURE_BUFFER:
313 return source_handle; 317 return source_handle;
314 #endif 318 #endif
315 #if defined(USE_X11) 319 #if defined(USE_X11)
316 case gfx::X11_PIXMAP_BUFFER: 320 case gfx::X11_PIXMAP_BUFFER:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 406
403 listeners_.clear(); 407 listeners_.clear();
404 } 408 }
405 409
406 bool GpuChannelHost::MessageFilter::IsLost() const { 410 bool GpuChannelHost::MessageFilter::IsLost() const {
407 AutoLock lock(lock_); 411 AutoLock lock(lock_);
408 return lost_; 412 return lost_;
409 } 413 }
410 414
411 } // namespace content 415 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/common/gpu/client/gpu_memory_buffer_factory_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698