GNOME Bugzilla – Bug 749856
d3dvideosink: avoid frame rendering while window handle is hidden
Last modified: 2015-06-10 13:04:15 UTC
Created attachment 303949 [details] [review] skip buffer render hidden window My application creates and embeds several instances (up to 20 per monitor) of video player using d3dvidesink as video sink plugin. When one instances is maximized to full screen, the application GUI almost freezes, forcing users to kill main process. Attached patch solves the problem skipping buffer rendering if a window hwnd is hidden by another one.
Review of attachment 303949 [details] [review]: Thanks for the patch, looks really good and useful :) Just some minor style comments, other than that this can be merged ::: sys/d3dvideosink/d3dhelpers.c @@ +1824,3 @@ +#define IWVTU_PARTIAL 2 +#define IWVTU_HIDDEN 3 +#define IWVTU_ERROR 4 Why IWVTU, and why not an enum? What about calling it e.g. WINDOW_VISIBILITY_FULL, _PARTIAL, etc? @@ +1833,3 @@ + HDC hdcWnd; + RECT rcWndClient; + RECT rcWndClip; We generally use lowercase variable names, with underscores to split words @@ +1873,3 @@ + uRetVal = IWVTU_FULL; + else + uRetVal = IWVTU_PARTIAL; I guess with a simple region we could also only render part of the frame relatively efficient? But not really important for a first step :)
Created attachment 304967 [details] [review] skip buffer render hidden window
commit 79f57e62dcf80f1448891f0292a1bcc7d53477fd Author: Fabio Cetrini <fcetrini@hotmail.com> Date: Wed Jun 10 15:03:31 2015 +0200 d3dvideosink: Avoid frame rendering while the window is completely hidden https://bugzilla.gnome.org/show_bug.cgi?id=749856