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

Unified Diff: cc/resources/raster_worker_pool.cc

Issue 334133002: cc: Support on demand raster with ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review2 Created 6 years, 6 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/resources/raster_worker_pool.cc
diff --git a/cc/resources/raster_worker_pool.cc b/cc/resources/raster_worker_pool.cc
index 8f71b2e249328299b81ed287a7f190561899bb4b..53b084150ab32655354a5441e5becd93da6dafa0 100644
--- a/cc/resources/raster_worker_pool.cc
+++ b/cc/resources/raster_worker_pool.cc
@@ -46,15 +46,14 @@ class RasterTaskGraphRunner : public TaskGraphRunner,
#endif
workers_.push_back(worker.Pass());
}
-
- // Use index 0 for origin thread.
- current_tls_.Set(new ThreadLocalState(0));
}
virtual ~RasterTaskGraphRunner() { NOTREACHED(); }
size_t GetPictureCloneIndexForCurrentThread() {
- return current_tls_.Get()->picture_clone_index;
+ // Use index 0 for origin thread and any unknown threads.
reveman 2014/06/20 18:44:19 nit: "Use index 0 if called on non-raster thread."
+ ThreadLocalState* thread_local_state = current_tls_.Get();
+ return thread_local_state ? current_tls_.Get()->picture_clone_index : 0;
}
private:

Powered by Google App Engine
This is Rietveld 408576698