mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1688851 - Check if modifiers are valid before adding. r=stransky,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D103662
This commit is contained in:
parent
f5f947be77
commit
59052dc303
@ -116,6 +116,12 @@ static void dmabuf_modifiers(void* data,
|
||||
struct zwp_linux_dmabuf_v1* zwp_linux_dmabuf,
|
||||
uint32_t format, uint32_t modifier_hi,
|
||||
uint32_t modifier_lo) {
|
||||
// skip modifiers marked as invalid
|
||||
if (modifier_hi == (DRM_FORMAT_MOD_INVALID >> 32) &&
|
||||
modifier_lo == (DRM_FORMAT_MOD_INVALID & 0xffffffff)) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* device = static_cast<nsDMABufDevice*>(data);
|
||||
switch (format) {
|
||||
case GBM_FORMAT_ARGB8888:
|
||||
|
@ -20,6 +20,10 @@ extern mozilla::LazyLogModule gDmabufLog;
|
||||
# define LOGDMABUF(args)
|
||||
#endif /* MOZ_LOGGING */
|
||||
|
||||
#ifndef DRM_FORMAT_MOD_INVALID
|
||||
# define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
||||
|
@ -49,9 +49,6 @@ using namespace mozilla::widget;
|
||||
using namespace mozilla::gl;
|
||||
using namespace mozilla::layers;
|
||||
|
||||
#ifndef DRM_FORMAT_MOD_INVALID
|
||||
# define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1)
|
||||
#endif
|
||||
#define BUFFER_FLAGS 0
|
||||
|
||||
#ifndef GBM_BO_USE_TEXTURING
|
||||
|
Loading…
Reference in New Issue
Block a user