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

Unified Diff: cc/texture_update_controller.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests 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/texture_update_controller.cc
diff --git a/cc/texture_update_controller.cc b/cc/texture_update_controller.cc
index b0f1ccbb811238fc761412b27ec68bd26de71fa1..ff66246735f715de372435c7db3d5c993e2fdc30 100644
--- a/cc/texture_update_controller.cc
+++ b/cc/texture_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 "third_party/khronos/GLES2/gl2.h"
@@ -70,8 +69,9 @@ size_t TextureUpdateController::maxFullUpdatesPerTick(
return texturesPerTick ? texturesPerTick : 1;
}
-TextureUpdateController::TextureUpdateController(TextureUpdateControllerClient* client, Thread* thread, scoped_ptr<TextureUpdateQueue> queue, ResourceProvider* resourceProvider)
+TextureUpdateController::TextureUpdateController(TextureUpdateControllerClient* client, Thread* thread, scoped_ptr<TextureUpdateQueue> queue, ResourceProvider* resourceProvider, bool hasImplThread)
: m_client(client)
+ , m_hasImplThread(hasImplThread)
, m_timer(new Timer(thread, this))
, m_queue(queue.Pass())
, m_resourceProvider(resourceProvider)
@@ -126,10 +126,10 @@ void TextureUpdateController::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