diff options
author | Keith Packard <keithp@keithp.com> | 2015-01-11 08:01:08 +1300 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-01-11 08:01:08 +1300 |
commit | 7700c3dde205032352aaa75c42853ecb124d744c (patch) | |
tree | bd81d861aae712d04bc78224cf0a1bb609ad26da | |
parent | 5f2e8ac51ccbf7c02f25c8cb7617df0238418cd1 (diff) |
randr: Allow drivers to force per-CRTC shadow scanoutforce-randr-shadow
A driver which wants to use a shadow scanout buffer to improve
software rendering performance currently uses miext/shadow. That
conflicts with using the RandR shadowing for transform support.
This patch adds the ability to force the RandR shadow path to always
be used on a per-CRTC basis, allowing drivers to have the benefits of
a shadow frame buffer *and* RandR transformations at the same time.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.h | 5 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86Rotate.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 692bf40b9..f6ab4bacd 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -366,6 +366,11 @@ struct _xf86Crtc { Bool shadowClear; /** + * Force the shadow + */ + Bool forceShadow; + + /** * Indicates that the driver is handling the transform, so the shadow * surface should be disabled. The driver writes this field before calling * xf86CrtcRotate to indicate that it is handling the transform (including diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index 9c00a443f..f6bf531d2 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -376,7 +376,9 @@ xf86CrtcRotate(xf86CrtcPtr crtc) &crtc_to_fb, &f_crtc_to_fb, &f_fb_to_crtc) && - xf86CrtcFitsScreen(crtc, &f_crtc_to_fb)) { + !crtc->forceShadow && + xf86CrtcFitsScreen(crtc, &f_crtc_to_fb)) + { /* * If the untranslated transformation is the identity, * disable the shadow buffer |