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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |