summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorClaudio Ciccani <klan@users.sourceforge.net>2006-09-03 13:24:05 +0000
committerClaudio Ciccani <klan@users.sourceforge.net>2006-09-03 13:24:05 +0000
commit28e81286cd68f8311fa529a65e1db4ffbf933278 (patch)
tree4173304a5d3d57adee0323af594edc8feb845c8e /src
parent10ddc6313af4fe437eadd55c816d18d4b2b6fc8d (diff)
downloadxine-lib-28e81286cd68f8311fa529a65e1db4ffbf933278.tar.gz
xine-lib-28e81286cd68f8311fa529a65e1db4ffbf933278.tar.bz2
Clear back buffer(s) when output area changes.
CVS patchset: 8199 CVS date: 2006/09/03 13:24:05
Diffstat (limited to 'src')
-rw-r--r--src/video_out/video_out_directfb.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c
index 82d831c6b..564aece31 100644
--- a/src/video_out/video_out_directfb.c
+++ b/src/video_out/video_out_directfb.c
@@ -339,8 +339,10 @@ static void directfb_clean_output_area (directfb_driver_t *this) {
#endif
}
else if (!(this->caps & DLCAPS_SCREEN_LOCATION)) {
- DFBRectangle rect[4];
- int i;
+ DFBRectangle rect[4];
+ DFBSurfaceCapabilities caps;
+ int bufs = 1;
+ int i;
for (i = 0; i < 4; i++) {
rect[i].x = MAX(this->sc.border[i].x, 0);
@@ -348,9 +350,18 @@ static void directfb_clean_output_area (directfb_driver_t *this) {
rect[i].w = MAX(this->sc.border[i].w, 0);
rect[i].h = MAX(this->sc.border[i].h, 0);
}
-
+
+ this->surface->GetCapabilities (this->surface, &caps);
+ if (caps & DSCAPS_DOUBLE)
+ bufs++;
+ if (caps & DSCAPS_TRIPLE)
+ bufs++;
+
this->surface->SetColor (this->surface, 0x00, 0x00, 0x00, 0xff);
- this->surface->FillRectangles (this->surface, &rect[0], 4);
+ for (i = 0; i < bufs; i++) {
+ this->surface->FillRectangles (this->surface, &rect[0], 4);
+ this->surface->Flip (this->surface, NULL, 0);
+ }
}
}