Status

()

Core
Widget: Cocoa
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Stuart Parmenter, Assigned: Stuart Parmenter)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
rather than repainting the whole area we should draw sections either using a region or by just drawing each rect one at a time...
(Assignee)

Comment 1

11 years ago
Created attachment 245031 [details] [diff] [review]
draw with a region

drawing each rect separately is a bit faster than drawing with a region -- both are faster than what we do now.  drawing with a region seems more correct to me and if it is slower the view system should be made faster
Attachment #245031 - Flags: superreview?(vladimir)
Attachment #245031 - Flags: review?(joshmoz)
Comment on attachment 245031 [details] [diff] [review]
draw with a region

This code does look more correct, but we should get roc's opinion and figure out what the view code actually does with the passed in region.
Attachment #245031 - Flags: superreview?(vladimir) → superreview+

Comment 3

11 years ago
Comment on attachment 245031 [details] [diff] [review]
draw with a region

+#include "nsMacResources.h"

Not sure what that is doing there, it doesn't really make any sense.

The other changes look alright to me, but I'm not exactly sure why they are important. Could I get a little more of an explanation since I'm not familiar with this stuff? I'm not sure why you want to pass on a region when you just drew the whole bounding rect for that region. Also I'd like to wait for an answer to vlad's question from roc before doing r+.

Note the change in 311304 in case that affects what you're doing. Maybe it doesn't, just throwing it out there.
(Assignee)

Comment 4

11 years ago
(In reply to comment #3)
> Could I get a little more of an explanation since I'm not familiar
> with this stuff? I'm not sure why you want to pass on a region when you just
> drew the whole bounding rect for that region. Also I'd like to wait for an
> answer to vlad's question from roc before doing r+.

Huh?  We didn't just draw the whole bounding rect for the region -- we're passing in the region to the view system and it does the drawing -- based on the region.

Comment 5

11 years ago
I see, I was confused by a comment in the code.
The view system isn't involved in painting much anymore. The region gets converted to layout coordinates. Layout traverses the frame tree and collects all rendered frames that intersect the region bounding-box. Then we make another pass through those frames and discard any frames that don't actually intersect the region (we also eliminate some frames that are covered by other opaque frames in this pass). Then we paint.

So painting individual rectangles could be faster if the union of the rectangles intersects a lot more frames than the individual rectangles --- we won't paint the extra frames, but we will have to traverse the frame tree to put them in the display list. Also, we allocate a backbuffer for the union of the rectangles so that could consume more memory and potentially be slower.
(Assignee)

Comment 7

11 years ago
ok, i'm going to remove the if 0 stuffs

Updated

11 years ago
Attachment #245031 - Flags: review?(joshmoz) → review+
(Assignee)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.