Implement paint flashing

RESOLVED FIXED in mozilla11

Status

()

Core
Graphics
RESOLVED FIXED
12 years ago
3 years ago

People

(Reporter: bz, Assigned: bas)

Tracking

(Blocks: 1 bug)

Trunk
mozilla11
x86
Linux
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9 -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Someone who understands what regions cairo is actually repainting needs to adjust the patch from bug 220953 to work in cairo builds.
(Reporter)

Updated

12 years ago
Flags: blocking1.9a1?

Updated

12 years ago
Depends on: 334510

Updated

12 years ago
Blocks: 334510
No longer depends on: 334510
(Reporter)

Updated

12 years ago
Blocks: 334720
No longer blocks: 334510
Not gonna block 1.9 on this.

roc, could we possibly do this in the viewmanager instead of widgets?  That would also flash the area we really are repainting...
Flags: blocking1.9a1? → blocking1.9-
...and would be cross-platform, which would mean we'd stop having to rewrite it.
With our newfangled alpha support, we could even draw the actual update region in a translucent color, overlaying the page content.  It would be a permanent thing on the rendered display, as opposed to just a flash, but I think that would actually be preferable.  How's that sound?
(In reply to comment #3)
> With our newfangled alpha support, we could even draw the actual update region
> in a translucent color, overlaying the page content.  It would be a permanent
> thing on the rendered display, as opposed to just a flash, but I think that
> would actually be preferable.  How's that sound?

Wouldn't that mean that if I paint area A and then area B, both A and B have the "update" overlay, so I can't tell which one was the last one to be repainted?

It's hard to do a temporary flash from non-widget code because that stuff's all double buffered in the normal paint path. We could create a rendering context and do an immediate draw but I'd actually like to eliminate drawing outside of the paint event. I'm not sure what the right way to go is.
> It would be a permanent thing on the rendered display

That's not really desirable, because then we'd just end up with the whole window showing it...  In my experience paint flashin is most useful for things like scrolling, DHTML, UI interaction, where every so often the whole thing gets invalidated.
For Xgl there's a little tool that does this for any and all applications (probably works in aiglx too). The only problem is that it shows damage due to scrolling as well as invalidation, which I don't want, but that may not worry other people. I think OSX has something similar.

A related question is whether we want the app to pause while flashing. Currently it does, which can be good and bad...
(Reporter)

Updated

11 years ago
Blocks: 273293

Updated

8 years ago
Blocks: 102062
Do we really still not have paint flashing on X?
Last I checked, we do not.

Nor do we really have it on Mac, though QuartzDebug can help with that a bit.
Paint flashing belongs more in layers now than in Cairo drawing code; IIRC we have something approximating it too.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX

Comment 10

6 years ago
I don't see anything approximating this in the code. I'm going to try hacking this up as a learning exercise. I don't see a logical bottleneck in the Layer classes and my plan is to tack it on to gfxContext::Paint(). Will that work?
This probably needs to be done as part of bug 690064.
(Assignee)

Comment 12

6 years ago
Created attachment 574190 [details] [diff] [review]
Introduce paint flashing

This patch introduces 'paint flashing' what is does is it draws a transparent 'shade' in a random color (varying per paint) over the area that was invalidated.
Attachment #574190 - Flags: review?(roc)
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Summary: Implement paint flashing in cairo builds → Implement paint flashing
Comment on attachment 574190 [details] [diff] [review]
Introduce paint flashing

Review of attachment 574190 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/FrameLayerBuilder.cpp
@@ +2130,5 @@
>      aContext->Restore();
>    }
> +
> +#ifdef DEBUG
> +  if (Preferences::GetBool("nglayout.debug.paint_flashing", false)) {

Use AddBoolVarCache and make this non-#ifdef DEBUG
(Assignee)

Comment 14

6 years ago
Created attachment 574521 [details] [diff] [review]
Introduce paint flashing v2

Updated as per review comments.
Attachment #574190 - Attachment is obsolete: true
Attachment #574521 - Flags: review?(roc)
Attachment #574190 - Flags: review?(roc)
Attachment #574521 - Flags: review?(roc) → review+
https://hg.mozilla.org/mozilla-central/rev/6235e0c97c3b

To save time/mistakes when merging, please could you set assignee + target milestone when landing on inbound (https://wiki.mozilla.org/Tree_Rules/Inbound#Please_do_the_following_after_pushing_to_inbound).

Thanks :-)
Assignee: nobody → bas.schouten
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Created attachment 594628 [details] [diff] [review]
Add nglayout.debug.paint_flashing to all.js

We should have done this originally
Attachment #594628 - Flags: review?(bas.schouten)
(Assignee)

Updated

6 years ago
Attachment #594628 - Flags: review?(bas.schouten) → review+
Attachment #594628 - Flags: checkin?
Attachment #594628 - Flags: checkin? → checkin+
https://hg.mozilla.org/integration/mozilla-inbound/rev/677bf71d3030
https://hg.mozilla.org/mozilla-central/rev/677bf71d3030

Updated

6 years ago
Duplicate of this bug: 723716
You need to log in before you can comment on or make changes to this bug.