Closed
Bug 573829
Opened 14 years ago
Closed 14 years ago
Retain ThebesLayer contents in OpenGL layers backend
Categories
(Core :: Graphics, enhancement)
Core
Graphics
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: cjones, Assigned: cjones)
References
Details
Attachments
(5 files, 9 obsolete files)
25.32 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.85 KB,
patch
|
vlad
:
superreview+
|
Details | Diff | Splinter Review |
15.72 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
7.04 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
1.21 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → jones.chris.g
Attachment #453177 -
Flags: review?(roc)
Assignee | ||
Comment 2•14 years ago
|
||
Vlad, you seem like the best reviewer of this, but please pass off if appropriate. Note that this patch draws the buffer contents only in a "seeing The Matrix" kind of way; it doesn't apply the rotation to the ThebesLayerBuffer. (Kinda neat, but useless.) Next patch fixes that.
Attachment #453178 -
Flags: review?(vladimir)
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #453180 -
Flags: review?(vladimir)
Assignee | ||
Comment 4•14 years ago
|
||
I should add that these patches always re-upload the entire retained buffer with glTexImage2D() after invalidations. This should be faster than the old code, but isn't optimal on X11+GLX/EGL at least. Optimizations in followups, please.
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #4) > This should be faster than the old code For scrolling, I meant to qualify.
(In reply to comment #4) Yes, on Mac it's definitely faster to use glTexSubimage2D to update textures after the initial glTexImage2D.
Comment on attachment 453177 [details] [diff] [review] part 1: Refactor ThebesLayerBuffer in preparation for its use in the OGL layers backend + ThebesLayerBuffer(PRBool aExactlySized=PR_FALSE) use an enum parameter, and no default value + bool isOpaqueContent = + (targetSurface->AreSimilarSurfacesSensitiveToContentType() && PRBool
Attachment #453177 -
Flags: review?(roc) → review+
Assignee | ||
Comment 8•14 years ago
|
||
I started to file a followup for optimizing this code on platforms where we'd want to treat the texture as the backing storage for ThebesLayerBuffer (and update using temporary surfaces and TexSubImage2d()), but that's not high priority at the moment.
Assignee | ||
Comment 9•14 years ago
|
||
The new patches forthcoming fix a rendering glitch caused by not binding the ThebesLayerOGL's texture for rendering when it wasn't updated with new content.
Attachment #453178 -
Attachment is obsolete: true
Attachment #453180 -
Attachment is obsolete: true
Attachment #453312 -
Flags: review?(vladimir)
Attachment #453178 -
Flags: review?(vladimir)
Attachment #453180 -
Flags: review?(vladimir)
Assignee | ||
Comment 10•14 years ago
|
||
Attachment #453313 -
Flags: review?(vladimir)
Attachment #453312 -
Flags: review?(vladimir) → review+
Comment on attachment 453313 [details] [diff] [review] part 3: Use GL_REPEAT and appropriate texcoords to render ThebesLayerOGL's pixels rotated correctly So this is generally fine, except don't add the stuff to LayerManagerOGL; just put it in ThebesLayer directly. That is: >+ void UnbindQuadVBO() { >+ mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, 0); >+ } Just call BindBuffer(, ..0) directly where you need it. The call doesn't unbind the quad vbo specifically, it unbinds any VBO, so the naming would be weird. >+ void BindAndDrawQuadWithTextureRect(LayerProgram *aProg, >+ const nsIntRect& aTexCoordRect); And this, just put the code in ThebesLayer; if we end up needing to pull it out later let's do it, but there's no point in having lots of specialized helpers that only have consumer.
Attachment #453313 -
Flags: review?(vladimir) → review-
Assignee | ||
Comment 12•14 years ago
|
||
Moved single-user code out of LayerManagerOGL and into ThebesLayerOGl.
Attachment #453313 -
Attachment is obsolete: true
Attachment #453530 -
Flags: review?(vladimir)
Assignee | ||
Comment 13•14 years ago
|
||
(Oops, uploaded the wrong patch.)
Attachment #453530 -
Attachment is obsolete: true
Attachment #453540 -
Flags: review?(vladimir)
Attachment #453530 -
Flags: review?(vladimir)
Comment on attachment 453540 [details] [diff] [review] part 3: Use GL_REPEAT and appropriate texcoords to render ThebesLayerOGL's pixels rotated correctly, v2 Great, thanks!
Attachment #453540 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Comment 15•14 years ago
|
||
Attachment #453312 -
Attachment is obsolete: true
Attachment #453540 -
Attachment is obsolete: true
Attachment #455774 -
Flags: review?(vladimir)
Assignee | ||
Comment 16•14 years ago
|
||
Attachment #455775 -
Flags: review?(vladimir)
Assignee | ||
Comment 17•14 years ago
|
||
Oops, almost forgot this one.
Attachment #455786 -
Flags: superreview?(vladimir)
Assignee | ||
Comment 18•14 years ago
|
||
part 1 will land independently of >= 2 because it made the cross-process layers implementation cleaner.
Attachment #455774 -
Attachment is obsolete: true
Attachment #455775 -
Attachment is obsolete: true
Attachment #455786 -
Attachment is obsolete: true
Attachment #458589 -
Flags: superreview?(vladimir)
Attachment #455774 -
Flags: review?(vladimir)
Attachment #455775 -
Flags: review?(vladimir)
Attachment #455786 -
Flags: superreview?(vladimir)
Assignee | ||
Comment 19•14 years ago
|
||
Attachment #458590 -
Flags: review?(vladimir)
Assignee | ||
Comment 20•14 years ago
|
||
Attachment #458591 -
Flags: review?(vladimir)
Assignee | ||
Comment 21•14 years ago
|
||
I incorporated the fixes from bug 579696, but there's still a problem with google.com's fade-in animation that's also present with m-c tip, so is apparently a bug elsewhere.
Assignee | ||
Comment 22•14 years ago
|
||
Comment on attachment 453177 [details] [diff] [review] part 1: Refactor ThebesLayerBuffer in preparation for its use in the OGL layers backend Requesting approval (just on this patch, on purpose) because it refactors ThebesLayerBuffer so that it can be used more easily by both the cross-process layers code and the GL layers work here. Not taking it will cause major merge headaches later between ThebesLayerBuffer fixes/cross-process layers/GL layers. It's a safe refactoring.
Attachment #453177 -
Flags: approval2.0?
Assignee | ||
Comment 23•14 years ago
|
||
Tentatively blocking because we may suffer a perf regression from software rendering without retaining thebes content.
Blocks: ogl-osx-beta
Updated•14 years ago
|
blocking2.0: --- → betaN+
Comment 24•14 years ago
|
||
Comment on attachment 453177 [details] [diff] [review] part 1: Refactor ThebesLayerBuffer in preparation for its use in the OGL layers backend Doesn't need approval - this is a blocker.
Attachment #453177 -
Flags: approval2.0?
Assignee | ||
Comment 25•14 years ago
|
||
part 1: http://hg.mozilla.org/mozilla-central/rev/432bca3dd7ba
Attachment #458589 -
Flags: superreview?(vladimir) → superreview+
Attachment #458590 -
Flags: review?(vladimir) → review+
Comment on attachment 458591 [details] [diff] [review] part 4: Use GL_REPEAT and appropriate texcoords to render ThebesLayerOGL's pixels rotated correctly looks good!
Attachment #458591 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 27•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/8139e2e2d216 http://hg.mozilla.org/mozilla-central/rev/f4d3421c4702 http://hg.mozilla.org/mozilla-central/rev/da66f4dd97cf
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 28•14 years ago
|
||
In TextureImage::ContentType contentType = + CanUseOpaqueSurface() ? gfxASurface::CONTENT_COLOR : gfxASurface::CONTENT_COLOR_ALPHA; (<http://mxr.mozilla.org/mozilla-central/source/gfx/layers/opengl/ThebesLayerOGL.cpp#394>), was the + added intentionally?
Assignee | ||
Comment 29•14 years ago
|
||
Thanks for the catch.
Attachment #459862 -
Flags: review?(vladimir)
Comment on attachment 459862 [details] [diff] [review] Clean up a chunk of .rej vomit that just so happened to be syntactically correct and not change semantics ha, cute.
Attachment #459862 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 31•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/e4fd60575251
You need to log in
before you can comment on or make changes to this bug.
Description
•