Skip to content

Commit

Permalink
Auto merge of #16903 - paulrouget:makeCurrentOnNew, r=emilio
Browse files Browse the repository at this point in the history
make gl context current on browser initialization

As explained in servo/webrender#1233, it's necessary to make the current gl context current when the browser is initialized, otherwise the wrong gl context might be used if another window is created before the initialization.

/cc @glennw

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16903)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed May 18, 2017
2 parents a5ff57b + 56d6452 commit 5d1e027
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/servo/lib.rs
Expand Up @@ -126,6 +126,8 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
// Global configuration options, parsed from the command line.
let opts = opts::get();

// Make sure the gl context is made current.
window.prepare_for_composite(0, 0);

// Get both endpoints of a special channel for communication between
// the client window and the compositor. This channel is unique because
Expand Down

0 comments on commit 5d1e027

Please sign in to comment.