Closed
Bug 601888
Opened 14 years ago
Closed 13 years ago
Teach ThebesLayerOGL about resolution-scaled drawing
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: cjones, Assigned: mattwoodrow)
References
Details
Attachments
(3 files, 2 obsolete files)
2.26 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
22.92 KB,
patch
|
Details | Diff | Splinter Review | |
26.28 KB,
patch
|
cjones
:
feedback-
|
Details | Diff | Splinter Review |
They need to be able to request scaling during repaint (bug 586683) and draw scaled content to screen, possibly created by a remote layer (bug 598864). I'm more interested in the latter so may stop there.
Reporter | ||
Comment 1•14 years ago
|
||
This allows gets us to properly draw shadow BasicThebesLayers painted with a non-1.0 resolution. We still need a part 2 that allows ThebesLayerOGL to request non-1.0 resolution during painting.
Attachment #481020 -
Flags: review?(vladimir)
Attachment #481020 -
Flags: review?(matt.woodrow+bugzilla)
Reporter | ||
Comment 2•14 years ago
|
||
This blocks turning on GL compositing for fennec.
tracking-fennec: --- → ?
Assignee | ||
Comment 3•14 years ago
|
||
Comment on attachment 481020 [details] [diff] [review] part 1: Teach ThebesLayerOGL to draw backing buffers drawn with a resolution other than 1.0 Looks good to me. The comment confused me slightly but I think I didn't read the second sentence properly.
Attachment #481020 -
Flags: review?(matt.woodrow+bugzilla) → review+
Comment on attachment 481020 [details] [diff] [review] part 1: Teach ThebesLayerOGL to draw backing buffers drawn with a resolution other than 1.0 r- based on IRC discussion -- the wrong thing is being scaled here, leading to rendering artifacts. I believe we concluded that the right thing to scale is the quadRect argument given to BindAndDrawQuadWithTextureRect. With a shadow layer buffer/resolution, mTexImage is no longer a 1:1 representation of this layer's visible rect. So, we have to select the right rectangle from it to draw into the screen-space quadRect -- which is quadRect scaled by the resolution. The texture's size has to stay fixed, it's only passed in so that the function can correctly calculate texture coordinates for drawing a quadRect region of the texture to the screen.
Attachment #481020 -
Flags: review?(vladimir) → review-
Reporter | ||
Comment 5•14 years ago
|
||
Scale quadRect instead of anti-scaling texture size. Also fix an annoying compiler warning.
Attachment #481020 -
Attachment is obsolete: true
Attachment #481136 -
Flags: review?(vladimir)
Reporter | ||
Comment 6•14 years ago
|
||
Forgot RoundOut().
Attachment #481136 -
Attachment is obsolete: true
Attachment #481137 -
Flags: review?(vladimir)
Attachment #481136 -
Flags: review?(vladimir)
Comment on attachment 481137 [details] [diff] [review] part 1: Teach ThebesLayerOGL to draw backing buffers drawn with a resolution other than 1.0 , v2.1 this makes a lot more sense :-)
Attachment #481137 -
Flags: review?(vladimir) → review+
Updated•14 years ago
|
tracking-fennec: ? → 2.0b2+
Comment 8•14 years ago
|
||
cjones: Making you the owner of this for now, disown it if you feel that's inappropriate. (mostly 'cause I'm looking for unowned blocker bugs to work on)
Assignee: nobody → jones.chris.g
Reporter | ||
Comment 9•14 years ago
|
||
Matt, please steal this from me when your part 2 patch is ready to go.
Reporter | ||
Comment 10•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/76cd71c36c9b Can leave this open for part 2.
Updated•14 years ago
|
tracking-fennec: 2.0b2+ → 2.0b3+
Updated•14 years ago
|
Whiteboard: [fennec-checkin-postb2][has-patch]
Reporter | ||
Comment 11•14 years ago
|
||
The first part of this bug already landed.
Whiteboard: [fennec-checkin-postb2][has-patch]
Reporter | ||
Comment 12•14 years ago
|
||
Part 2 of this doesn't block fennec b3, because that's only really relevant on desktop.
Assignee: jones.chris.g → matt.woodrow+bugzilla
blocking2.0: --- → ?
tracking-fennec: 2.0b3+ → ---
Comment 13•14 years ago
|
||
I don't think this blocks at all, then, unless I'm missing something?
blocking2.0: ? → -
Comment 14•14 years ago
|
||
(In reply to comment #12) > Part 2 of this doesn't block fennec b3, because that's only really relevant on > desktop. perhaps parts 1 and 2 should be separate bugs?
Reporter | ||
Comment 15•14 years ago
|
||
This is the GL part of bug 586683, which is currently blocking-final.
Assignee | ||
Comment 16•14 years ago
|
||
This appears to work for the most part (forcing press shell to set weird resolutions on the layer manager), but I haven't run it through tests yet. I'm worried that scaling the region to pass to BeginUpdate and then reverse scaling the result will sometime have rounding issues since we snap to the outside rectangle both times. WIP Followup to solve this by making TextureImage handle resolution changes.
Assignee | ||
Comment 17•14 years ago
|
||
I'm less sure if this is a good way to handle things, but does appear to make the code cleaner. Known issues: - I think this will break IPC since the layers resolution won't match that of the TextureImage. - Black squares when scrolling. - EGL implementation of TextureImage needs fixing Still very much a WIP, will fix the issues if decided to be a good path to take.
Attachment #491743 -
Flags: feedback?(jones.chris.g)
Assignee | ||
Updated•14 years ago
|
Attachment #491742 -
Flags: review?(vladimir)
Reporter | ||
Comment 18•14 years ago
|
||
Comment on attachment 491743 [details] [diff] [review] Part 2b: Refactor Resolution handling into TextureImage I don't think it makes sense to push resolution handling down into TextureImage. That's an abstraction that's only supposed to deal with platform-specific, efficient uploading of image data to GPU-accessible memory. I would prefer handling resolution in a higher level; I don't see a fundamental reason we need to move resolution into TextureImage. But, I've been out of this code for a while, and the use of TextureImage may have evolved in the meantime, so pinging vlad for feedback.
Attachment #491743 -
Flags: feedback?(vladimir)
Attachment #491743 -
Flags: feedback?(jones.chris.g)
Attachment #491743 -
Flags: feedback-
Comment 19•14 years ago
|
||
(In reply to comment #18) > Comment on attachment 491743 [details] [diff] [review] > Part 2b: Refactor Resolution handling into TextureImage > > I don't think it makes sense to push resolution handling down into > TextureImage. That's an abstraction that's only supposed to deal with > platform-specific, efficient uploading of image data to GPU-accessible memory. > I would prefer handling resolution in a higher level; I don't see a fundamental > reason we need to move resolution into TextureImage. I agree with this. I'd rather we not complicate TextureImage further.
Assignee | ||
Comment 20•13 years ago
|
||
Fixed by bug 586683.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Attachment #491742 -
Flags: review?(vladimir)
Reporter | ||
Updated•13 years ago
|
Attachment #491743 -
Flags: feedback?(vladimir)
You need to log in
before you can comment on or make changes to this bug.
Description
•