Chromium Code Reviews| 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 977f02e424ff06f389098e1a4094bc4dfa6da31a..b4862c14d77946076560bcfdd28e255d527e7ef0 100644 |
| --- a/ui/gl/gl_image_ozone_native_pixmap.cc |
| +++ b/ui/gl/gl_image_ozone_native_pixmap.cc |
| @@ -140,6 +140,7 @@ 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 < pixmap->GetDmaBufFdCount() ? plane : 0)); |
| @@ -147,6 +148,10 @@ bool GLImageOzoneNativePixmap::Initialize(ui::NativePixmap* pixmap, |
| attrs.push_back(pixmap->GetDmaBufOffset(plane)); |
| 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)); |
|
Daniele Castagna
2016/06/15 03:50:20
Is the & 0xffffffff really needed after shifting?
vinceh
2016/06/15 04:35:18
Will remove & 0xffffffff and keep the cast.
|
| } |
| attrs.push_back(EGL_NONE); |