| Index: cc/resource_update_controller_unittest.cc
|
| ===================================================================
|
| --- cc/resource_update_controller_unittest.cc (revision 165906)
|
| +++ cc/resource_update_controller_unittest.cc (working copy)
|
| @@ -7,7 +7,6 @@
|
| #include "cc/resource_update_controller.h"
|
|
|
| #include "cc/single_thread_proxy.h" // For DebugScopedSetImplThread
|
| -#include "cc/test/fake_proxy.h"
|
| #include "cc/test/fake_web_compositor_output_surface.h"
|
| #include "cc/test/fake_web_graphics_context_3d.h"
|
| #include "cc/test/scheduler_test_common.h"
|
| @@ -64,9 +63,8 @@
|
| class ResourceUpdateControllerTest : public Test {
|
| public:
|
| ResourceUpdateControllerTest()
|
| - : m_proxy(scoped_ptr<Thread>(NULL))
|
| - , m_queue(make_scoped_ptr(new ResourceUpdateQueue))
|
| - , m_textureManager(PrioritizedTextureManager::create(60*1024*1024, 1024, Renderer::ContentPool, &m_proxy))
|
| + : m_queue(make_scoped_ptr(new ResourceUpdateQueue))
|
| + , m_textureManager(PrioritizedTextureManager::create(60*1024*1024, 1024, Renderer::ContentPool))
|
| , m_fullUploadCountExpected(0)
|
| , m_partialCountExpected(0)
|
| , m_totalUploadCountExpected(0)
|
| @@ -81,7 +79,7 @@
|
| ~ResourceUpdateControllerTest()
|
| {
|
| DebugScopedSetImplThreadAndMainThreadBlocked
|
| - implThreadAndMainThreadBlocked(&m_proxy);
|
| + implThreadAndMainThreadBlocked;
|
| m_textureManager->clearAllMemory(m_resourceProvider.get());
|
| }
|
|
|
| @@ -124,6 +122,7 @@
|
| }
|
| m_textureManager->prioritizeTextures();
|
|
|
| + DebugScopedSetImplThread implThread;
|
| m_resourceProvider = ResourceProvider::create(m_context.get());
|
| }
|
|
|
| @@ -170,20 +169,18 @@
|
| void updateTextures()
|
| {
|
| DebugScopedSetImplThreadAndMainThreadBlocked
|
| - implThreadAndMainThreadBlocked(&m_proxy);
|
| + implThreadAndMainThreadBlocked;
|
| scoped_ptr<ResourceUpdateController> updateController =
|
| ResourceUpdateController::create(
|
| NULL,
|
| - m_proxy.implThread(),
|
| + Proxy::implThread(),
|
| m_queue.Pass(),
|
| - m_resourceProvider.get(),
|
| - m_proxy.hasImplThread());
|
| + m_resourceProvider.get());
|
| updateController->finalize();
|
| }
|
|
|
| protected:
|
| // Classes required to interact and test the ResourceUpdateController
|
| - FakeProxy m_proxy;
|
| scoped_ptr<GraphicsContext> m_context;
|
| scoped_ptr<ResourceProvider> m_resourceProvider;
|
| scoped_ptr<ResourceUpdateQueue> m_queue;
|
| @@ -343,7 +340,7 @@
|
|
|
| protected:
|
| FakeResourceUpdateController(cc::ResourceUpdateControllerClient* client, cc::Thread* thread, scoped_ptr<ResourceUpdateQueue> queue, ResourceProvider* resourceProvider)
|
| - : cc::ResourceUpdateController(client, thread, queue.Pass(), resourceProvider, false)
|
| + : cc::ResourceUpdateController(client, thread, queue.Pass(), resourceProvider)
|
| , m_updateMoreTexturesSize(0) { }
|
|
|
| base::TimeTicks m_now;
|
| @@ -368,7 +365,7 @@
|
| appendPartialUploadsToUpdateQueue(0);
|
|
|
| DebugScopedSetImplThreadAndMainThreadBlocked
|
| - implThreadAndMainThreadBlocked(&m_proxy);
|
| + implThreadAndMainThreadBlocked;
|
| scoped_ptr<FakeResourceUpdateController> controller(FakeResourceUpdateController::create(&client, &thread, m_queue.Pass(), m_resourceProvider.get()));
|
|
|
| controller->setNow(
|
| @@ -414,7 +411,7 @@
|
| appendPartialUploadsToUpdateQueue(0);
|
|
|
| DebugScopedSetImplThreadAndMainThreadBlocked
|
| - implThreadAndMainThreadBlocked(&m_proxy);
|
| + implThreadAndMainThreadBlocked;
|
| scoped_ptr<FakeResourceUpdateController> controller(FakeResourceUpdateController::create(&client, &thread, m_queue.Pass(), m_resourceProvider.get()));
|
|
|
| controller->setNow(
|
| @@ -454,7 +451,7 @@
|
| appendPartialUploadsToUpdateQueue(0);
|
|
|
| DebugScopedSetImplThreadAndMainThreadBlocked
|
| - implThreadAndMainThreadBlocked(&m_proxy);
|
| + implThreadAndMainThreadBlocked;
|
| scoped_ptr<FakeResourceUpdateController> controller(FakeResourceUpdateController::create(&client, &thread, m_queue.Pass(), m_resourceProvider.get()));
|
|
|
| controller->setNow(
|
|
|