Hi, On Tue, 2009-08-18 at 19:57 +0100, Andre DRASZIK wrote:
> another patch - see subject... > > It won't apply cleanly without the AYUV patch from my previous mail (but > I'm not saying that the AYUV patch introduced this bug). Looks correct to me. The patch did indeed not apply, but I have applied it manually in my tree. Attached is the resolved patch. I will push this change as soon of the core developers gives his OK. Sven
>From 5e8df520e8810b12a41f4817dc3910d1e5313ae2 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Andr=C3=A9=20Draszik?= <andre.dras...@st.com> Date: Wed, 22 Jul 2009 02:06:49 +0100 Subject: [PATCH] (software rasterizer) buffer unlocking fixes in error paths MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Draszik <andre.dras...@st.com> --- src/gfx/generic/generic.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/gfx/generic/generic.c b/src/gfx/generic/generic.c index 072aec6..4e5daaf 100644 --- a/src/gfx/generic/generic.c +++ b/src/gfx/generic/generic.c @@ -7082,7 +7082,7 @@ bool gAcquire( CardState *state, DFBAccelerationMask accel ) break; default: D_ONCE("unsupported destination format"); - return false; + goto error; } if (DFB_BLITTING_FUNCTION( accel )) { @@ -7110,13 +7110,13 @@ bool gAcquire( CardState *state, DFBAccelerationMask accel ) if (dst_ycbcr && state->blittingflags & (DSBLIT_COLORIZE | DSBLIT_SRC_PREMULTCOLOR)) - return false; + goto error; case DSPF_A1: case DSPF_A4: case DSPF_A8: if (DFB_PLANAR_PIXELFORMAT(gfxs->dst_format) && state->blittingflags & DSBLIT_DST_COLORKEY) - return false; + goto error; break; case DSPF_I420: case DSPF_YV12: @@ -7124,24 +7124,24 @@ bool gAcquire( CardState *state, DFBAccelerationMask accel ) case DSPF_NV21: case DSPF_NV16: if (state->blittingflags & DSBLIT_SRC_COLORKEY) - return false; + goto error; case DSPF_YUY2: case DSPF_UYVY: case DSPF_AYUV: if (dst_ycbcr) { if (state->blittingflags & (DSBLIT_COLORIZE | DSBLIT_SRC_PREMULTCOLOR)) - return false; + goto error; if (DFB_PLANAR_PIXELFORMAT(gfxs->dst_format) && state->blittingflags & DSBLIT_DST_COLORKEY) - return false; + goto error; } src_ycbcr = true; break; default: D_ONCE("unsupported source format"); - return false; + goto error; } } @@ -7720,6 +7720,10 @@ bool gAcquire( CardState *state, DFBAccelerationMask accel ) dfb_state_update( state, state->flags & CSF_SOURCE_LOCKED ); return true; + + error: + gRelease( state ); + return false; } void gRelease( CardState *state ) -- 1.6.0.4
_______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev