Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2088)

Unified Diff: cc/resource_update_controller_unittest.cc

Issue 11369071: A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resource_update_controller.cc ('k') | cc/scoped_texture_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « cc/resource_update_controller.cc ('k') | cc/scoped_texture_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698