From 1a1416aaa401f667e83f63755f7648b60ecf1fbb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Sep 2013 17:46:05 +0200 Subject: [PATCH] Fixed Cairo's render target setting. --- common/gal/cairo/cairo_gal.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 4ed047b24c..d66a2cb725 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -736,8 +736,13 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget ) return; // Cairo grouping prevents display of overlapping items on the same layer in the lighter color - cairo_pop_group_to_source( currentContext ); - cairo_paint_with_alpha( currentContext, fillColor.a ); + if( isInitialized ) + { + storePath(); + + cairo_pop_group_to_source( currentContext ); + cairo_paint_with_alpha( currentContext, fillColor.a ); + } switch( aTarget ) { @@ -752,7 +757,8 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget ) break; } - cairo_push_group( currentContext ); + if( isInitialized ) + cairo_push_group( currentContext ); currentTarget = aTarget; }