Closed Bug 18992 Opened 25 years ago Closed 25 years ago

Image frames redraw the entire image on every Paint

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect, P3)

All
Mac System 8.5
defect

Tracking

()

VERIFIED DUPLICATE of bug 1248

People

(Reporter: sfraser_bugs, Assigned: dcone)

References

Details

(Keywords: perf)

nsImageFrame::Paint() redraws the entire image on every paint, even if the dirtyREct being passed in covers only a small fraction of the image. This makes progressive image rendering very slow (see bug 18738). Only the dirty part of the image should be redrawn.
Blocks: 18738
Assignee: karnaze → kmcclusk
Reassigning to Kevin and CCing Don.
It's unclear to me if we are relying on clipping to ensure that the area repainted is just the few scanlines of the image that we actually intend to draw. If so, then this is going to be slower than specifically telling the image to redraw just the dirty section.
Status: NEW → ASSIGNED
Target Milestone: M14
Target Milestone: M14 → M15
Moving to M15
Keywords: perf
Summary: [Perf] Image frames redraw the entire image on every Paint → Image frames redraw the entire image on every Paint
I checked on WIN32 and the clip region set up on the rendering context is preventing the entire ImageFrame from being drawn. This does not appear to be a performance problem for WIN32. Even if we limit the painting to the damage area we still need to rely on clipping set on the rendering context, since the the rendering context often contains complicated clipping regions. Reassigning to dcone to make sure the Mac is honoring the clipping set on the rendering context when drawing images.
Assignee: kmcclusk → dcone
Status: ASSIGNED → NEW
I'm pretty sure that Mac is honouring clipping, bug suspect that it is more efficient to pass the correct clipped rect to CopyBits, rather than reply on clipping alone.
This bug is really a dup of 1248. The problem is that nsIImage's need to query imagelib to determine how many rows of image has loaded when it is about to be drawn and only draw that amount through the current clip rect. Bug 18992 addresses this. I'll label 1248 as [Perf]. *** This bug has been marked as a duplicate of 1248 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
VERIFY duplicate
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.