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

Unified Diff: cc/resource_update_controller.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 165064 Created 8 years, 2 months 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
Index: cc/resource_update_controller.cc
diff --git a/cc/resource_update_controller.cc b/cc/resource_update_controller.cc
index b3133c9846885a2730f743c5b616e39d810482c5..56da2d059a5bb332ba9a5d811da767c3803c8742 100644
--- a/cc/resource_update_controller.cc
+++ b/cc/resource_update_controller.cc
@@ -8,7 +8,6 @@
#include "base/debug/trace_event.h"
#include "cc/prioritized_texture.h"
-#include "cc/proxy.h"
#include "cc/resource_provider.h"
#include "cc/texture_copier.h"
#include "cc/thread.h"
@@ -70,8 +69,9 @@ size_t ResourceUpdateController::maxFullUpdatesPerTick(
return texturesPerTick ? texturesPerTick : 1;
}
-ResourceUpdateController::ResourceUpdateController(ResourceUpdateControllerClient* client, Thread* thread, scoped_ptr<ResourceUpdateQueue> queue, ResourceProvider* resourceProvider)
+ResourceUpdateController::ResourceUpdateController(ResourceUpdateControllerClient* client, Thread* thread, scoped_ptr<ResourceUpdateQueue> queue, ResourceProvider* resourceProvider, bool hasImplThread)
: m_client(client)
+ , m_hasImplThread(hasImplThread)
, m_queue(queue.Pass())
, m_resourceProvider(resourceProvider)
, m_textureUpdatesPerTick(maxFullUpdatesPerTick(resourceProvider))
@@ -131,10 +131,10 @@ void ResourceUpdateController::updateTexture(ResourceUpdate update)
DCHECK(m_resourceProvider->resourceType(texture->resourceId()) ==
ResourceProvider::GLTexture);
- WebGraphicsContext3D* paintContext = Proxy::hasImplThread() ?
+ WebGraphicsContext3D* paintContext = m_hasImplThread ?
WebSharedGraphicsContext3D::compositorThreadContext() :
WebSharedGraphicsContext3D::mainThreadContext();
- GrContext* paintGrContext = Proxy::hasImplThread() ?
+ GrContext* paintGrContext = m_hasImplThread ?
WebSharedGraphicsContext3D::compositorThreadGrContext() :
WebSharedGraphicsContext3D::mainThreadGrContext();

Powered by Google App Engine
This is Rietveld 408576698