Bug 103843 - Coordinated Graphics: Reorder messages to CoordinatedLayerTreeHostProxy
Summary: Coordinated Graphics: Reorder messages to CoordinatedLayerTreeHostProxy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dongseong Hwang
URL:
Keywords:
Depends on: 104257 104260 104518
Blocks: 103854 104990
  Show dependency treegraph
 
Reported: 2012-12-02 14:53 PST by Dongseong Hwang
Modified: 2012-12-13 21:00 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.21 KB, patch)
2012-12-02 15:36 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch (2.19 KB, patch)
2012-12-02 17:19 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: flush compositing states of layers by the tree order (2.40 KB, patch)
2012-12-02 21:29 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer() (3.17 KB, patch)
2012-12-02 21:37 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Send messages to the UI process by the tree order. (2.13 KB, patch)
2012-12-02 22:40 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer() (3.08 KB, patch)
2012-12-02 22:44 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. (7.75 KB, patch)
2012-12-02 23:07 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once (1.98 KB, patch)
2012-12-02 23:14 PST, Dongseong Hwang
dongseong.hwang: review+
dongseong.hwang: commit-queue-
Details | Formatted Diff | Diff
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. (5.82 KB, patch)
2012-12-04 00:08 PST, Dongseong Hwang
noam: review+
noam: commit-queue-
Details | Formatted Diff | Diff
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once (2.08 KB, patch)
2012-12-04 00:11 PST, Dongseong Hwang
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. (5.91 KB, patch)
2012-12-04 01:07 PST, Dongseong Hwang
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once (2.01 KB, patch)
2012-12-04 01:10 PST, Dongseong Hwang
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. (5.89 KB, patch)
2012-12-04 02:12 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once (1.95 KB, patch)
2012-12-05 20:26 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. (6.33 KB, patch)
2012-12-09 20:50 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once (2.08 KB, patch)
2012-12-12 22:37 PST, Dongseong Hwang
noam: review+
noam: commit-queue-
Details | Formatted Diff | Diff
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once (2.03 KB, patch)
2012-12-13 16:22 PST, Dongseong Hwang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dongseong Hwang 2012-12-02 14:53:15 PST
We must flush compositing states of layers by the tree order: root layer,
non-composited layer, page-overlay layer and WebCore's root layer. If flushing
by wrong order, child layer cannot know which layer is its parent. This patch
flushes layer states by the tree order.

In addiation, this patch removes updateViewport() in
LayerTreeCoordinatorProxy::setRootCompositingLayer() because
LayerTreeCoordinatorProxy::didRenderFrame() is always called after
setting the root layer.
Comment 1 Dongseong Hwang 2012-12-02 15:36:17 PST
Created attachment 177156 [details]
Patch
Comment 2 Noam Rosenthal 2012-12-02 16:56:19 PST
Comment on attachment 177156 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=177156&action=review

> Source/WebKit2/ChangeLog:16
> +        In addition, this patch removes updateViewport() in
> +        LayerTreeCoordinatorProxy::setRootCompositingLayer() because
> +        LayerTreeCoordinatorProxy::didRenderFrame() is always called after
> +        setting the root layer.

Different patch.

> Source/WebKit2/ChangeLog:20
> +        In addition, this patch clarifies LayerTreeRenderer::setRootLayerID() can be
> +        called only once in its lifecycle. LayerTreeRenderer, LayerTreeCoordinator and
> +        LayerTreeCoordinatorProxy belong to WebPage, so those have the same lifecycle

