Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable query handling on GLES #2148

Merged
merged 1 commit into from Dec 1, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Enable query handling on GLES

  • Loading branch information
sotaroikeda committed Dec 1, 2017
commit c9e644c1699b0aefddfb6e693597789a15b81395

Some generated files are not rendered by default. Learn more.

@@ -18,7 +18,7 @@ bincode = "0.9"
byteorder = "1.0"
euclid = "0.15.5"
fxhash = "0.2.1"
gleam = "0.4.14"
gleam = "0.4.15"
lazy_static = "0.2"
log = "0.3"
num-traits = "0.1.32"
@@ -269,31 +269,23 @@ impl<T: NamedTag> GpuProfiler<T> {

#[must_use]
pub struct GpuMarker {
gl: Option<Rc<gl::Gl>>,
gl: Rc<gl::Gl>,
}

impl GpuMarker {
fn new(gl: &Rc<gl::Gl>, message: &str) -> Self {
if gl.get_type() == gl::GlType::Gl {
gl.push_group_marker_ext(message);
GpuMarker { gl: Some(Rc::clone(gl)) }
} else {
GpuMarker { gl: None }
}
gl.push_group_marker_ext(message);
GpuMarker { gl: Rc::clone(gl) }
}

fn fire(gl: &Rc<gl::Gl>, message: &str) {
if gl.get_type() == gl::GlType::Gl {
gl.insert_event_marker_ext(message);
}
gl.insert_event_marker_ext(message);
}
}

impl Drop for GpuMarker {
fn drop(&mut self) {
if let Some(ref gl) = self.gl {
gl.pop_group_marker_ext();
}
self.gl.pop_group_marker_ext();
}
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.