mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
webgl: Add feature to store backtraces for each WebGL API call for easier debugging.
This commit is contained in:
parent
515afac456
commit
5dc80dd07a
12 changed files with 82 additions and 16 deletions
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use canvas_traits::webgl::{WebGLCommand, WebGLVersion};
|
||||
use canvas_traits::webgl::{WebGLCommand, WebGLVersion, WebGLCommandBacktrace};
|
||||
use compositing::compositor_thread::{CompositorProxy, self};
|
||||
use euclid::Size2D;
|
||||
use gleam::gl;
|
||||
|
@ -144,13 +144,18 @@ impl GLContextWrapper {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn apply_command(&self, cmd: WebGLCommand, state: &mut GLState) {
|
||||
pub fn apply_command(
|
||||
&self,
|
||||
cmd: WebGLCommand,
|
||||
backtrace: WebGLCommandBacktrace,
|
||||
state: &mut GLState
|
||||
) {
|
||||
match *self {
|
||||
GLContextWrapper::Native(ref ctx) => {
|
||||
WebGLImpl::apply(ctx, state, cmd);
|
||||
WebGLImpl::apply(ctx, state, cmd, backtrace);
|
||||
}
|
||||
GLContextWrapper::OSMesa(ref ctx) => {
|
||||
WebGLImpl::apply(ctx, state, cmd);
|
||||
WebGLImpl::apply(ctx, state, cmd, backtrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue