Bug 1664

Summary: RFE: Implement support for the DOUBLE-BUFFER (=DBE) extension
Product: xprint Reporter: Roland Mainz <roland.mainz>
Component: Server: Extensions: OtherAssignee: Roland Mainz <roland.mainz>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: high CC: alan.coopersmith, jay.hobson, julien.lafon
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 1673    
Bug Blocks:    
Attachments:
Description Flags
Prototype patch for 2004-10-18-trunk
none
Test client dbedizzy.c with print support
none
New patch for 2004-10-20-trunk
none
[FIXED_X11R68x] Patch for checkin (2004-10-24-trunk) roland.mainz: 6.8-branch+

Description Roland Mainz 2004-10-18 07:18:11 UTC
RFE: Implement support for the DOUBLE-BUFFER (=DBE) extension.

It may be highly desired to have native support in Xprt as some commercial data
plotting/visualisation widgets use the DBE extension and only work poorly
without it...
Comment 1 Roland Mainz 2004-10-18 07:20:56 UTC
Created attachment 1123 [details] [review]
Prototype patch for 2004-10-18-trunk
Comment 2 Roland Mainz 2004-10-18 07:23:40 UTC
Created attachment 1124 [details]
Test client dbedizzy.c with print support

Usage:
% (XPSERVERLIST=:40 ./dbedizzy -printer xp_ps_spooldir_tmp_Xprintjobs -verbose)
Comment 3 Roland Mainz 2004-10-18 07:35:58 UTC
Alan:
Can you take a look a the patch, please ?
The critical part is the new "pixmap scrubber" (the pixmap scrubber is needed,
otherwise the hidden pixmap buffer used by the DBE implementation in
xc/programs/Xserver/dbe/midbe.c will permanently fill the pixmap with new data
with each buffer swap - even if the old data are completely erased (or better:
hidden behind the PolyFill() rect of the last
clear-hidden-dbe-buffer-with-background-color-after-swapping)) - or better: the
part in |PsPolyFillRect()| which calls it:
-- snip --
+ if ( (pRects[0].x==0) && (pRects[0].y==0) &&
+      (pRects[0].width==pDrawable->width) &&
(pRects[0].height==pDrawable->height) &&
+      (pGC->fgPixel == pGC->bgPixel) &&
+      (pGC->fillStyle == FillSolid) &&
+      (noDbeExtension == False))
+ {
+   ErrorF("PsPolyFillRect: scrubbing pixmap...\n");
-- snip --
The question is: Does this |if()| statement really catch only those
|PolyFillRect()| calls which fill the whole pixmap with the background color or
are there other cases where this statement may cause the pixmap to be accidently
being scrubbed, too (for example: tiling operations or blit masks or weired ALU
operations, e.g. everything which would cause a normal |PolyFillRect()| not to
render a solid clean block in the background color over the whole pixmap
surface) ?
Comment 4 Roland Mainz 2004-10-19 21:39:14 UTC
Comment on attachment 1124 [details]
Test client dbedizzy.c with print support

Marking test case as obsolete, starting with bug 1673 ("RFE: Add sample
application for the DOUBLE-BUFFER extension (DBE) to the Xorg tree") the
"xdbedizzy" application is part of the tree.
Comment 5 Roland Mainz 2004-10-20 19:09:02 UTC
Created attachment 1143 [details] [review]
New patch for 2004-10-20-trunk

I removed the |bgcolor == fgcolor| check from the |if()| as the optimisation is
AFAIK valid for all FillRect() calls which cover the whole pixmap and not only
when the application sets the color to the background.
Comment 6 Roland Mainz 2004-10-25 00:08:12 UTC
Created attachment 1161 [details] [review]
[FIXED_X11R68x] Patch for checkin (2004-10-24-trunk)
Comment 7 Roland Mainz 2004-10-25 00:13:47 UTC
Patch checked-in...

cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.489; previous revision: 1.488
/cvs/xorg/xc/config/cf/xprint_site.def,v  <--  xprint_site.def
new revision: 1.4; previous revision: 1.3
/cvs/xorg/xc/programs/Xserver/Xprint/ps/Ps.h,v  <--  Ps.h
new revision: 1.5; previous revision: 1.4
/cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPixmap.c,v  <--  PsPixmap.c
new revision: 1.5; previous revision: 1.4
/cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPolygon.c,v  <--  PsPolygon.c
new revision: 1.3; previous revision: 1.2
/cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v  <--  miinitext.c
new revision: 1.14; previous revision: 1.13
Mailing the commit message to xorg-commit@pdx.freedesktop.org...

... marking bug as FIXED.
Comment 8 Julien Lafon 2004-11-09 01:56:25 UTC
Comment on attachment 1161 [details] [review]
[FIXED_X11R68x] Patch for checkin (2004-10-24-trunk)

nominating for X11R6.8.2 as needed by the wadamis application suite (commercial
application).
Comment 9 Roland Mainz 2004-11-19 07:36:44 UTC
Comment on attachment 1161 [details] [review]
[FIXED_X11R68x] Patch for checkin (2004-10-24-trunk)

Approved for the X11R6.8.x branch in the 2004-11-17 release-wranglers phone
call.
Please don't commit it yourself, I'll handle that once the CVS service is
available again.
Comment 10 Roland Mainz 2004-12-12 21:49:17 UTC
Comment on attachment 1161 [details] [review]
[FIXED_X11R68x] Patch for checkin (2004-10-24-trunk)

Patch checked-in into X11R6.8.x stable branch:

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.365.2.48; previous revision: 1.365.2.47
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/config/cf/Attic/xprint_site.def,v	<--  xprint_site.def
new revision: 1.3.4.1; previous revision: 1.3
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/Xserver/Xprint/ps/Ps.h,v	<--  Ps.h
new revision: 1.3.4.2; previous revision: 1.3.4.1
/cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPixmap.c,v  <--  PsPixmap.c
new revision: 1.3.2.2; previous revision: 1.3.2.1
/cvs/xorg/xc/programs/Xserver/Xprint/ps/PsPolygon.c,v  <--  PsPolygon.c
new revision: 1.2.4.1; previous revision: 1.2
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v	<--  miinitext.c
new revision: 1.12.2.3; previous revision: 1.12.2.2
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.