Init GAL class members (Coverity fixes)

Fixes: CID 157139 (GAL)
       CID 157138 (CAIRO_GAL)
This commit is contained in:
John Beard 2017-03-30 15:52:40 +08:00 committed by Maciej Suminski
parent c94269e173
commit ef9f8d40c6
2 changed files with 17 additions and 3 deletions

View File

@ -52,11 +52,24 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions,
mouseListener = aMouseListener;
paintListener = aPaintListener;
// Initialize the flags
// Initialise grouping
isGrouping = false;
isInitialized = false;
validCompositor = false;
isElementAdded = false;
groupCounter = 0;
currentGroup = nullptr;
// Initialise compositing state
mainBuffer = 0;
overlayBuffer = 0;
validCompositor = false;
SetTarget( TARGET_NONCACHED );
// Initialise Cairo state
cairo_matrix_init_identity( &cairoWorldScreenMatrix );
currentContext = nullptr;
context = nullptr;
surface = nullptr;
isInitialized = false;
// Connecting the event handlers
Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) );

View File

@ -55,6 +55,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
SetFlip( false, false );
SetLineWidth( 1.0 );
computeWorldScale();
SetAxesEnabled( false );
// Set grid defaults
SetGridVisibility( true );