WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
76328
[chromium] Draw gutter quads outside root content layer
https://bugs.webkit.org/show_bug.cgi?id=76328
Summary
[chromium] Draw gutter quads outside root content layer
Alexandre Elias
Reported
2012-01-13 19:08:06 PST
[chromium] Draw gutter quads outside root content layer
Attachments
Patch
(6.34 KB, patch)
2012-01-13 19:13 PST
,
Alexandre Elias
no flags
Details
Formatted Diff
Diff
Patch
(6.14 KB, patch)
2012-01-17 15:52 PST
,
Alexandre Elias
no flags
Details
Formatted Diff
Diff
Patch
(2.66 KB, patch)
2012-01-17 22:31 PST
,
Alexandre Elias
no flags
Details
Formatted Diff
Diff
Patch
(13.91 KB, patch)
2012-01-18 15:16 PST
,
Alexandre Elias
no flags
Details
Formatted Diff
Diff
Patch
(16.13 KB, patch)
2012-01-18 17:03 PST
,
Alexandre Elias
no flags
Details
Formatted Diff
Diff
Patch
(16.05 KB, patch)
2012-01-19 14:52 PST
,
Alexandre Elias
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Alexandre Elias
Comment 1
2012-01-13 19:13:06 PST
Created
attachment 122532
[details]
Patch
Alexandre Elias
Comment 2
2012-01-17 15:52:35 PST
Created
attachment 122831
[details]
Patch
James Robinson
Comment 3
2012-01-17 17:11:14 PST
Comment on
attachment 122831
[details]
Patch Possibly dumb idea: can we just make the NonCompositedContentHost's m_graphicsLayer be as big as the viewport always even if the content size is smaller and rely on checkerboarding?
Alexandre Elias
Comment 4
2012-01-17 17:15:23 PST
I tried that before taking this approach. The problem was that content size doesn't necessarily lie on tile boundaries, so there was a stretch of debug color between on the last content tile. Nor is it desirable to rely on painting background color onto the tiles themselves.
Adrienne Walker
Comment 5
2012-01-17 17:51:15 PST
@jamesr: I think painting outside what WebKit thinks is the bounds on an element will just get you "debug red" or nothing at all, so setting the size on just the graphics layer probably won't do the right thing. And, I'm not sure this can only be solved on the main thread side; don't we need to handle this at draw time because of a pinch-zoom on the impl thread? Although, looking at this patch, I'm kind of sad at code that has to look for a layer with isNonCompositedContent set on it. I'm really hoping we can get rid of that flag eventually.
Alexandre Elias
Comment 6
2012-01-17 19:40:04 PST
(In reply to
comment #5
)
> Although, looking at this patch, I'm kind of sad at code that has to look for a layer with isNonCompositedContent set on it. I'm really hoping we can get rid of that flag eventually.
I suppose instead I could add a function to CCLayerImpl that walks the tree and returns the first layer with drawsContent() == true. Would that be guaranteed to be equivalent?
James Robinson
Comment 7
2012-01-17 20:03:37 PST
That doesn't seem any better. What about having a layer that draws to infinity regardless of the content size, but doesn't issue paints outside its contentBounds? Not sure if that's a ton better but I'd like to somehow express this within the compositor code in a way that's not so tightly bound to the details of what we're doing in the WebKit side.
Alexandre Elias
Comment 8
2012-01-17 22:31:49 PST
Created
attachment 122873
[details]
Patch
Alexandre Elias
Comment 9
2012-01-17 22:35:09 PST
OK, I moved it to the layer side. It does seem more natural to put it there. It's still using isNonCompositedContent() for now; should I add a new property called like hasInfiniteBackground pushed through the commit process, or is there something else I could piggyback on?
James Robinson
Comment 10
2012-01-18 11:15:58 PST
Looks like this should be pretty easily testable, no?
Alexandre Elias
Comment 11
2012-01-18 15:16:42 PST
Created
attachment 123008
[details]
Patch
Alexandre Elias
Comment 12
2012-01-18 15:28:31 PST
Added a test and a new property called "backgroundCoversViewport" (to avoid using isNonCompositedContent).
James Robinson
Comment 13
2012-01-18 16:13:32 PST
Comment on
attachment 123008
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=123008&action=review
> Source/WebCore/platform/graphics/chromium/LayerChromium.h:94 > + void setBackgroundCoversViewport(bool); > + bool backgroundCoversViewport() const { return m_backgroundCoversViewport; }
this flag appears to only be supported on tiled layers - can we move the bit down to TiledLayerChromium or have some sort of comment at least indicating that it's a no-op for other layer types?
Alexandre Elias
Comment 14
2012-01-18 17:03:28 PST
Created
attachment 123039
[details]
Patch
Alexandre Elias
Comment 15
2012-01-18 17:06:59 PST
OK, I moved up the implementation to CCLayerImpl as there is nothing specific to TiledLayerChromium about it. The test is still against TiledLayer as that test file has more utilities for rect comparison. Also, I added support for drawing a fullscreen rect when the visibleLayerRect is empty (which seems like the correct thing to do).
W. James MacLean
Comment 16
2012-01-19 06:32:34 PST
Perhaps this is not what you are looking for, but the SolidColorLayer bug (
https://bugs.webkit.org/show_bug.cgi?id=75732
) is designed to help with a similar problem in Aura ... what if one just puts a solid color layer behind everything else?
Alexandre Elias
Comment 17
2012-01-19 13:00:52 PST
I talked it over a bit with James, and we agreed that we should probably have both this backgroundCoversViewport feature and your layer type. Although each feature could be shoehorned to also address the other case, the details are different so it would be ugly. In my case I want the color to always fill the viewport (instead of being fixed in advance), and to be tied to the root content layer's background color.
James Robinson
Comment 18
2012-01-19 13:24:29 PST
You've got merge conflicts!
James Robinson
Comment 19
2012-01-19 13:25:11 PST
Comment on
attachment 123039
[details]
Patch Looks good, R=me. Will need to fix merge issues before landing.
W. James MacLean
Comment 20
2012-01-19 13:51:27 PST
(In reply to
comment #17
)
> I talked it over a bit with James, and we agreed that we should probably have both this backgroundCoversViewport feature and your layer type. Although each feature could be shoehorned to also address the other case, the details are different so it would be ugly. In my case I want the color to always fill the viewport (instead of being fixed in advance), and to be tied to the root content layer's background color.
Sounds fair!
Alexandre Elias
Comment 21
2012-01-19 14:52:52 PST
Created
attachment 123202
[details]
Patch
James Robinson
Comment 22
2012-01-19 16:27:43 PST
Comment on
attachment 123202
[details]
Patch R=me
WebKit Review Bot
Comment 23
2012-01-19 18:21:20 PST
Comment on
attachment 123202
[details]
Patch Clearing flags on attachment: 123202 Committed
r105470
: <
http://trac.webkit.org/changeset/105470
>
WebKit Review Bot
Comment 24
2012-01-19 18:21:25 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug