GNOME Bugzilla – Bug 762639
shaped-texture: Invalidate mask texture when main texture changes size
Last modified: 2016-03-10 15:16:48 UTC
Trying to reproduce bug 762618 I got this crash instead: 0 0x00007f5dc2163501 in cogl_texture_get_height (texture=0x0) at cogl-texture.c:216 1 0x00007f5dc6b40379 in meta_shaped_texture_get_image (stex=0x2c4a380, clip=0x7ffe26462e60) at compositor/meta-shaped-texture.c:869 2 0x00007f5dcac448ce in shell_util_get_content_for_window_actor (window_actor=0x2c48400, window_rect=0x22348c0) at shell-util.c:448 3 0x00007f5dbe0e7d30 in ffi_call_unix64 () from /lib64/libffi.so.6 4 0x00007f5dbe0e779b in ffi_call () from /lib64/libffi.so.6 5 0x00007f5dc996b7cb in ?? () from /lib64/libgjs.so.0 6 0x00007f5dc996ccc5 in ?? () from /lib64/libgjs.so.0 7 0x00007f5dc929625c in js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) () from /lib64/libmozjs-24.so 8 0x00007f5dc929662b in js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) () from /lib64/libmozjs-24.so 9 0x00007f5dc94f0d0d in js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) () from /lib64/libmozjs-24.so 10 0x00007f5dcb14aaa2 in ?? () 11 0x0000000000000000 in ?? ()
Created attachment 322276 [details] [review] shaped-texture: Invalidate mask texture when main texture changes size We currently rely only on MetaWindowActor to update the mask texture. This isn't good enough since we might get asked to use the mask (e.g. via meta_shaped_texture_get_image() ) after having a new texture size but before MetaWindowActor decides to update the the mask in which case we might crash since cogl_texture_new_from_sub_texture() might fail with an early return such as Cogl-CRITICAL **: cogl_sub_texture_new: assertion 'sub_x + sub_width <= next_width' failed
*** Bug 763458 has been marked as a duplicate of this bug. ***
Review of attachment 322276 [details] [review]: Seems reasonable. I suppose the mask texture will be regenerated before the next time the window is painted.
Yeap, attachment 322276 [details] [review] fixes the issue for me as well! Thanks!
Attachment 322276 [details] pushed as ca1b438 - shaped-texture: Invalidate mask texture when main texture changes size