[Mono-bugs] [Bug 543946] New: BufferedGraphics.Render() fails to render to screen

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 2 15:20:09 EDT 2009


           Summary: BufferedGraphics.Render() fails to render to screen
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: libgdiplus
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: lionel.keene at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=320876)
 --> (http://bugzilla.novell.com/attachment.cgi?id=320876)
VS2008 solution

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/532.0 (KHTML, like Gecko) Chrome/ Safari/532.0

I've been trying to find the source of poor performance in my WinForms app when
running on OSX + Mono runtime. I have prepared a multithreaded example which
replicates the strategy I'm using in my applciation to get good Windows and
Linux performance. I try two different methods: 1) use the .NET "built-in"
double buffering, which renders properly but is very slow. 2) Use the
DoubleBuffered class which doesn't render at all.

I decided to try the DoubleBuffered class in hopes that the redraw speed would
be faster...it's currently much too slow on Mac with the SetStyles flags set
(unusably so).

In summary, this project illustrates 2 issues: very slow redraw speed using
SetStyle(OptimizedDoubleBuffer,...) on OSX, and DoubleBuffered.Render()

Reproducible: Always

Steps to Reproduce:
1. Build attached VS2008 project, run app.
2. Press button on form to launch threads.
3. Drag trackbar to draw to screen
Actual Results:  
When using DoubleBuffered.Render() nothing is drawn to screen. When using
"SetStyles(...)" and "Refresh()" to force repainting of form, screen is drawn
properly but is very slow. Windows + Linux performance is okay.

Expected Results:  
Screen should redraw very quickly, especially on multicore machines.

Running the app as-is will illustrate the failure of Render() to function.

The other test is to comment out the BufferedGraphics stuff, remove the
comments for the "SetStyles()" stuff in the form's constructor as well as the
"Refresh()" command in the trackbar_scroll handler. Also, uncomment the
"DrawImageUnscaled" line in the form's paint handler. The screen will now
redraw but VERY slowly on OSX versus Linux/Windows. This has a huge impact on
any app that does a lot of drawing. I sure hope you guys and gals can fix this!

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list