summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-02-28 22:29:31 +0200
committerTor Lillqvist <tml@iki.fi>2013-02-28 22:34:23 +0200
commit0109a5b04ec4fc3a31d941faa9ea7c9f37590c49 (patch)
tree1bc9b277ee5d216b3183b491e8d747b2c7c2c59c
parentb34b8d3372364b3c5043da0357ec69505e8d8602 (diff)
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
-rw-r--r--vcl/android/androidinst.cxx39
-rw-r--r--vcl/inc/android/androidinst.hxx3
2 files changed, 3 insertions, 39 deletions
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 )
diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx
index 9ae3baaf4a30..34c0d6e02716 100644
--- a/vcl/inc/android/androidinst.hxx
+++ b/vcl/inc/android/androidinst.hxx
@@ -65,10 +65,9 @@ public:
void RedrawWindows(ANativeWindow *pWindow, ANativeWindow_Buffer *pBuffer = NULL);
SalFrame *getFocusFrame() const;
- void damaged(AndroidSalFrame *frame, const Rectangle &rRect);
+ void damaged(AndroidSalFrame *frame);
protected:
virtual void DoReleaseYield( int nTimeoutMS );
- Region maRedrawRegion;
bool mbQueueReDraw;
};