Different patch.
Comment 3 Dongseong Hwang 2012-12-02 16:58:57 PST
(In reply to comment #2)
> (From update of attachment 177156 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177156&action=review
> 
> > Source/WebKit2/ChangeLog:16
> > +        In addition, this patch removes updateViewport() in
> > +        LayerTreeCoordinatorProxy::setRootCompositingLayer() because
> > +        LayerTreeCoordinatorProxy::didRenderFrame() is always called after
> > +        setting the root layer.
> 
> Different patch.
> 
> > Source/WebKit2/ChangeLog:20
> > +        In addition, this patch clarifies LayerTreeRenderer::setRootLayerID() can be
> > +        called only once in its lifecycle. LayerTreeRenderer, LayerTreeCoordinator and
> > +        LayerTreeCoordinatorProxy belong to WebPage, so those have the same lifecycle
> 
> Different patch.

Thanks for review! I'll separate!
Comment 4 Dongseong Hwang 2012-12-02 17:19:01 PST
Created attachment 177164 [details]
Patch
Comment 5 Noam Rosenthal 2012-12-02 17:20:10 PST
Comment on attachment 177164 [details]
Patch

Is there any way to test this?
Comment 6 Dongseong Hwang 2012-12-02 17:38:38 PST
(In reply to comment #5)
> (From update of attachment 177164 [details])
> Is there any way to test this?

I made this patch not due to bug.
I made this patch because I just found this weird seq.

Moreover, LayerTreeRenderer::flushLayerChanges() calls m_rootLayer->flushCompositingState(FloatRect()). If a bug exists, it must be a timing bug.
Unfortunately, I don't have a good idea.
Comment 7 Noam Rosenthal 2012-12-02 17:40:53 PST
Comment on attachment 177164 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=177164&action=review

> Source/WebKit2/ChangeLog:11
> +        We must flush compositing states of layers by the tree order: root layer,
> +        non-composited layer, page-overlay layer and WebCore's root layer. If flushing
> +        by wrong order, child layer cannot know which layer is its parent. This patch
> +        flushes layer states by the tree order.

But setting the parent/children has nothing to do with flushing... I still don't think there's a bug here.
Comment 8 Dongseong Hwang 2012-12-02 17:52:29 PST
(In reply to comment #7)
> (From update of attachment 177164 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177164&action=review
> 
> > Source/WebKit2/ChangeLog:11
> > +        We must flush compositing states of layers by the tree order: root layer,
> > +        non-composited layer, page-overlay layer and WebCore's root layer. If flushing
> > +        by wrong order, child layer cannot know which layer is its parent. This patch
> > +        flushes layer states by the tree order.
> 
> But setting the parent/children has nothing to do with flushing... I still don't think there's a bug here.

In my understanding, setting children causes flushing. During flushing, we set children to each TextureMapperLayer.

So, if animation calls updateViewport() between flushing root layer and DidRenderFrame, flash can occur.

void LayerTreeCoordinator::syncLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
{
    m_shouldSyncFrame = true;
    m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetCompositingLayerChildren(id, children));
}

void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper*)
{
    ...
    if (changeMask & ParentChange) {
        TextureMapperLayer* newParent = toTextureMapperLayer(graphicsLayer->parent());
        if (newParent != m_parent) {
            // Remove layer from current from child list first.
            if (m_parent) {
                size_t index = m_parent->m_children.find(this);
                m_parent->m_children.remove(index);
                m_parent = 0;
            }
            // Set new layer parent and add layer to the parents child list.
            if (newParent) {
                m_parent = newParent;
                m_parent->m_children.append(this);
            }
        }
    }

    if (changeMask & ChildrenChange) {
        // Clear children parent pointer to avoid unsync and crash on layer delete.
        for (size_t i = 0; i < m_children.size(); i++)
            m_children[i]->m_parent = 0;

        m_children.clear();
        for (size_t i = 0; i < graphicsLayer->children().size(); ++i) {
            TextureMapperLayer* child = toTextureMapperLayer(graphicsLayer->children()[i]);
            if (!child)
                continue;
            m_children.append(child);
            child->m_parent = this;
        }
    }
    ...
}
Comment 9 Noam Rosenthal 2012-12-02 18:25:07 PST
Comment on attachment 177164 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=177164&action=review

>>> Source/WebKit2/ChangeLog:11
>>> +        flushes layer states by the tree order.
>> 
>> But setting the parent/children has nothing to do with flushing... I still don't think there's a bug here.
> 
> In my understanding, setting children causes flushing. During flushing, we set children to each TextureMapperLayer.
> 
> So, if animation calls updateViewport() between flushing root layer and DidRenderFrame, flash can occur.
> 
> void LayerTreeCoordinator::syncLayerChildren(WebLayerID id, const Vector<WebLayerID>& children)
> {
>     m_shouldSyncFrame = true;
>     m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetCompositingLayerChildren(id, children));
> }
> 
> void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper*)
> {
>     ...
>     if (changeMask & ParentChange) {
>         TextureMapperLayer* newParent = toTextureMapperLayer(graphicsLayer->parent());
>         if (newParent != m_parent) {
>             // Remove layer from current from child list first.
>             if (m_parent) {
>                 size_t index = m_parent->m_children.find(this);
>                 m_parent->m_children.remove(index);
>                 m_parent = 0;
>             }
>             // Set new layer parent and add layer to the parents child list.
>             if (newParent) {
>                 m_parent = newParent;
>                 m_parent->m_children.append(this);
>             }
>         }
>     }
> 
>     if (changeMask & ChildrenChange) {
>         // Clear children parent pointer to avoid unsync and crash on layer delete.
>         for (size_t i = 0; i < m_children.size(); i++)
>             m_children[i]->m_parent = 0;
> 
>         m_children.clear();
>         for (size_t i = 0; i < graphicsLayer->children().size(); ++i) {
>             TextureMapperLayer* child = toTextureMapperLayer(graphicsLayer->children()[i]);
>             if (!child)
>                 continue;
>             m_children.append(child);
>             child->m_parent = this;
>         }
>     }
>     ...
> }

Right, but in this case you're not flushing to TextureMapperLayer, you're flushing CoordinatedGraphicsLayer... Since we only call DidRenderFrame at the end anyway, I still fail to see your point :)
Comment 10 Dongseong Hwang 2012-12-02 19:20:59 PST
(In reply to comment #9)
> (From update of attachment 177164 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177164&action=review
> Right, but in this case you're not flushing to TextureMapperLayer, you're flushing CoordinatedGraphicsLayer... Since we only call DidRenderFrame at the end anyway, I still fail to see your point :)

OMG, I understand what you mean.
Only DidRenderFrame can start to sync TextureMapperLayer tree, so this patch can not change any behavior.

This patch only improves readability slightly. Could you think this patch needed? If so, I'll change changelog and repost.
Comment 11 Noam Rosenthal 2012-12-02 19:29:10 PST
> This patch only improves readability slightly. Could you think this patch needed? If so, I'll change changelog and repost.
I think it's questionable whether this improves readability or not... I would propose to give it up :)
Comment 12 Dongseong Hwang 2012-12-02 20:23:10 PST
(In reply to comment #11)
> > This patch only improves readability slightly. Could you think this patch needed? If so, I'll change changelog and repost.
> I think it's questionable whether this improves readability or not... I would propose to give it up :)

Your concern is very reasonable. However, I can not give it up because of actor model.

After implementing actor model TextureMapperLayer, LayerTreeRenderer must manage tree traversing while GraphicsLayerTextureMapper manages tree traversing too. (like Bug 103366).
I have the plan that TextureMapperLayer has a queue like render queue of LayerTreeRenderer. and then LayerTreeRenderer dispatches a task like SetLayerState to TextureMapperLayer when receiving the given task. and then when LayerTreeRenderer calls TextureMapperLayer::flushCompositingState(), TextureMapperLayer will flush all tasks in the queue.

Before implementing above actor model, we need to refactor the communication between LayerTreeCoordinator and LayerTreeRenderer.
Currently, LayerTreeCoordinator sends messages by convenient order for implementation, but in WK1 the order is impossible.
For example,
1. this bug. It is possible to sync WebCore root layer before synchronizing AC root layer.
2. synchronizing layer states can be called before calling SetRootLayerID.
3. LayerTreeRenderer::setChildrend() can create children layers. I want to create children layers as soon as Web Process children layers are created.
4. etc..

If we make the communication order consistent with WK1, I think we can get two benefits.
1. Easy to understand call flow.
2. Avoid potential bugs like Bug 103522.

Most of all, LayerTreeRenderer can just dispatch tasks to TextureMapperLayer in that LayerTreeRenderer can believe LayerTreeCoordinator sends messages by right order!
Comment 13 Dongseong Hwang 2012-12-02 21:18:56 PST
I'll post several small patches to correct the communication order. I want to listen your opinion. :)
Comment 14 Dongseong Hwang 2012-12-02 21:29:27 PST
Created attachment 177173 [details]
Patch: flush compositing states of layers by the tree order
Comment 15 Dongseong Hwang 2012-12-02 21:37:28 PST
Created attachment 177176 [details]
Patch: Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer()
Comment 16 Noam Rosenthal 2012-12-02 21:58:44 PST
Comment on attachment 177176 [details]
Patch: Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer()

Reapply changelog with new bug title.
Comment 17 Noam Rosenthal 2012-12-02 22:00:30 PST
Comment on attachment 177173 [details]
Patch: flush compositing states of layers by the tree order

View in context: https://bugs.webkit.org/attachment.cgi?id=177173&action=review

> Source/WebKit2/ChangeLog:14
> +        It is a preparation patch to change TextureMapperLayer to actor model.
> +
> +        We should flush compositing states of layers by the tree order: root layer,
> +        non-composited layer, page-overlay layer and WebCore's root layer. Currently, it
> +        is not a problem, but when implementing actor model, it can causes bugs, because
> +        LayerTreeRenderer expects to receive the SetLayerState message by the tree
> +        order. This patch flushes layer states by the tree order.

Reword:
Send messages to the UI process by the tree order.
This is in preparation for refactoring TextureMapper to work in an actor model ([put link to meta-bug for that refactor here]).
Comment 18 Dongseong Hwang 2012-12-02 22:08:58 PST
(In reply to comment #17)
> (From update of attachment 177173 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=177173&action=review
> 
> > Source/WebKit2/ChangeLog:14
> > +        It is a preparation patch to change TextureMapperLayer to actor model.
> > +
> > +        We should flush compositing states of layers by the tree order: root layer,
> > +        non-composited layer, page-overlay layer and WebCore's root layer. Currently, it
> > +        is not a problem, but when implementing actor model, it can causes bugs, because
> > +        LayerTreeRenderer expects to receive the SetLayerState message by the tree
> > +        order. This patch flushes layer states by the tree order.
> 
> Reword:
> Send messages to the UI process by the tree order.
> This is in preparation for refactoring TextureMapper to work in an actor model ([put link to meta-bug for that refactor here]).

Thx for rephrasing!!
Comment 19 Dongseong Hwang 2012-12-02 22:40:27 PST
Created attachment 177181 [details]
Patch: Send messages to the UI process by the tree order.
Comment 20 Dongseong Hwang 2012-12-02 22:44:39 PST
Created attachment 177182 [details]
Patch: Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer()
Comment 21 Dongseong Hwang 2012-12-02 23:07:35 PST
Created attachment 177189 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message.
Comment 22 Dongseong Hwang 2012-12-02 23:14:08 PST
Created attachment 177190 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once
Comment 23 Dongseong Hwang 2012-12-02 23:16:14 PST
Comment on attachment 177190 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once

I have run layout test(compositing) and load various tests(e.g. snowstack) with Qt WK2 debug build.
Comment 24 WebKit Review Bot 2012-12-02 23:28:16 PST
Comment on attachment 177181 [details]
Patch: Send messages to the UI process by the tree order.

Clearing flags on attachment: 177181

Committed r136367: <http://trac.webkit.org/changeset/136367>
Comment 25 Dongseong Hwang 2012-12-03 18:36:11 PST
I have problem about TiledBackingStore.

When I clear the life cycle of CoordinatedGraphicsLayer, I find CreateTile and RemoveTile messages can be sent to UI Process regardless of CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly(). It means UI Process can receive CreateTile message before LayerTreeRenderer creates the given layer.

I need to refactor CoordinatedGraphicsLayer with TiledBackingStore before progressing about the life cycle of CoordinatedGraphicsLayer.

I'll refactor in Bug 103959
Comment 26 Dongseong Hwang 2012-12-03 23:33:36 PST
noam comes back! I wait you :)

how about 3rd and 4rd patches? I can repost.
Comment 27 Noam Rosenthal 2012-12-03 23:36:51 PST
Comment on attachment 177189 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message.

This feels a bit awkward.
I think LayerTreeCoordinator should deal with this internally, e.g. by sending the rootLayer message once right before the first coordinating message, rather than have CoordinatedGraphicsLayer know about this.
Comment 28 WebKit Review Bot 2012-12-03 23:37:25 PST
Comment on attachment 177182 [details]
Patch: Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer()

Clearing flags on attachment: 177182

Committed r136477: <http://trac.webkit.org/changeset/136477>
Comment 29 Noam Rosenthal 2012-12-03 23:37:30 PST
Comment on attachment 177190 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once

LGTM, not committing in case this depends on something else...
Comment 30 Dongseong Hwang 2012-12-03 23:43:18 PST
(In reply to comment #27)
> (From update of attachment 177189 [details])
> This feels a bit awkward.
> I think LayerTreeCoordinator should deal with this internally, e.g. by sending the rootLayer message once right before the first coordinating message, rather than have CoordinatedGraphicsLayer know about this.

I agree on you. My first trial was similar to your comments, but I failed, because of two reasons.
1. RenderLayerBacking calls CoordinatedGraphicsLayer::flushCompositingState. I cannot handle it.
2. We can communicate only if LayerTreeCoordinator::m_layerFlushSchedulingEnabled is true, but the constructor of LayerTreeCoordinator set m_layerFlushSchedulingEnabled to false, so I can not send the SetRootLayer message in constructor.

Can I send the SetRootLayer message in constructor. If so, everything will be fine. If not, I'll investigate what can I do, and I need advice too. :-)
Comment 31 Dongseong Hwang 2012-12-03 23:54:42 PST
(In reply to comment #30)
> (In reply to comment #27)
> > (From update of attachment 177189 [details] [details])
> > This feels a bit awkward.
> > I think LayerTreeCoordinator should deal with this internally, e.g. by sending the rootLayer message once right before the first coordinating message, rather than have CoordinatedGraphicsLayer know about this.
> 
> I agree on you. My first trial was similar to your comments, but I failed, because of two reasons.
> 1. RenderLayerBacking calls CoordinatedGraphicsLayer::flushCompositingState. I cannot handle it.
> 2. We can communicate only if LayerTreeCoordinator::m_layerFlushSchedulingEnabled is true, but the constructor of LayerTreeCoordinator set m_layerFlushSchedulingEnabled to false, so I can not send the SetRootLayer message in constructor.
> 
> Can I send the SetRootLayer message in constructor. If so, everything will be fine. If not, I'll investigate what can I do, and I need advice too. :-)

Oops, I found the constructor of LayerTreeCoordinator set m_layerFlushSchedulingEnabled to true. I think we can send SetRootLayer message in the constructor as you suggest. I'll post.
Comment 32 Dongseong Hwang 2012-12-04 00:08:35 PST
Created attachment 177429 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message.
Comment 33 Dongseong Hwang 2012-12-04 00:11:40 PST
Created attachment 177431 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once
Comment 34 Noam Rosenthal 2012-12-04 00:33:40 PST
Comment on attachment 177429 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. 

View in context: https://bugs.webkit.org/attachment.cgi?id=177429&action=review

> Source/WebKit2/ChangeLog:8
> +        Send SetRootCompositingLayer message to the UI process firstly.

Send SetRootCompositingLayer message to the UI process in the constructor instead of sending it on the first flush.

> Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:138
> +    void setRootCompositingLayer();

initializeRootCompositingLayer
Comment 35 WebKit Review Bot 2012-12-04 00:35:20 PST
Comment on attachment 177431 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once 

Rejecting attachment 177431 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
: /mnt/git/webkit-commit-queue

Parsed 2 diffs from patch file(s).
patching file Source/WebKit2/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
Hunk #1 FAILED at 390.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/15100918
Comment 36 Dongseong Hwang 2012-12-04 01:07:48 PST
Created attachment 177439 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message.
Comment 37 Dongseong Hwang 2012-12-04 01:10:24 PST
Created attachment 177441 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once
Comment 38 WebKit Review Bot 2012-12-04 01:20:52 PST
Comment on attachment 177441 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once

Rejecting attachment 177441 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
: /mnt/git/webkit-commit-queue

Parsed 2 diffs from patch file(s).
patching file Source/WebKit2/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
Hunk #1 FAILED at 390.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/15119720
Comment 39 WebKit Review Bot 2012-12-04 01:51:09 PST
Comment on attachment 177439 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. 

Rejecting attachment 177439 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
ripts/update-webkit line 152.

Failed to run "['Tools/Scripts/update-webkit', '--chromium', '--force-update']" exit_code: 2
Updating OpenSource
From http://git.chromium.org/external/Webkit
   e1d9afb..eb9e8cc  HEAD       -> origin/HEAD
error: Ref refs/remotes/origin/master is at eb9e8ccd030f66f658b9fcdabeeb134aaaf82783 but expected e1d9afb15f764221f3a35669b6a775bba2812d7f
 ! e1d9afb..eb9e8cc  master     -> origin/master  (unable to update local ref)
Died at Tools/Scripts/update-webkit line 152.

Full output: http://queues.webkit.org/results/15138117
Comment 40 Dongseong Hwang 2012-12-04 02:12:08 PST
Created attachment 177452 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message.
Comment 41 Dongseong Hwang 2012-12-04 02:13:02 PST
Comment on attachment 177439 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. 

I think commit bot can not handle this edge case of changelog. I'll post again
Comment 42 WebKit Review Bot 2012-12-05 18:50:58 PST
Comment on attachment 177452 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. 

Clearing flags on attachment: 177452

Committed r136788: <http://trac.webkit.org/changeset/136788>
Comment 43 WebKit Review Bot 2012-12-05 18:51:04 PST
All reviewed patches have been landed.  Closing bug.
Comment 44 Dongseong Hwang 2012-12-05 20:26:34 PST
Reopening to attach new patch.
Comment 45 Dongseong Hwang 2012-12-05 20:26:39 PST
Created attachment 177916 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once
Comment 46 WebKit Review Bot 2012-12-05 21:10:32 PST
Comment on attachment 177916 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once 

Clearing flags on attachment: 177916

Committed r136795: <http://trac.webkit.org/changeset/136795>
Comment 47 WebKit Review Bot 2012-12-05 21:10:38 PST
All reviewed patches have been landed.  Closing bug.
Comment 48 Thiago Marcos P. Santos 2012-12-06 06:32:02 PST
http://trac.webkit.org/changeset/136788 is asserting on the EFL bots.

19:09:51.869 28151   ASSERTION FAILED: m_rootLayerID != InvalidWebLayerID
19:09:51.869 28151   /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp(331) : void WebKit::LayerTreeRenderer::setLayerState(WebKit::WebLayerID, const WebKit::WebLayerInfo&)
19:09:51.869 28151   1   0x7f24b0eb13b6 WebKit::LayerTreeRenderer::setLayerState(unsigned int, WebKit::WebLayerInfo const&)
19:09:51.869 28151   2   0x7f24b0eaffa7 WTF::FunctionWrapper<void (WebKit::LayerTreeRenderer::*)(unsigned int, WebKit::WebLayerInfo const&)>::operator()(WebKit::LayerTreeRenderer*, unsigned int, WebKit::WebLayerInfo const&)
19:09:51.869 28151   3   0x7f24b0eaf6a2 WTF::BoundFunctionImpl<WTF::FunctionWrapper<void (WebKit::LayerTreeRenderer::*)(unsigned int, WebKit::WebLayerInfo const&)>, void (WebKit::LayerTreeRenderer*, unsigned int, WebKit::WebLayerInfo)>::operator()()
19:09:51.869 28151   4   0x7f24b800ccfa WTF::Function<void ()>::operator()() const
19:09:51.869 28151   5   0x7f24b0eb3084 WebKit::LayerTreeRenderer::syncRemoteContent()
19:09:51.869 28151   6   0x7f24b0eb07cb WebKit::LayerTreeRenderer::paintToCurrentGLContext(WebCore::TransformationMatrix const&, float, WebCore::FloatRect const&, unsigned int)
19:09:51.869 28151   7   0x7f24b0fe4c08 EwkViewImpl::displayTimerFired(WebCore::Timer<EwkViewImpl>*)
19:09:51.869 28151   8   0x7f24b0fec21a WebCore::Timer<EwkViewImpl>::fired()
19:09:51.869 28151   9   0x7f24b445929a WebCore::ThreadTimers::sharedTimerFiredInternal()
19:09:51.869 28151   10  0x7f24b44591bb WebCore::ThreadTimers::sharedTimerFired()
19:09:51.869 28151   11  0x7f24b4e722ed
19:09:51.869 28151   12  0x7f24b016533e _ecore_timer_expired_call
19:09:51.869 28151   13  0x7f24b016550b _ecore_timer_expired_timers_call
19:09:51.869 28151   14  0x7f24b0162421
19:09:51.869 28151   15  0x7f24b0162ab7 ecore_main_loop_begin
19:09:51.869 28151   16  0x433a79 WTR::TestController::platformRunUntil(bool&, double)
19:09:51.869 28151   17  0x41eba0 WTR::TestController::runUntil(bool&, WTR::TestController::TimeoutDuration)
19:09:51.869 28151   18  0x425c5a WTR::TestInvocation::invoke()
19:09:51.869 28151   19  0x41e8d8 WTR::TestController::runTest(char const*)
19:09:51.869 28151   20  0x41ea11 WTR::TestController::runTestingServerLoop()
19:09:51.869 28151   21  0x41eaab WTR::TestController::run()
19:09:51.869 28151   22  0x41c4c1 WTR::TestController::TestController(int, char const**)
19:09:51.869 28151   23  0x433c12 main
19:09:51.869 28151   24  0x7f24aecc376d __libc_start_main
19:09:51.869 28151   25  0x41ae39
Comment 49 Dongseong Hwang 2012-12-07 19:34:29 PST
The 3rd and 4rd patches were rolled out due to misunderstanding.
I explained in https://bugs.webkit.org/show_bug.cgi?id=104260#c4

I'll commit again.
Comment 50 Dongseong Hwang 2012-12-07 19:37:27 PST
(In reply to comment #48)
> http://trac.webkit.org/changeset/136788 is asserting on the EFL bots.
> 
> 19:09:51.869 28151   ASSERTION FAILED: m_rootLayerID != InvalidWebLayerID
> 19:09:51.869 28151   /home/buildslave-1/webkit-buildslave/efl-linux-64-debug-wk2/build/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp(331) : void WebKit::LayerTreeRenderer::setLayerState(WebKit::WebLayerID, const WebKit::WebLayerInfo&)
> 19:09:51.869 28151   1   0x7f24b0eb13b6 WebKit::LayerTreeRenderer::setLayerState(unsigned int, WebKit::WebLayerInfo const&)
> 19:09:51.869 28151   2   0x7f24b0eaffa7 WTF::FunctionWrapper<void (WebKit::LayerTreeRenderer::*)(unsigned int, WebKit::WebLayerInfo const&)>::operator()(WebKit::LayerTreeRenderer*, unsigned int, WebKit::WebLayerInfo const&)
> 19:09:51.869 28151   3   0x7f24b0eaf6a2 WTF::BoundFunctionImpl<WTF::FunctionWrapper<void (WebKit::LayerTreeRenderer::*)(unsigned int, WebKit::WebLayerInfo const&)>, void (WebKit::LayerTreeRenderer*, unsigned int, WebKit::WebLayerInfo)>::operator()()
> 19:09:51.869 28151   4   0x7f24b800ccfa WTF::Function<void ()>::operator()() const
> 19:09:51.869 28151   5   0x7f24b0eb3084 WebKit::LayerTreeRenderer::syncRemoteContent()
> 19:09:51.869 28151   6   0x7f24b0eb07cb WebKit::LayerTreeRenderer::paintToCurrentGLContext(WebCore::TransformationMatrix const&, float, WebCore::FloatRect const&, unsigned int)
> 19:09:51.869 28151   7   0x7f24b0fe4c08 EwkViewImpl::displayTimerFired(WebCore::Timer<EwkViewImpl>*)
> 19:09:51.869 28151   8   0x7f24b0fec21a WebCore::Timer<EwkViewImpl>::fired()
> 19:09:51.869 28151   9   0x7f24b445929a WebCore::ThreadTimers::sharedTimerFiredInternal()
> 19:09:51.869 28151   10  0x7f24b44591bb WebCore::ThreadTimers::sharedTimerFired()
> 19:09:51.869 28151   11  0x7f24b4e722ed
> 19:09:51.869 28151   12  0x7f24b016533e _ecore_timer_expired_call
> 19:09:51.869 28151   13  0x7f24b016550b _ecore_timer_expired_timers_call
> 19:09:51.869 28151   14  0x7f24b0162421
> 19:09:51.869 28151   15  0x7f24b0162ab7 ecore_main_loop_begin
> 19:09:51.869 28151   16  0x433a79 WTR::TestController::platformRunUntil(bool&, double)
> 19:09:51.869 28151   17  0x41eba0 WTR::TestController::runUntil(bool&, WTR::TestController::TimeoutDuration)
> 19:09:51.869 28151   18  0x425c5a WTR::TestInvocation::invoke()
> 19:09:51.869 28151   19  0x41e8d8 WTR::TestController::runTest(char const*)
> 19:09:51.869 28151   20  0x41ea11 WTR::TestController::runTestingServerLoop()
> 19:09:51.869 28151   21  0x41eaab WTR::TestController::run()
> 19:09:51.869 28151   22  0x41c4c1 WTR::TestController::TestController(int, char const**)
> 19:09:51.869 28151   23  0x433c12 main
> 19:09:51.869 28151   24  0x7f24aecc376d __libc_start_main
> 19:09:51.869 28151   25  0x41ae39

It showed I made a mistake. I'll investigate before repost. :) thank you for reporting.
Comment 51 Dongseong Hwang 2012-12-09 20:44:54 PST
Comment on attachment 177452 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. 

View in context: https://bugs.webkit.org/attachment.cgi?id=177452&action=review

> Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:122
> +    initializeRootCompositingLayer();

EFL can not send messages to UI Process at this time, although Qt can.
It causes EFL hitting ASSERT in Bug 104257.
I'll send SetRootCompositingLayer message at the first flush time.
Comment 52 Dongseong Hwang 2012-12-09 20:50:33 PST
Created attachment 178464 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message.
Comment 53 WebKit Review Bot 2012-12-09 22:46:56 PST
Comment on attachment 178464 [details]
Patch: Send SetRootCompositingLayer message to the UI process before SetLayerState message. 

Clearing flags on attachment: 178464

Committed r137109: <http://trac.webkit.org/changeset/137109>
Comment 54 WebKit Review Bot 2012-12-09 22:47:03 PST
All reviewed patches have been landed.  Closing bug.
Comment 55 Dongseong Hwang 2012-12-12 21:33:54 PST
Reopening to attach new patch.
Comment 56 Dongseong Hwang 2012-12-12 22:37:33 PST
Created attachment 179199 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once
Comment 57 Dongseong Hwang 2012-12-12 22:40:40 PST
(In reply to comment #56)
> Created an attachment (id=179199) [details]
> Patch

This patch rollouted in Bug 104260 due to other reason.
Bug 104518 fixed the reason, so I post again this patch.
Comment 58 Dongseong Hwang 2012-12-12 22:43:32 PST
Comment on attachment 179199 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once 

Turn on r? because code is little changed.

Previous patch added following assertion.
+    ASSERT(layerID != m_rootLayerID);
+    ASSERT(layerID != InvalidWebLayerID);

This patch added following assertion.
+    ASSERT(layerID != InvalidCoordinatedLayerID);
+    ASSERT(m_rootLayerID == InvalidCoordinatedLayerID);

This assertion is more strict.
Comment 59 Noam Rosenthal 2012-12-13 07:15:07 PST
Comment on attachment 179199 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once 

Names were changed....
Comment 60 Dongseong Hwang 2012-12-13 16:22:19 PST
Created attachment 179369 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once
Comment 61 Dongseong Hwang 2012-12-13 16:26:42 PST
(In reply to comment #59)
> (From update of attachment 179199 [details])
> Names were changed....

You are right! :$
Comment 62 WebKit Review Bot 2012-12-13 16:43:38 PST
Comment on attachment 179369 [details]
Patch: Clarify LayerTreeRenderer::setRootLayerID() can be called only once

Clearing flags on attachment: 179369

Committed r137685: <http://trac.webkit.org/changeset/137685>
Comment 63 WebKit Review Bot 2012-12-13 16:43:46 PST
All reviewed patches have been landed.  Closing bug.