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

Side by Side Diff: gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.cc

Issue 2102443003: Break //ui/gl/ dependency on //ui/ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gl_bindings
Patch Set: Rebase again. Created 4 years, 5 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
« no previous file with comments | « gpu/gpu_ipc_service.gypi ('k') | media/gpu/vaapi_drm_picture.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/gpu_ipc_service.gypi ('k') | media/gpu/vaapi_drm_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698