aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-06-28 21:01:42 -0500
committerGitHub <noreply@github.com>2016-06-28 21:01:42 -0500
commit5c41cda9a51490b0764938a57218e7c19735104f (patch)
tree6e4697dd86c046f8bdb902707132318c5bdd141f
parentf6db3518ca9d81ea8fd938586252e690755d7445 (diff)
parentf071acda477d1972777e7563fc93b69447fd60f0 (diff)
downloadservo-5c41cda9a51490b0764938a57218e7c19735104f.tar.gz
servo-5c41cda9a51490b0764938a57218e7c19735104f.zip
Auto merge of #11918 - pcwalton:wr-no-paint-threads, r=glennw
gfx: Don't create paint threads when WebRender is in use. They're unused and just waste memory and process table entries. r? @glennw <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11918) <!-- Reviewable:end -->
-rw-r--r--components/gfx/paint_thread.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs
index ed1d7568ea6..aa759ca6b7a 100644
--- a/components/gfx/paint_thread.rs
+++ b/components/gfx/paint_thread.rs
@@ -567,6 +567,12 @@ impl WorkerThreadProxy {
font_cache_thread: FontCacheThread,
time_profiler_chan: time::ProfilerChan)
-> Vec<WorkerThreadProxy> {
+ // Don't make any paint threads if we're using WebRender. They're just a waste of
+ // resources.
+ if opts::get().use_webrender {
+ return vec![]
+ }
+
let thread_count = opts::get().paint_threads;
(0..thread_count).map(|_| {
let (from_worker_sender, from_worker_receiver) = channel();