| OLD | NEW |
| 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 "gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.h" | 5 #include "gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "gpu/ipc/common/gpu_memory_buffer_support.h" | 10 #include "gpu/ipc/common/gpu_memory_buffer_support.h" |
| 11 #include "ui/gfx/buffer_format_util.h" | 11 #include "ui/gfx/buffer_format_util.h" |
| 12 #include "ui/gfx/native_pixmap.h" | 12 #include "ui/gfx/native_pixmap.h" |
| 13 #include "ui/ozone/public/client_native_pixmap_factory.h" | 13 #include "ui/ozone/public/client_native_pixmap_factory_ozone.h" |
| 14 #include "ui/ozone/public/ozone_platform.h" | 14 #include "ui/ozone/public/ozone_platform.h" |
| 15 #include "ui/ozone/public/surface_factory_ozone.h" | 15 #include "ui/ozone/public/surface_factory_ozone.h" |
| 16 | 16 |
| 17 namespace gpu { | 17 namespace gpu { |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 void FreeNativePixmapForTesting(scoped_refptr<ui::NativePixmap> native_pixmap) { | 20 void FreeNativePixmapForTesting(scoped_refptr<ui::NativePixmap> native_pixmap) { |
| 21 // Nothing to do here. |native_pixmap| will be freed when this function | 21 // Nothing to do here. |native_pixmap| will be freed when this function |
| 22 // returns and reference count drops to 0. | 22 // returns and reference count drops to 0. |
| 23 } | 23 } |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 handle.id = id_; | 131 handle.id = id_; |
| 132 if (fd_.is_valid()) { | 132 if (fd_.is_valid()) { |
| 133 handle.native_pixmap_handle.fds.emplace_back(fd_.get(), | 133 handle.native_pixmap_handle.fds.emplace_back(fd_.get(), |
| 134 false /* auto_close */); | 134 false /* auto_close */); |
| 135 } | 135 } |
| 136 handle.native_pixmap_handle.planes = planes_; | 136 handle.native_pixmap_handle.planes = planes_; |
| 137 return handle; | 137 return handle; |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace gpu | 140 } // namespace gpu |
| OLD | NEW |