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

Unified Diff: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc

Issue 858653002: vaapi plumbing to allow hardware video overlays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittests build Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
diff --git a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
index 263fdc34f99d81de24aeefb6773d3f99b0d8eed9..9b463b9ccc4957c0fd7bc92214212fcda99f6a31 100644
--- a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
+++ b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
@@ -161,10 +161,19 @@ GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer(
}
pixmap = it->second.get();
}
+ return CreateImageForPixmap(pixmap, size, format, internalformat);
+}
+
+scoped_refptr<gfx::GLImage>
+GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForPixmap(
+ scoped_refptr<NativePixmap> pixmap,
+ const gfx::Size& size,
+ gfx::GpuMemoryBuffer::Format format,
+ unsigned internalformat) {
if (pixmap->GetEGLClientBuffer()) {
scoped_refptr<GLImageOzoneNativePixmap> image =
new GLImageOzoneNativePixmap(size);
- if (!image->Initialize(pixmap)) {
+ if (!image->Initialize(pixmap.get())) {
return scoped_refptr<gfx::GLImage>();
}
return image;
@@ -172,7 +181,7 @@ GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer(
if (pixmap->GetDmaBufFd() > 0) {
scoped_refptr<GLImageOzoneNativePixmapDmaBuf> image =
new GLImageOzoneNativePixmapDmaBuf(size, internalformat);
- if (!image->Initialize(pixmap, format)) {
+ if (!image->Initialize(pixmap.get(), format)) {
return scoped_refptr<gfx::GLImage>();
}
return image;
« no previous file with comments | « ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698