Bug 41482 - an alternative approach for faster rendering using GL/GLES with None AA or default AA
Summary: an alternative approach for faster rendering using GL/GLES with None AA or de...
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: gl backend (show other bugs)
Version: 1.10.3
Hardware: All Linux (All)
: medium enhancement
Assignee: cairo-bugs mailing list
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 09:00 UTC by Henry Song
Modified: 2011-10-13 07:35 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
first patch of GL/GLES backend alternative approach for solid color fill (19.00 KB, patch)
2011-10-05 09:00 UTC, Henry Song
Details | Splinter Review
revised patch to replace previous patch (5.40 KB, patch)
2011-10-11 17:16 UTC, Henry Song
Details | Splinter Review

Description Henry Song 2011-10-05 09:00:41 UTC
Created attachment 52014 [details] [review]
first patch of GL/GLES backend alternative approach for solid color fill

We are starting submit patches that implement an alternative approach of faster rendering for GL/GLES backend.  Our intention is to make GL/GLES backend faster with AA hint is either CAIRO_ANTIALIAS_NONE or CAIRO_ANTIALIAS_DEFAULT when GPU supports MSAA.  Our approach would co-exist with existing GL/GLES backend such that when AA hints require higher AA quality (i.e., CAIRO_ANTIALIAS_SUBPIXEL), the control flow would go with existing GL/GLES, while other AA hints would go our alternative approach.  

We are submitting first two patches.  The first two patch includes fill() operations with constant color

Community review and comments are very welcome and appreciated.

Henry
Comment 1 Chris Wilson 2011-10-11 03:57:18 UTC
Ok, the most important question is "how do I know when to use MSAA?" On the inferior Intel hardware, it neither supports MSAA nor does it render triangles well and spans is still generally faster than traps. ;-)

I'd like to only enable the MSAA compositor if we have sufficient GL support for MSAA and to only use MSAA if antialias != CAIRO_ANTIALIAS_FAST. We can debate whether or not to enable it by default when we can judge it on its merits.

Be careful not to call the compositor->delegate->*() functions directly, they may be NULL! Just return CAIRO_INT_STATUS_UNSUPPORTED and let the wrapper call then delegate. (At first I did the delegation directly as you did here, but then decided that a NULL delegate was indeed useful.)

Perhaps the zeroth patch should be to introduce the MSAA compositor that does nothing but delegate, but is only installed if we decide we have adequate GL support.
Comment 2 Henry Song 2011-10-11 17:16:02 UTC
Created attachment 52243 [details] [review]
revised patch to replace previous patch

The first patch has no real implementation, but introduces a new fast path for capable GL that supports MSAA for cairo/gl/gles backend.  We will have more patches that will complete the implementation
Comment 3 Henry Song 2011-10-11 17:34:14 UTC
The first patch revised according to Chris's comments
Comment 4 Chris Wilson 2011-10-13 07:35:01 UTC
Applied, thanks.


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.