Bug 111401 - [EFL][WK2] WebView::didRenderFrame() does not need to schedule update display.
Summary: [EFL][WK2] WebView::didRenderFrame() does not need to schedule update display.
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dongseong Hwang
URL:
Keywords:
Depends on: 110741
Blocks: 110066 111405
  Show dependency treegraph
 
Reported: 2013-03-04 20:30 PST by Dongseong Hwang
Modified: 2017-03-11 10:37 PST (History)
8 users (show)

See Also:


Attachments
Patch (2.36 KB, patch)
2013-03-04 20:57 PST, Dongseong Hwang
gyuyoung.kim: review-
gyuyoung.kim: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dongseong Hwang 2013-03-04 20:30:52 PST
PageClient::didRenderFrame() is called to notify time to draw, so didRenderFrame()
is not related to scheduling update display. QtPageClient::didRenderFrame() does
not schedule update display also. So this patch makes WebView::didRenderFrame()
not schedule update display.

On the other hands, PageClient::setViewNeedsDisplay() requires scheduling update
display to draw contents next time, so WebView::setViewNeedsDisplay() must
schedule update display.
Comment 1 Dongseong Hwang 2013-03-04 20:57:12 PST
Created attachment 191392 [details]
Patch
Comment 2 Dongseong Hwang 2013-03-04 21:42:22 PST
This isa  potential bug that the change of Bug 111405 can reveal.
Comment 3 Mikhail Pozdnyakov 2013-03-04 23:42:21 PST
Comment on attachment 191392 [details]
Patch

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

Not sure this change will help anyhow.

> Source/WebKit2/UIProcess/efl/WebView.cpp:260
> +    m_ewkView->scheduleUpdateDisplay();

this should be done inside client

> Source/WebKit2/UIProcess/efl/WebView.cpp:515
> +    m_ewkView->pageViewportController()->didRenderFrame(contentsSize, coveredRect);

All above is also view client business.
Please consider patch at https://bugs.webkit.org/show_bug.cgi?id=110741. 
Are you sure you don't break view legacy behaviour code path?
Comment 4 Dongseong Hwang 2013-03-05 00:05:11 PST
Comment on attachment 191392 [details]
Patch

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

>> Source/WebKit2/UIProcess/efl/WebView.cpp:515
>> +    m_ewkView->pageViewportController()->didRenderFrame(contentsSize, coveredRect);
> 
> All above is also view client business.
> Please consider patch at https://bugs.webkit.org/show_bug.cgi?id=110741. 
> Are you sure you don't break view legacy behaviour code path?

Thank you for review.
My change matches to Qt PageClient behavior.
And I'm sure it does not break view legacy behaviour, because didRenderFrame() is called by only one client, which already schedule update display.
updateViewport() in below code eventually calls WebView::setViewNeedsDisplay().

void CoordinatedLayerTreeHostProxy::didRenderFrame(const FloatPoint& scrollPosition, const IntSize& contentsSize, const IntRect& coveredRect)
{
    dispatchUpdate(bind(&CoordinatedGraphicsScene::flushLayerChanges, m_scene.get(), scrollPosition));
    updateViewport();
#if USE(TILED_BACKING_STORE)
    m_drawingAreaProxy->page()->didRenderFrame(contentsSize, coveredRect);
#endif
}

I'll update this patch after your Bug 110741 is landed :)

btw, I hope to remove didRenderFrame() in all code base. didRenderFrame() makes our code complex..
Comment 5 Dongseong Hwang 2013-03-05 00:16:17 PST
(In reply to comment #4)
> btw, I hope to remove didRenderFrame() in all code base. didRenderFrame() makes our code complex..

So I don't want any code to depend on didRenderFrame to enqueue update display event.

In conclusion, I want
1. WebView::setViewNeedsDisplay() should enqueue update display event.
2. WebView::didRenderFrame() should not enqueue update display event.
Comment 6 Gyuyoung Kim 2013-07-16 18:41:42 PDT
Comment on attachment 191392 [details]
Patch

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

Set r- because this patch needs to be updated according to Bug 110741.

>>> Source/WebKit2/UIProcess/efl/WebView.cpp:515
>>> +    m_ewkView->pageViewportController()->didRenderFrame(contentsSize, coveredRect);
>> 
>> All above is also view client business.
>> Please consider patch at https://bugs.webkit.org/show_bug.cgi?id=110741. 
>> Are you sure you don't break view legacy behaviour code path?
> 
> Thank you for review.
> My change matches to Qt PageClient behavior.
> And I'm sure it does not break view legacy behaviour, because didRenderFrame() is called by only one client, which already schedule update display.
> updateViewport() in below code eventually calls WebView::setViewNeedsDisplay().
> 
> void CoordinatedLayerTreeHostProxy::didRenderFrame(const FloatPoint& scrollPosition, const IntSize& contentsSize, const IntRect& coveredRect)
> {
>     dispatchUpdate(bind(&CoordinatedGraphicsScene::flushLayerChanges, m_scene.get(), scrollPosition));
>     updateViewport();
> #if USE(TILED_BACKING_STORE)
>     m_drawingAreaProxy->page()->didRenderFrame(contentsSize, coveredRect);
> #endif
> }
> 
> I'll update this patch after your Bug 110741 is landed :)
> 
> btw, I hope to remove didRenderFrame() in all code base. didRenderFrame() makes our code complex..

> I'll update this patch after your Bug 110741 is landed :)

Bug 110741 was landed. Will you update this patch ?
Comment 7 Michael Catanzaro 2017-03-11 10:37:31 PST
Closing this bug because the EFL port has been removed from trunk.

If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.