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

Unified Diff: ui/gl/gl_image_ozone_native_pixmap.cc

Issue 1263913002: FREEZE.unindexed Base URL: https://chromium.googlesource.com/chromium/src.git@textures3
Patch Set: Created 5 years, 4 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/gl/gl_image_ozone_native_pixmap.h ('k') | ui/gl/gl_image_ref_counted_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_ozone_native_pixmap.cc
diff --git a/ui/gl/gl_image_ozone_native_pixmap.cc b/ui/gl/gl_image_ozone_native_pixmap.cc
index 90cc2205fad8cfed77f22500de681c744b40dfcc..f1d33f3ab2c132a7c8cce46e4de7ee5911894ab4 100644
--- a/ui/gl/gl_image_ozone_native_pixmap.cc
+++ b/ui/gl/gl_image_ozone_native_pixmap.cc
@@ -78,14 +78,16 @@ GLImageOzoneNativePixmap::~GLImageOzoneNativePixmap() {
DCHECK(!pixmap_);
}
-bool GLImageOzoneNativePixmap::Initialize(ui::NativePixmap* pixmap,
- BufferFormat format) {
+bool GLImageOzoneNativePixmap::Initialize(
+ base::trace_event::GenericSharedMemoryId shared_memory_id,
+ ui::NativePixmap* pixmap,
+ GpuMemoryBuffer::Format format) {
DCHECK(!pixmap_);
bool result = true;
if (pixmap->GetEGLClientBuffer()) {
EGLint attrs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE};
- result = GLImageEGL::Initialize(EGL_NATIVE_PIXMAP_KHR,
+ result = GLImageEGL::Initialize(shared_memory_id, EGL_NATIVE_PIXMAP_KHR,
pixmap->GetEGLClientBuffer(), attrs);
} else if (pixmap->GetDmaBufFd() >= 0) {
if (!ValidInternalFormat(internalformat_)) {
@@ -113,8 +115,9 @@ bool GLImageOzoneNativePixmap::Initialize(ui::NativePixmap* pixmap,
EGL_DMA_BUF_PLANE0_PITCH_EXT,
pixmap->GetDmaBufPitch(),
EGL_NONE};
- result = GLImageEGL::Initialize(
- EGL_LINUX_DMA_BUF_EXT, static_cast<EGLClientBuffer>(nullptr), attrs);
+ result =
+ GLImageEGL::Initialize(shared_memory_id, EGL_LINUX_DMA_BUF_EXT,
+ static_cast<EGLClientBuffer>(nullptr), attrs);
}
if (result)
« no previous file with comments | « ui/gl/gl_image_ozone_native_pixmap.h ('k') | ui/gl/gl_image_ref_counted_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698