| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/gpu/browser_native_pixmap_manager_ozone.h" | 5 #include "content/browser/gpu/browser_native_pixmap_manager_ozone.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "base/posix/eintr_wrapper.h" | 8 #include "base/posix/eintr_wrapper.h" |
| 9 #include "content/common/gpu/native_pixmap_manager_ozone_messages.h" | 9 #include "content/common/gpu/native_pixmap_manager_ozone_messages.h" |
| 10 #include "content/public/browser/browser_message_filter.h" | 10 #include "content/public/browser/browser_message_filter.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 110 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 111 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); | 111 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); |
| 112 pool->PostWorkerTask( | 112 pool->PostWorkerTask( |
| 113 FROM_HERE, base::Bind(&DupVirtualDeviceFd, device_fd_.fd, callback)); | 113 FROM_HERE, base::Bind(&DupVirtualDeviceFd, device_fd_.fd, callback)); |
| 114 } | 114 } |
| 115 | 115 |
| 116 BrowserMessageFilter* BrowserNativePixmapManager::CreateMessageFilter() { | 116 BrowserMessageFilter* BrowserNativePixmapManager::CreateMessageFilter() { |
| 117 return new BrowserNativePixmapManagerMessageFilter(this); | 117 return new BrowserNativePixmapManagerMessageFilter(this); |
| 118 } | 118 } |
| 119 | 119 |
| 120 scoped_refptr<ui::NativePixmap> |
| 121 BrowserNativePixmapManager::CreateFromFileDescriptor( |
| 122 base::FileDescriptor handle, |
| 123 gfx::Size size, |
| 124 ui::SurfaceFactoryOzone::BufferFormat format, |
| 125 ui::SurfaceFactoryOzone::BufferUsage usage) { |
| 126 return pixmap_manager_->CreateFromFileDescriptor(handle, size, format, usage); |
| 127 } |
| 128 |
| 120 } // namespace content | 129 } // namespace content |
| OLD | NEW |