From: commit-queue@webkit.org Date: Sat, 21 Jan 2012 23:56:14 +0000 (+0000) Subject: Unreviewed, rolling out r105564. X-Git-Tag: 070512121124~14842 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=219123091a2ac97e93def7fea9bd07af2af7e7fe;p=profile%2Fivi%2Fwebkit-efl.git Unreviewed, rolling out r105564. http://trac.webkit.org/changeset/105564 https://bugs.webkit.org/show_bug.cgi?id=76792 Does not compile on Chromium Mac (Requested by abarth on #webkit). Patch by Sheriff Bot on 2012-01-21 Source/WebCore: * platform/graphics/chromium/ManagedTexture.cpp: * platform/graphics/chromium/ManagedTexture.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::prepareToUpdateTiles): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::commitComplete): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): * platform/graphics/chromium/cc/CCThreadProxy.h: Source/WebKit/chromium: * tests/CCLayerTreeHostTest.cpp: (WTF::MockLayerTreeHostClient::createLayerTreeHostContext3D): * tests/CompositorFakeWebGraphicsContext3D.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105578 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 0bd568a..146cd0b 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,27 @@ +2012-01-21 Sheriff Bot + + Unreviewed, rolling out r105564. + http://trac.webkit.org/changeset/105564 + https://bugs.webkit.org/show_bug.cgi?id=76792 + + Does not compile on Chromium Mac (Requested by abarth on + #webkit). + + * platform/graphics/chromium/ManagedTexture.cpp: + * platform/graphics/chromium/ManagedTexture.h: + * platform/graphics/chromium/TiledLayerChromium.cpp: + (WebCore::TiledLayerChromium::prepareToUpdateTiles): + * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: + (WebCore::CCLayerTreeHost::initialize): + (WebCore::CCLayerTreeHost::commitComplete): + * platform/graphics/chromium/cc/CCLayerTreeHost.h: + (WebCore::CCSettings::CCSettings): + * platform/graphics/chromium/cc/CCProxy.h: + * platform/graphics/chromium/cc/CCSingleThreadProxy.h: + * platform/graphics/chromium/cc/CCThreadProxy.cpp: + (WebCore::CCThreadProxy::scheduledActionUpdateMoreResources): + * platform/graphics/chromium/cc/CCThreadProxy.h: + 2012-01-20 Chris Marrin Implement hardware accelerated Brightness and contrast filters diff --git a/Source/WebCore/platform/graphics/chromium/ManagedTexture.cpp b/Source/WebCore/platform/graphics/chromium/ManagedTexture.cpp index 5bb19fa..0c1e4b7 100644 --- a/Source/WebCore/platform/graphics/chromium/ManagedTexture.cpp +++ b/Source/WebCore/platform/graphics/chromium/ManagedTexture.cpp @@ -41,15 +41,6 @@ ManagedTexture::ManagedTexture(TextureManager* manager) { } -ManagedTexture::ManagedTexture(TextureManager* manager, TextureToken token, IntSize size, unsigned format, unsigned textureId) - : m_textureManager(manager) - , m_token(token) - , m_size(size) - , m_format(format) - , m_textureId(textureId) -{ -} - ManagedTexture::~ManagedTexture() { if (m_token) @@ -108,17 +99,6 @@ void ManagedTexture::framebufferTexture2D(GraphicsContext3D* context, TextureAll context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::TEXTURE_2D, m_textureId, 0); } -PassOwnPtr ManagedTexture::steal() -{ - OwnPtr texture = adoptPtr(new ManagedTexture(m_textureManager, m_token, m_size, m_format, m_textureId)); - m_token = 0; - m_size = IntSize(); - m_format = 0; - m_textureId = 0; - return texture.release(); -} - - } #endif // USE(ACCELERATED_COMPOSITING) diff --git a/Source/WebCore/platform/graphics/chromium/ManagedTexture.h b/Source/WebCore/platform/graphics/chromium/ManagedTexture.h index 76d62a8..1cc8bfa 100644 --- a/Source/WebCore/platform/graphics/chromium/ManagedTexture.h +++ b/Source/WebCore/platform/graphics/chromium/ManagedTexture.h @@ -63,13 +63,8 @@ public: unsigned format() const { return m_format; } unsigned textureId() const { return m_textureId; } - // Steal token and textureId by instantiates a new texture using existing - // member variables. - PassOwnPtr steal(); - private: explicit ManagedTexture(TextureManager*); - ManagedTexture(TextureManager*, TextureToken, IntSize, unsigned format, unsigned textureId); TextureManager* m_textureManager; TextureToken m_token; diff --git a/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp b/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp index 92d102e..1430a61 100644 --- a/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp +++ b/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp @@ -380,11 +380,6 @@ void TiledLayerChromium::prepareToUpdateTiles(bool idle, int left, int top, int if (!tile) tile = createTile(i, j); - // Do post commit deletion of current texture when partial texture - // updates are not used. - if (tile->isDirty() && layerTreeHost() && !layerTreeHost()->settings().partialTextureUpdates) - layerTreeHost()->deleteTextureAfterCommit(tile->managedTexture()->steal()); - if (!tile->managedTexture()->isValid(m_tiler->tileSize(), m_textureFormat)) tile->m_dirtyRect = m_tiler->tileRect(tile); diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp index a2fb822..8663ec0 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp +++ b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp @@ -95,9 +95,6 @@ bool CCLayerTreeHost::initialize() // Update m_settings based on capabilities that we got back from the renderer. m_settings.acceleratePainting = m_proxy->layerRendererCapabilities().usingAcceleratedPainting; - // Update m_settings based on partial update capability. - m_settings.partialTextureUpdates = m_settings.partialTextureUpdates && m_proxy->partialTextureUpdateCapability(); - m_contentsTextureManager = TextureManager::create(TextureManager::highLimitBytes(viewportSize()), TextureManager::reclaimLimitBytes(viewportSize()), m_proxy->layerRendererCapabilities().maxTextureSize); @@ -168,7 +165,6 @@ void CCLayerTreeHost::finishCommitOnImplThread(CCLayerTreeHostImpl* hostImpl) void CCLayerTreeHost::commitComplete() { - m_deleteTextureAfterCommitList.clear(); clearPendingUpdate(); m_contentsTextureManager->unprotectAllTextures(); } @@ -518,9 +514,4 @@ void CCLayerTreeHost::stopRateLimiter(GraphicsContext3D* context) } } -void CCLayerTreeHost::deleteTextureAfterCommit(PassOwnPtr texture) -{ - m_deleteTextureAfterCommitList.append(texture); -} - } diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h index d92adc1..2f989bc 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h +++ b/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h @@ -76,8 +76,7 @@ struct CCSettings { , showPlatformLayerTree(false) , refreshRate(0) , perTilePainting(false) - , partialSwapEnabled(false) - , partialTextureUpdates(true) { } + , partialSwapEnabled(false) { } bool acceleratePainting; bool compositeOffscreen; @@ -86,7 +85,6 @@ struct CCSettings { double refreshRate; bool perTilePainting; bool partialSwapEnabled; - bool partialTextureUpdates; }; // Provides information on an Impl's rendering capabilities back to the CCLayerTreeHost @@ -194,15 +192,12 @@ public: void startRateLimiter(GraphicsContext3D*); void stopRateLimiter(GraphicsContext3D*); - void deleteTextureAfterCommit(PassOwnPtr); - protected: CCLayerTreeHost(CCLayerTreeHostClient*, const CCSettings&); bool initialize(); private: typedef Vector > LayerList; - typedef Vector > TextureList; enum PaintType { PaintVisible, PaintIdle }; static void paintContentsIfDirty(LayerChromium*, PaintType); @@ -238,8 +233,6 @@ private: float m_pageScale; float m_minPageScale, m_maxPageScale; bool m_triggerIdlePaints; - - TextureList m_deleteTextureAfterCommitList; }; } diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCProxy.h b/Source/WebCore/platform/graphics/chromium/cc/CCProxy.h index 937c154..bb37801 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCProxy.h +++ b/Source/WebCore/platform/graphics/chromium/cc/CCProxy.h @@ -79,10 +79,6 @@ public: virtual void start() = 0; // Must be called before using the proxy. virtual void stop() = 0; // Must be called before deleting the proxy. - // Whether sub-regions of textures can be updated or if complete texture - // updates are required. - virtual bool partialTextureUpdateCapability() const = 0; - // Debug hooks #ifndef NDEBUG static bool isMainThread(); diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h b/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h index 4faa229..0d5a4a2 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h +++ b/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h @@ -54,7 +54,6 @@ public: virtual void setVisible(bool); virtual void start(); virtual void stop(); - virtual bool partialTextureUpdateCapability() const { return true; } // CCLayerTreeHostImplClient implementation virtual void onSwapBuffersCompleteOnImplThread() { ASSERT_NOT_REACHED(); } diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp index 32a8630..9033135 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp +++ b/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp @@ -39,15 +39,8 @@ #include #include -using namespace std; using namespace WTF; -namespace { - -static const size_t textureUpdatesPerFrame = numeric_limits::max(); - -} // anonymous namespace - namespace WebCore { PassOwnPtr CCThreadProxy::create(CCLayerTreeHost* layerTreeHost) @@ -445,7 +438,8 @@ void CCThreadProxy::scheduledActionUpdateMoreResources() { TRACE_EVENT("CCThreadProxy::scheduledActionUpdateMoreResources", this, 0); ASSERT(m_currentTextureUpdaterOnImplThread); - m_currentTextureUpdaterOnImplThread->update(m_layerTreeHostImpl->context(), textureUpdatesPerFrame); + static const int UpdatesPerFrame = 99999; + m_currentTextureUpdaterOnImplThread->update(m_layerTreeHostImpl->context(), UpdatesPerFrame); } void CCThreadProxy::scheduledActionCommit() @@ -571,9 +565,4 @@ void CCThreadProxy::layerTreeHostClosedOnImplThread(CCCompletionEvent* completio completion->signal(); } -bool CCThreadProxy::partialTextureUpdateCapability() const -{ - return textureUpdatesPerFrame == numeric_limits::max(); -} - } // namespace WebCore diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h b/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h index a11b527..a41c0d5 100644 --- a/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h +++ b/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h @@ -62,7 +62,6 @@ public: virtual void setVisible(bool); virtual void start(); virtual void stop(); - virtual bool partialTextureUpdateCapability() const; // CCLayerTreeHostImplClient implementation virtual void onSwapBuffersCompleteOnImplThread(); diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog index 02539ad..25c258e 100644 --- a/Source/WebKit/chromium/ChangeLog +++ b/Source/WebKit/chromium/ChangeLog @@ -1,3 +1,16 @@ +2012-01-21 Sheriff Bot + + Unreviewed, rolling out r105564. + http://trac.webkit.org/changeset/105564 + https://bugs.webkit.org/show_bug.cgi?id=76792 + + Does not compile on Chromium Mac (Requested by abarth on + #webkit). + + * tests/CCLayerTreeHostTest.cpp: + (WTF::MockLayerTreeHostClient::createLayerTreeHostContext3D): + * tests/CompositorFakeWebGraphicsContext3D.h: + 2012-01-20 Alexandre Elias [chromium] Write unit tests for compositor-thread zooming diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp index 58de759..9518596 100644 --- a/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp +++ b/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp @@ -26,9 +26,9 @@ #include "cc/CCLayerTreeHost.h" -#include "CompositorFakeWebGraphicsContext3D.h" +#include "CompositorFakeGraphicsContext3D.h" #include "ContentLayerChromium.h" -#include "GraphicsContext3DPrivate.h" +#include "FakeWebGraphicsContext3D.h" #include "LayerChromium.h" #include "TextureManager.h" #include "WebCompositor.h" @@ -40,7 +40,6 @@ #include "cc/CCThreadTask.h" #include "platform/WebKitPlatformSupport.h" #include "platform/WebThread.h" -#include #include #include #include @@ -131,52 +130,6 @@ private: TestHooks* m_testHooks; }; -class CompositorFakeWebGraphicsContext3DWithTextureTracking : public CompositorFakeWebGraphicsContext3D { -public: - static PassOwnPtr create(Attributes attrs) - { - return adoptPtr(new CompositorFakeWebGraphicsContext3DWithTextureTracking(attrs)); - } - - virtual WebGLId createTexture() - { - WebGLId texture = m_textures.size() + 1; - m_textures.append(texture); - return texture; - } - - virtual void deleteTexture(WebGLId texture) - { - for (size_t i = 0; i < m_textures.size(); i++) { - if (m_textures[i] == texture) { - m_textures.remove(i); - break; - } - } - } - - virtual void bindTexture(WGC3Denum /* target */, WebGLId texture) - { - m_usedTextures.add(texture); - } - - int numTextures() const { return static_cast(m_textures.size()); } - int texture(int i) const { return m_textures[i]; } - void resetTextures() { m_textures.clear(); } - - int numUsedTextures() const { return static_cast(m_usedTextures.size()); } - bool usedTexture(int texture) const { return m_usedTextures.find(texture) != m_usedTextures.end(); } - void resetUsedTextures() { m_usedTextures.clear(); } - -private: - explicit CompositorFakeWebGraphicsContext3DWithTextureTracking(Attributes attrs) : CompositorFakeWebGraphicsContext3D(attrs) - { - } - - Vector m_textures; - HashSet m_usedTextures; -}; - // Implementation of CCLayerTreeHost callback interface. class MockLayerTreeHostClient : public CCLayerTreeHostClient { public: @@ -202,15 +155,7 @@ public: virtual PassRefPtr createLayerTreeHostContext3D() { - GraphicsContext3D::Attributes attrs; - WebGraphicsContext3D::Attributes webAttrs; - webAttrs.alpha = attrs.alpha; - - OwnPtr webContext = CompositorFakeWebGraphicsContext3DWithTextureTracking::create(webAttrs); - return GraphicsContext3DPrivate::createGraphicsContextFromWebContext( - webContext.release(), attrs, 0, - GraphicsContext3D::RenderDirectlyToHostWindow, - GraphicsContext3DPrivate::ForUseOnAnotherThread); + return createCompositorMockGraphicsContext3D(GraphicsContext3D::Attributes()); } virtual void didCommitAndDrawFrame() @@ -1123,101 +1068,4 @@ TEST_F(CCLayerTreeHostTestSetViewportSize, runSingleThread) runTest(false); } -class MockContentLayerDelegate : public ContentLayerDelegate { -public: - bool drawsContent() const { return true; } - MOCK_CONST_METHOD0(preserves3D, bool()); - void paintContents(GraphicsContext&, const IntRect&) { } - void notifySyncRequired() { } -}; - -// Verify atomicity of commits and reuse of textures. -class CCLayerTreeHostTestAtomicCommit : public CCLayerTreeHostTest { -public: - CCLayerTreeHostTestAtomicCommit() - : m_updateCheckLayer(ContentLayerChromiumWithUpdateTracking::create(&m_delegate)) - , m_numCommits(0) - { - // Make sure partial texture updates are turned off. - m_settings.partialTextureUpdates = false; - } - - virtual void beginTest() - { - m_layerTreeHost->setRootLayer(m_updateCheckLayer); - m_layerTreeHost->setViewportSize(IntSize(10, 10)); - - postSetNeedsCommitToMainThread(); - postSetNeedsRedrawToMainThread(); - } - - virtual void commitCompleteOnCCThread(CCLayerTreeHostImpl* impl) - { - CompositorFakeWebGraphicsContext3DWithTextureTracking* context = static_cast(GraphicsContext3DPrivate::extractWebGraphicsContext3D(impl->context())); - - switch (impl->frameNumber()) { - case 0: - // Number of textures should be one. - EXPECT_EQ(1, context->numTextures()); - // Number of textures used for commit should be one. - EXPECT_EQ(1, context->numUsedTextures()); - // Verify used texture is correct. - EXPECT_TRUE(context->usedTexture(context->texture(0))); - - context->resetUsedTextures(); - break; - case 1: - // Number of textures should be two as the first texture - // is used by impl thread and cannot by used for update. - EXPECT_EQ(2, context->numTextures()); - // Number of textures used for commit should still be one. - EXPECT_EQ(1, context->numUsedTextures()); - // First texture should not have been used. - EXPECT_FALSE(context->usedTexture(context->texture(0))); - // New texture should have been used. - EXPECT_TRUE(context->usedTexture(context->texture(1))); - - context->resetUsedTextures(); - break; - default: - ASSERT_NOT_REACHED(); - break; - } - } - - virtual void drawLayersOnCCThread(CCLayerTreeHostImpl* impl) - { - CompositorFakeWebGraphicsContext3DWithTextureTracking* context = static_cast(GraphicsContext3DPrivate::extractWebGraphicsContext3D(impl->context())); - - // Number of textures used for draw should always be one. - EXPECT_EQ(1, context->numUsedTextures()); - - if (impl->frameNumber() < 2) { - context->resetUsedTextures(); - postSetNeedsAnimateAndCommitToMainThread(); - postSetNeedsRedrawToMainThread(); - } else - endTest(); - } - - virtual void layout() - { - m_updateCheckLayer->setNeedsDisplay(); - } - - virtual void afterTest() - { - } - -private: - MockContentLayerDelegate m_delegate; - RefPtr m_updateCheckLayer; - int m_numCommits; -}; - -TEST_F(CCLayerTreeHostTestAtomicCommit, runMultiThread) -{ - runTest(true); -} - } // namespace diff --git a/Source/WebKit/chromium/tests/CompositorFakeWebGraphicsContext3D.h b/Source/WebKit/chromium/tests/CompositorFakeWebGraphicsContext3D.h index 0790639..de1409b 100644 --- a/Source/WebKit/chromium/tests/CompositorFakeWebGraphicsContext3D.h +++ b/Source/WebKit/chromium/tests/CompositorFakeWebGraphicsContext3D.h @@ -43,7 +43,7 @@ public: virtual void getShaderiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1; } virtual void getProgramiv(WebGLId, WGC3Denum, WGC3Dint* value) { *value = 1; } -protected: +private: explicit CompositorFakeWebGraphicsContext3D(Attributes attrs) { m_attrs = attrs;