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

Unified Diff: ui/gl/gl_image_ozone_native_pixmap.cc

Issue 2039813002: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 ed721b9b265a9c304b3493789442f81e279132db..46100983f3e1565b29670766064f1ae746284ded 100644
--- a/ui/gl/gl_image_ozone_native_pixmap.cc
+++ b/ui/gl/gl_image_ozone_native_pixmap.cc
@@ -129,12 +129,17 @@ bool GLImageOzoneNativePixmap::Initialize(ui::NativePixmap* pixmap,
for (size_t plane = 0;
plane < gfx::NumberOfPlanesForBufferFormat(pixmap->GetBufferFormat());
++plane) {
+ uint64_t modifier = pixmap->GetDmaBufModifier(plane);
attrs.push_back(EGL_DMA_BUF_PLANE0_FD_EXT + plane * 3);
attrs.push_back(pixmap->GetDmaBufFd(plane));
attrs.push_back(EGL_DMA_BUF_PLANE0_OFFSET_EXT + plane * 3);
attrs.push_back(0);
attrs.push_back(EGL_DMA_BUF_PLANE0_PITCH_EXT + plane * 3);
attrs.push_back(pixmap->GetDmaBufPitch(plane));
+ attrs.push_back(EGL_LINUX_DRM_PLANE0_MODIFIER0_EXT + plane * 3);
+ attrs.push_back(modifier & 0xffffffff);
+ attrs.push_back(EGL_LINUX_DRM_PLANE0_MODIFIER1_EXT + plane * 3);
+ attrs.push_back(static_cast<uint32_t>((modifier >> 32) & 0xffffffff));
}
attrs.push_back(EGL_NONE);

Powered by Google App Engine
This is Rietveld 408576698