From 0109a5b04ec4fc3a31d941faa9ea7c9f37590c49 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 28 Feb 2013 22:29:31 +0200 Subject: Drop unuse maRedrawRegion I saw crashes or getting stuck in a loop in the Region code for some unknown reason. Below in the backtrace was the call to Region::Union() in AndroidSalInstance::damaged(). As the maRedrawRegion wasn't actually used for anything, let's bin it then for now... No crashes now, knock on wood. I still don't know whether the switch from SalFooEvents and CallCallback() to FooEvents and PostFooEvent() helped anything or not. Change-Id: Iba867daa37a206953cdb765905fa5eb3fca4d08e --- vcl/android/androidinst.cxx | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) (limited to 'vcl/android') diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index b9ca23f73010..4b7b5ae45c73 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -316,33 +316,7 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buf if (pFrame->IsVisible()) { -#ifndef REGION_RE_RENDER // (It isn't defined, don't know where it - // would/could bem so this branch is the one - // that is used) BlitFrameToWindow (&aOutBuffer, pFrame->getDevice()); -#else - // Sadly it seems that due to double buffering, we don't - // get back in our buffer what we had there last time - so we cannot - // do incremental rendering. Presumably this will require us to - // render to a bitmap, and keep that updated instead in future. - - // Intersect re-rendering region with this frame - Region aClipped( maRedrawRegion ); - basegfx::B2IVector aDevSize = pFrame->getDevice()->getSize(); - aClipped.Intersect( Rectangle( 0, 0, aDevSize.getX(), aDevSize.getY() ) ); - - Rectangle aSubRect; - RegionHandle aHdl = aClipped.BeginEnumRects(); - while( aClipped.GetNextEnumRect( aHdl, aSubRect ) ) - { - ARect aASubRect = { aSubRect.Left(), aSubRect.Top(), - aSubRect.Right(), aSubRect.Bottom() }; - BlitFrameRegionToWindow(&aOutBuffer, pFrame->getDevice(), - aASubRect, - aSubRect.Left(), aSubRect.Top()); - } - aClipped.EndEnumRects( aHdl ); -#endif } } } @@ -352,14 +326,11 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buf if (pBuffer && pWindow) ANativeWindow_unlockAndPost(pWindow); - maRedrawRegion.SetEmpty(); mbQueueReDraw = false; } -void AndroidSalInstance::damaged(AndroidSalFrame */* frame */, const Rectangle &rRect) +void AndroidSalInstance::damaged(AndroidSalFrame */* frame */) { - // FIXME: translate rRect to the frame's offset ... - maRedrawRegion.Union( rRect ); mbQueueReDraw = true; } @@ -756,13 +727,7 @@ public: { return; } - Rectangle aRect( std::max((long) 0, (long) rDamageRect.getMinX() ), - std::max((long) 0, (long) rDamageRect.getMinY() ), - std::max((long) 0, (long) ( rDamageRect.getMinX() + - rDamageRect.getWidth() ) ), - std::max((long) 0, (long) ( rDamageRect.getMinY() + - rDamageRect.getHeight() ) ) ); - AndroidSalInstance::getInstance()->damaged( this, aRect ); + AndroidSalInstance::getInstance()->damaged( this ); } virtual void UpdateSettings( AllSettings &rSettings ) -- cgit v1.2.3