Improve debugging output for WebGL errors.

This commit is contained in:
Josh Matthews 2018-05-29 17:06:24 -04:00
parent 4e6b100c7e
commit 41ced88f71
3 changed files with 115 additions and 246 deletions

View file

@ -10,6 +10,7 @@ mod mpsc;
use ::webgl::WebGLMsg;
use serde::{Deserialize, Serialize};
use servo_config::opts;
use std::fmt;
lazy_static! {
static ref IS_MULTIPROCESS: bool = {
@ -23,6 +24,12 @@ pub enum WebGLSender<T: Serialize> {
Mpsc(mpsc::WebGLSender<T>),
}
impl<T: Serialize> fmt::Debug for WebGLSender<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "WebGLSender(..)")
}
}
impl<T: Serialize> WebGLSender<T> {
#[inline]
pub fn send(&self, msg: T) -> WebGLSendResult {