Bug 70291 - [chromium] Allow CCLayerTreeHostImpl to call back to proxy via CCLayerTreeHostImplClient
Summary: [chromium] Allow CCLayerTreeHostImpl to call back to proxy via CCLayerTreeHos...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nat Duca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 17:25 PDT by Nat Duca
Modified: 2011-10-20 15:04 PDT (History)
1 user (show)

See Also:


Attachments
Patch (18.53 KB, patch)
2011-10-17 17:26 PDT, Nat Duca
no flags Details | Formatted Diff | Diff
Make LTHI the scroll controller. (17.66 KB, patch)
2011-10-17 18:01 PDT, Nat Duca
no flags Details | Formatted Diff | Diff
Fix loop and virutal (17.92 KB, patch)
2011-10-17 18:21 PDT, Nat Duca
jamesr: review+
jamesr: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nat Duca 2011-10-17 17:25:54 PDT
[chromium] Allow CCLayerTreeHostImpl to call back to proxy via CCLayerTreeHostImplClient
Comment 1 Nat Duca 2011-10-17 17:26:47 PDT
Created attachment 111356 [details]
Patch
Comment 2 Nat Duca 2011-10-17 18:01:48 PDT
Created attachment 111360 [details]
Make LTHI the scroll controller.
Comment 3 James Robinson 2011-10-17 18:10:18 PDT
Comment on attachment 111360 [details]
Make LTHI the scroll controller.

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

R- cos I think this loops forever and thus isn't tested very well, but it's looking great otherwise

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:50
> +    virtual void setNeedsRedrawOnImplThread() = 0;
> +    virtual void setNeedsCommitOnImplThread() = 0;

why are these suffixed OnImplThread() instead of OnCCThread() like the functions in CCThreadProxy are? It's confusing to be similar but slightly different from the convention established there

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:54
> +class CCLayerTreeHostImpl : public CCScrollController {

this line makes CCLayerTreeHostImpl::scrollRootLayer() virtual and an implementation of CCScrollController. Please document this in the header (make it virtual and say what interface it's implementing)

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:99
> +    explicit CCLayerTreeHostImpl(const CCSettings&, CCLayerTreeHostImplClient*);

nit: no need explicit any more

> Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h:68
> +    virtual void setNeedsCommitOnImplThread() { setNeedsCommitOnImplThread(); }

isn't this an infinite loop?

if these were suffixed OnCCThread() then you wouldn't need these thunks, you could just make the actual functions virtual
Comment 4 James Robinson 2011-10-17 18:11:13 PDT
Maybe this'll be tested by landing https://bugs.webkit.org/show_bug.cgi?id=70161, will find out soon!
Comment 5 Nat Duca 2011-10-17 18:13:44 PDT
I was trying to make the client neutral to whether it was hosted on the cc thread of the main thread... since it can be either. OnImplThread is the suffix I was going to use for cases like these --- though this is the first place where I think we've had that case...

I'll fix up the other crap. I'm surprised tests didn't catch that... do we have a BKM for running DRT with --enable-threaded-compositor? I can hack my build...
Comment 6 Nat Duca 2011-10-17 18:21:53 PDT
Created attachment 111361 [details]
Fix loop and virutal
Comment 7 Nat Duca 2011-10-17 18:23:10 PDT
I'm fine getting rid of the "onImplThread" suffix --- your call --- I put up fixes for the glaringly obvious stuff, will pick this up later tonight.
Comment 8 James Robinson 2011-10-17 18:27:31 PDT
To run the layout tests in threaded mode pass "--threaded-compositing" to run_webkit_tests.sh / new-run-webkit-tests.
Comment 9 James Robinson 2011-10-18 14:45:14 PDT
Comment on attachment 111361 [details]
Fix loop and virutal

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

R=me. As we discussed I think it's not worth trying to draw a distinction between "...OnImplThread" and "...OnCCThread" suffixes - I think life would be a lot better if we used one and stuck to it.

> Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp:71
> +

nit: extra newline
Comment 10 Nat Duca 2011-10-18 16:17:53 PDT
Totally agreed. I'll eradicate OnCCThread variants.
Comment 11 Nat Duca 2011-10-20 15:04:21 PDT
Committed r98025: <http://trac.webkit.org/changeset/98025>