diff options
Diffstat (limited to 'ui/gl/gl_image_shared_memory.cc')
-rw-r--r-- | ui/gl/gl_image_shared_memory.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/gl/gl_image_shared_memory.cc b/ui/gl/gl_image_shared_memory.cc index d9e31a7..363ebf5 100644 --- a/ui/gl/gl_image_shared_memory.cc +++ b/ui/gl/gl_image_shared_memory.cc @@ -18,6 +18,9 @@ bool SizeInBytes(const gfx::Size& size, if (size.IsEmpty()) return false; + if (!GLImageMemory::ValidSize(size, format)) + return false; + size_t stride_in_bytes = 0; if (!GLImageMemory::StrideInBytes(size.width(), format, &stride_in_bytes)) return false; |