Closed
Bug 568767
Opened 15 years ago
Closed 3 years ago
BasicImageLayer::Paint should apply OP_SRC if layer is opaque
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: romaxa, Assigned: romaxa)
Details
Attachments
(1 file, 2 obsolete files)
1.52 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
It is a bit speedup rendering
Attachment #447941 -
Flags: review?(roc)
Attachment #447941 -
Flags: review?(roc) → review+
Comment on attachment 447941 [details] [diff] [review]
opaque layer
{} around the 'if' body
Assignee | ||
Comment 2•15 years ago
|
||
Actually, for both this and the previous patch, you need to set the operator back to OVER afterwards.
Attachment #447941 -
Flags: review+ → review-
in response to your question on IRC, setting it back to OVER is fine, you don't need to save and restore the operator.
Hmm, actually I take that back. Please save and restore the operator.
Comment 6•15 years ago
|
||
Please take into account that this -severely- slows Direct2D down.
Comment 7•15 years ago
|
||
(In reply to comment #6)
> Please take into account that this -severely- slows Direct2D down.
Actually, that's not true, if the surface is actually an RGB surface and not RGBA, it will optimize the SOURCE to an OVER. I'd be -very- surprised if the image surface backend does not optimize OVER to SOURCE in that case though.
Assignee | ||
Comment 8•15 years ago
|
||
Attachment #447941 -
Attachment is obsolete: true
Attachment #448199 -
Attachment is obsolete: true
Attachment #448332 -
Flags: review?(roc)
Attachment #448199 -
Flags: review?(roc)
Comment 9•15 years ago
|
||
(In reply to comment #8)
> Created an attachment (id=448332) [details]
> Add operator restore
What are the situations where we're painting an opaque ARGB32 surface?
Assignee | ||
Comment 10•15 years ago
|
||
Not sure if it is ARGB32 surface... in my case it was opaque youtube video plugin layer.... and when it was up/down scaled then pixman was using very expensive scale path...
I can check again and show backtrace if it is needed
cairo backends should be responsible for optimizing OVER to SOURCE for RGB24 surfaces where that makes sense.
BasicPlanarYCbCrImage definitely has an RGB24 surface. Dunno about Oleg's plugin layer code.
Assignee | ||
Comment 12•15 years ago
|
||
err... I'm using BasicCairoImage not YCbCr for plugins. and youtube plugin is opaque (16bpp)... and rendering that to opaque 16bpp Target...
I think that was happening with old pixman... need to check if that problem still valid.
Comment 13•14 years ago
|
||
(In reply to comment #11)
> cairo backends should be responsible for optimizing OVER to SOURCE for RGB24
> surfaces where that makes sense.
This is not so trivial, considering that RGB24 surfaces with NONE repeat actually have transparent pixels around them which also need special treatment. This has been addressed in the following commit in pixman:
http://cgit.freedesktop.org/pixman/commit/?id=da6f33a798bf2ea10df610ccf1d9506d63d1a28c
Anyway, there is still some risk of not getting OVER operator optimized to SRC when using scaling with transform parameters set a bit off so that the pixels outside the source image boundaries are being fetched. For bilinear scaling this is even unavoidable. That's why using PAD repeat is generally recommended instead of NONE, and for HW accelerated drivers too:
https://bugs.freedesktop.org/show_bug.cgi?id=27954
That said, currently pixman 0.19.2 seems to have some strange performance issue if repeat is set to PAD. This must be addressed before repeat PAD can be universally recommended.
Comment 14•14 years ago
|
||
(In reply to comment #13)
> That said, currently pixman 0.19.2 seems to have some strange performance issue
> if repeat is set to PAD. This must be addressed before repeat PAD can be
> universally recommended.
I think this would be the fix:
http://lists.freedesktop.org/archives/pixman/2010-September/000584.html
Karl looked into making BasicImageLayer use EXTEND_PAD, but we haven't gotten around to it quite yet; we need to fix the scaling to snap to pixels properly. Also, there's the issue of cairo being incredibly slow with EXTEND_PAD on many X servers, due to having to fallback to avoid potential X server bugs.
I think we should deal with those issues directly rather than use this patch.
Comment 16•14 years ago
|
||
That was in Bug 581797.
Comment on attachment 448332 [details] [diff] [review]
Add operator restore.
I think we can just do this.
Attachment #448332 -
Flags: review?(roc) → review+
Updated•3 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•