diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
| commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
| tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit/chromium/tests/CCTextureUpdateControllerTest.cpp | |
| parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
| download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz | |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit/chromium/tests/CCTextureUpdateControllerTest.cpp')
| -rw-r--r-- | Source/WebKit/chromium/tests/CCTextureUpdateControllerTest.cpp | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/Source/WebKit/chromium/tests/CCTextureUpdateControllerTest.cpp b/Source/WebKit/chromium/tests/CCTextureUpdateControllerTest.cpp index 11659f6f5..baf63c2e7 100644 --- a/Source/WebKit/chromium/tests/CCTextureUpdateControllerTest.cpp +++ b/Source/WebKit/chromium/tests/CCTextureUpdateControllerTest.cpp @@ -31,8 +31,8 @@ #include "CCTiledLayerTestCommon.h" #include "FakeWebCompositorOutputSurface.h" #include "FakeWebGraphicsContext3D.h" +#include "WebCompositorInitializer.h" #include <gtest/gtest.h> -#include <public/WebCompositor.h> #include <public/WebThread.h> #include <wtf/RefPtr.h> @@ -95,21 +95,23 @@ public: class CCTextureUpdateControllerTest : public Test { public: CCTextureUpdateControllerTest() - : m_queue(adoptPtr(new CCTextureUpdateQueue)) - , m_uploader(this) - , m_fullUploadCountExpected(0) - , m_partialCountExpected(0) - , m_totalUploadCountExpected(0) - , m_maxUploadCountPerUpdate(0) - , m_numBeginUploads(0) - , m_numEndUploads(0) - , m_numConsecutiveFlushes(0) - , m_numDanglingUploads(0) - , m_numTotalUploads(0) - , m_numTotalFlushes(0) - , m_numPreviousUploads(0) - , m_numPreviousFlushes(0) - { } + : m_queue(adoptPtr(new CCTextureUpdateQueue)) + , m_uploader(this) + , m_compositorInitializer(m_thread.get()) + , m_fullUploadCountExpected(0) + , m_partialCountExpected(0) + , m_totalUploadCountExpected(0) + , m_maxUploadCountPerUpdate(0) + , m_numBeginUploads(0) + , m_numEndUploads(0) + , m_numConsecutiveFlushes(0) + , m_numDanglingUploads(0) + , m_numTotalUploads(0) + , m_numTotalFlushes(0) + , m_numPreviousUploads(0) + , m_numPreviousFlushes(0) + { + } public: void onFlush() @@ -170,19 +172,11 @@ public: protected: virtual void SetUp() { - OwnPtr<WebThread> thread; - WebCompositor::initialize(thread.get()); - m_context = FakeWebCompositorOutputSurface::create(adoptPtr(new WebGraphicsContext3DForUploadTest(this))); DebugScopedSetImplThread implThread; m_resourceProvider = CCResourceProvider::create(m_context.get()); } - virtual void TearDown() - { - WebCompositor::shutdown(); - } - void appendFullUploadsToUpdateQueue(int count) { m_fullUploadCountExpected += count; @@ -218,6 +212,9 @@ protected: TextureForUploadTest m_texture; FakeTextureCopier m_copier; TextureUploaderForUploadTest m_uploader; + OwnPtr<WebThread> m_thread; + WebCompositorInitializer m_compositorInitializer; + // Properties / expectations of this test int m_fullUploadCountExpected; |
