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/service/gpu_memory_buffer_factory_ozone_native_pixmap.h" | 5 #include "gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.h" |
6 | 6 |
7 #include "ui/gl/gl_image_ozone_native_pixmap.h" | 7 #include "ui/ozone/gl/gl_image_ozone_native_pixmap.h" |
8 #include "ui/ozone/public/client_native_pixmap.h" | 8 #include "ui/ozone/public/client_native_pixmap.h" |
9 #include "ui/ozone/public/client_native_pixmap_factory.h" | 9 #include "ui/ozone/public/client_native_pixmap_factory.h" |
10 #include "ui/ozone/public/native_pixmap.h" | 10 #include "ui/ozone/public/native_pixmap.h" |
11 #include "ui/ozone/public/ozone_platform.h" | 11 #include "ui/ozone/public/ozone_platform.h" |
12 #include "ui/ozone/public/surface_factory_ozone.h" | 12 #include "ui/ozone/public/surface_factory_ozone.h" |
13 | 13 |
14 namespace gpu { | 14 namespace gpu { |
15 | 15 |
16 GpuMemoryBufferFactoryOzoneNativePixmap:: | 16 GpuMemoryBufferFactoryOzoneNativePixmap:: |
17 GpuMemoryBufferFactoryOzoneNativePixmap() {} | 17 GpuMemoryBufferFactoryOzoneNativePixmap() {} |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 scoped_refptr<ui::NativePixmap> pixmap = | 61 scoped_refptr<ui::NativePixmap> pixmap = |
62 ui::OzonePlatform::GetInstance() | 62 ui::OzonePlatform::GetInstance() |
63 ->GetSurfaceFactoryOzone() | 63 ->GetSurfaceFactoryOzone() |
64 ->CreateNativePixmapFromHandle(surface_handle, size, format, | 64 ->CreateNativePixmapFromHandle(surface_handle, size, format, |
65 handle.native_pixmap_handle); | 65 handle.native_pixmap_handle); |
66 if (!pixmap.get()) { | 66 if (!pixmap.get()) { |
67 DLOG(ERROR) << "Failed to create pixmap from handle"; | 67 DLOG(ERROR) << "Failed to create pixmap from handle"; |
68 return nullptr; | 68 return nullptr; |
69 } | 69 } |
70 | 70 |
71 scoped_refptr<gl::GLImageOzoneNativePixmap> image( | 71 scoped_refptr<ui::GLImageOzoneNativePixmap> image( |
72 new gl::GLImageOzoneNativePixmap(size, internalformat)); | 72 new ui::GLImageOzoneNativePixmap(size, internalformat)); |
73 if (!image->Initialize(pixmap.get(), format)) { | 73 if (!image->Initialize(pixmap.get(), format)) { |
74 LOG(ERROR) << "Failed to create GLImage"; | 74 LOG(ERROR) << "Failed to create GLImage"; |
75 return nullptr; | 75 return nullptr; |
76 } | 76 } |
77 return image; | 77 return image; |
78 } | 78 } |
79 | 79 |
80 } // namespace gpu | 80 } // namespace gpu |
OLD | NEW |