[Webkit-unassigned] [Bug 67418] [chromium] Fix CCLayerTreeHostTest

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 8 10:55:59 PDT 2011


--- Comment #4 from Iain Merrick <husky at google.com>  2011-09-08 10:55:59 PST ---
(From update of attachment 106759)
View in context: https://bugs.webkit.org/attachment.cgi?id=106759&action=review

> Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:123

This was needed because LayerTextureUpdaterSkPicture isn't compiled in -- similar #ifndef in LayerTextureUpdaterCanvas.cpp.

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp:43
> +PassOwnPtr<CCLayerTreeHostImpl> CCLayerTreeHostClient::createLayerTreeHostImpl(const CCSettings& settings)

Needed for the test to make its own HostImpl subclass.

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp:102
> +void CCLayerTreeHost::stop()

Needed this for a clean shutdown in the test:

- layerTreeHost->stop()
- RunAllPendingMessages()
- delete layerTreeHost

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp:124
> +    TextureManager* textureManager = contentsTextureManager();

Needed because we don't currently create a TextureManager (should be fixable)

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp:206
> +        m_proxy->setNeedsCommitAndRedraw();

Again, needed for clean test shutdown. If stop() was called, m_proxy is null.

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h:67
> +class CCLayerTreeHostClient {

Moved down because it now depends on CCSettings.

> Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:52
> +    virtual void drawLayers();

Made this virtual so I can detect calls in the test.

> Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp:184
> +    postBeginFrameToMainThread();

Cheesy implementation of the FIXME. Should use CCMainThread.

> Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp:189
> +    if (!m_compositingLayer)

Lazy init so that  WebGLLayerChromium is created on the correct thread.

> Source/WebKit/chromium/src/GraphicsContext3DPrivate.h:317
> +    mutable RefPtr<WebGLLayerChromium> m_compositingLayer;

Blah, lazy initialization method is const!

> Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp:32
> +#include <wtf/HashTraits.h>

Had to #include these directly as there's some weird problem with the header order in GraphicsContext3DPrivate.h. It ends up including StringHash.h first, which breaks the HashTraits<String> template.

> Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp:83
> +    virtual void drawLayersOnCCThread(MockLayerTreeHostImpl* layerTreeHostImpl) { }

drawLayers() and present() now seem to be separate methods, let's ignore present() for now.

> Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp:90
> +        callOnMainThread(CCLayerTreeHostTest::dispatchSetNeedsCommit, this);

Should use CCMainThread

> Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp:180
> +    virtual bool makeContextCurrent() { return true; }

These are the methods that the CC tree checks when setting up.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list