mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
#8539 Config preferences backend restructure
This commit is contained in:
parent
34fda66dfa
commit
8bfd4dc1e2
53 changed files with 1748 additions and 680 deletions
|
@ -71,7 +71,7 @@ use net_traits::image_cache::ImageResponse;
|
|||
use pixels::{self, PixelFormat};
|
||||
use script_layout_interface::HTMLCanvasDataSource;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::prefs::PREFS;
|
||||
use servo_config::pref;
|
||||
use std::cell::Cell;
|
||||
use std::cmp;
|
||||
use std::ptr::{self, NonNull};
|
||||
|
@ -173,10 +173,7 @@ impl WebGLRenderingContext {
|
|||
size: Size2D<u32>,
|
||||
attrs: GLContextAttributes,
|
||||
) -> Result<WebGLRenderingContext, String> {
|
||||
if let Some(true) = PREFS
|
||||
.get("webgl.testing.context_creation_error")
|
||||
.as_boolean()
|
||||
{
|
||||
if pref!(webgl.testing.context_creation_error) {
|
||||
return Err("WebGL context creation error forced by pref `webgl.testing.context_creation_error`".into());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue