mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Auto merge of #15749 - glennw:update-wr-tiling, r=nox
Update WR (image tiling, inset box shadow fixes, new key api). <!-- 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/15749) <!-- Reviewable:end -->
This commit is contained in:
commit
c025a794dd
6 changed files with 43 additions and 33 deletions
50
Cargo.lock
generated
50
Cargo.lock
generated
|
@ -283,7 +283,7 @@ dependencies = [
|
||||||
"num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"offscreen_gl_context 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"offscreen_gl_context 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"servo_config 0.0.1",
|
"servo_config 0.0.1",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -297,7 +297,7 @@ dependencies = [
|
||||||
"ipc-channel 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ipc-channel 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -418,8 +418,8 @@ dependencies = [
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender 0.19.0 (git+https://github.com/servo/webrender)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -452,7 +452,7 @@ dependencies = [
|
||||||
"servo_remutex 0.0.1",
|
"servo_remutex 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"webvr_traits 0.0.1",
|
"webvr_traits 0.0.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -691,7 +691,7 @@ dependencies = [
|
||||||
"servo_geometry 0.0.1",
|
"servo_geometry 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -978,7 +978,7 @@ dependencies = [
|
||||||
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"truetype 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"truetype 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1057,7 +1057,7 @@ dependencies = [
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -1359,7 +1359,7 @@ dependencies = [
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1399,7 +1399,7 @@ dependencies = [
|
||||||
"servo_geometry 0.0.1",
|
"servo_geometry 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1413,7 +1413,7 @@ dependencies = [
|
||||||
"profile_traits 0.0.1",
|
"profile_traits 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1498,8 +1498,8 @@ dependencies = [
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"webdriver_server 0.0.1",
|
"webdriver_server 0.0.1",
|
||||||
"webrender 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender 0.19.0 (git+https://github.com/servo/webrender)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"webvr 0.0.1",
|
"webvr 0.0.1",
|
||||||
"webvr_traits 0.0.1",
|
"webvr_traits 0.0.1",
|
||||||
]
|
]
|
||||||
|
@ -1646,7 +1646,7 @@ dependencies = [
|
||||||
"heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1684,7 +1684,7 @@ dependencies = [
|
||||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1743,7 +1743,7 @@ dependencies = [
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -2277,7 +2277,7 @@ dependencies = [
|
||||||
"tinyfiledialogs 2.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tinyfiledialogs 2.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webvr 0.0.1",
|
"webvr 0.0.1",
|
||||||
"webvr_traits 0.0.1",
|
"webvr_traits 0.0.1",
|
||||||
|
@ -3187,8 +3187,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender"
|
name = "webrender"
|
||||||
version = "0.18.0"
|
version = "0.19.0"
|
||||||
source = "git+https://github.com/servo/webrender#e41f1413222d0b9f594649ac993a3e9e0ba35cbe"
|
source = "git+https://github.com/servo/webrender#fc720d070f4af24a1def4a6510cee10aaad0a280"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bincode 1.0.0-alpha2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 1.0.0-alpha2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3210,13 +3210,13 @@ dependencies = [
|
||||||
"thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webrender_traits"
|
name = "webrender_traits"
|
||||||
version = "0.18.0"
|
version = "0.20.0"
|
||||||
source = "git+https://github.com/servo/webrender#e41f1413222d0b9f594649ac993a3e9e0ba35cbe"
|
source = "git+https://github.com/servo/webrender#fc720d070f4af24a1def4a6510cee10aaad0a280"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3256,7 +3256,7 @@ dependencies = [
|
||||||
"msg 0.0.1",
|
"msg 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"servo_config 0.0.1",
|
"servo_config 0.0.1",
|
||||||
"webrender_traits 0.18.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.20.0 (git+https://github.com/servo/webrender)",
|
||||||
"webvr_traits 0.0.1",
|
"webvr_traits 0.0.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -3597,8 +3597,8 @@ dependencies = [
|
||||||
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||||
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
|
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
|
||||||
"checksum webdriver 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cdc28802daddee94267a657ffeac2593a33881fb7a3a44fedd320b1319efcaf6"
|
"checksum webdriver 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cdc28802daddee94267a657ffeac2593a33881fb7a3a44fedd320b1319efcaf6"
|
||||||
"checksum webrender 0.18.0 (git+https://github.com/servo/webrender)" = "<none>"
|
"checksum webrender 0.19.0 (git+https://github.com/servo/webrender)" = "<none>"
|
||||||
"checksum webrender_traits 0.18.0 (git+https://github.com/servo/webrender)" = "<none>"
|
"checksum webrender_traits 0.20.0 (git+https://github.com/servo/webrender)" = "<none>"
|
||||||
"checksum websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a1a6ea5ed0367f32eb3d94dcc58859ef4294b5f75ba983dbf56ac314af45d"
|
"checksum websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a1a6ea5ed0367f32eb3d94dcc58859ef4294b5f75ba983dbf56ac314af45d"
|
||||||
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
|
||||||
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
|
||||||
|
|
|
@ -106,7 +106,7 @@ impl<'a> CanvasPaintThread<'a> {
|
||||||
let draw_target = CanvasPaintThread::create(size);
|
let draw_target = CanvasPaintThread::create(size);
|
||||||
let path_builder = draw_target.create_path_builder();
|
let path_builder = draw_target.create_path_builder();
|
||||||
let webrender_api = webrender_api_sender.create_api();
|
let webrender_api = webrender_api_sender.create_api();
|
||||||
let webrender_image_key = webrender_api.alloc_image();
|
let webrender_image_key = webrender_api.generate_image_key();
|
||||||
CanvasPaintThread {
|
CanvasPaintThread {
|
||||||
drawtarget: draw_target,
|
drawtarget: draw_target,
|
||||||
path_builder: path_builder,
|
path_builder: path_builder,
|
||||||
|
@ -564,6 +564,7 @@ impl<'a> CanvasPaintThread<'a> {
|
||||||
height: size.height as u32,
|
height: size.height as u32,
|
||||||
stride: None,
|
stride: None,
|
||||||
format: webrender_traits::ImageFormat::RGBA8,
|
format: webrender_traits::ImageFormat::RGBA8,
|
||||||
|
offset: 0,
|
||||||
is_opaque: false,
|
is_opaque: false,
|
||||||
},
|
},
|
||||||
element.into());
|
element.into());
|
||||||
|
|
|
@ -101,7 +101,7 @@ fn create_readback_painter(size: Size2D<i32>,
|
||||||
-> Result<(WebGLPaintThread, GLLimits), String> {
|
-> Result<(WebGLPaintThread, GLLimits), String> {
|
||||||
let context = try!(GLContextWrapper::new(size, attrs));
|
let context = try!(GLContextWrapper::new(size, attrs));
|
||||||
let limits = context.get_limits();
|
let limits = context.get_limits();
|
||||||
let image_key = webrender_api.alloc_image();
|
let image_key = webrender_api.generate_image_key();
|
||||||
let painter = WebGLPaintThread {
|
let painter = WebGLPaintThread {
|
||||||
size: size,
|
size: size,
|
||||||
data: WebGLPaintTaskData::Readback(context, webrender_api, image_key)
|
data: WebGLPaintTaskData::Readback(context, webrender_api, image_key)
|
||||||
|
@ -241,6 +241,7 @@ impl WebGLPaintThread {
|
||||||
height: height as u32,
|
height: height as u32,
|
||||||
stride: None,
|
stride: None,
|
||||||
format: webrender_traits::ImageFormat::RGBA8,
|
format: webrender_traits::ImageFormat::RGBA8,
|
||||||
|
offset: 0,
|
||||||
is_opaque: false,
|
is_opaque: false,
|
||||||
},
|
},
|
||||||
pixels.clone());
|
pixels.clone());
|
||||||
|
|
|
@ -346,11 +346,13 @@ impl FontCache {
|
||||||
if let Some(ref webrender_api) = self.webrender_api {
|
if let Some(ref webrender_api) = self.webrender_api {
|
||||||
let webrender_fonts = &mut self.webrender_fonts;
|
let webrender_fonts = &mut self.webrender_fonts;
|
||||||
font_key = Some(*webrender_fonts.entry(template.identifier.clone()).or_insert_with(|| {
|
font_key = Some(*webrender_fonts.entry(template.identifier.clone()).or_insert_with(|| {
|
||||||
|
let font_key = webrender_api.generate_font_key();
|
||||||
match (template.bytes_if_in_memory(), template.native_font()) {
|
match (template.bytes_if_in_memory(), template.native_font()) {
|
||||||
(Some(bytes), _) => webrender_api.add_raw_font(bytes),
|
(Some(bytes), _) => webrender_api.add_raw_font(font_key, bytes),
|
||||||
(None, Some(native_font)) => webrender_api.add_native_font(native_font),
|
(None, Some(native_font)) => webrender_api.add_native_font(font_key, native_font),
|
||||||
(None, None) => webrender_api.add_raw_font(template.bytes().clone()),
|
(None, None) => webrender_api.add_raw_font(font_key, template.bytes().clone()),
|
||||||
}
|
}
|
||||||
|
font_key
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -934,7 +934,7 @@ impl LayoutThread {
|
||||||
Some(get_root_flow_background_color(layout_root)),
|
Some(get_root_flow_background_color(layout_root)),
|
||||||
webrender_traits::Epoch(epoch_number),
|
webrender_traits::Epoch(epoch_number),
|
||||||
viewport_size,
|
viewport_size,
|
||||||
builder,
|
builder.finalize(),
|
||||||
true);
|
true);
|
||||||
self.webrender_api.generate_frame(None);
|
self.webrender_api.generate_frame(None);
|
||||||
});
|
});
|
||||||
|
|
|
@ -326,10 +326,13 @@ fn get_placeholder_image(webrender_api: &webrender_traits::RenderApi) -> io::Res
|
||||||
height: image.height,
|
height: image.height,
|
||||||
stride: None,
|
stride: None,
|
||||||
format: format,
|
format: format,
|
||||||
|
offset: 0,
|
||||||
is_opaque: is_image_opaque(format, &bytes),
|
is_opaque: is_image_opaque(format, &bytes),
|
||||||
};
|
};
|
||||||
let data = webrender_traits::ImageData::new(bytes);
|
let data = webrender_traits::ImageData::new(bytes);
|
||||||
image.id = Some(webrender_api.add_image(descriptor, data));
|
let image_key = webrender_api.generate_image_key();
|
||||||
|
webrender_api.add_image(image_key, descriptor, data, None);
|
||||||
|
image.id = Some(image_key);
|
||||||
Ok(Arc::new(image))
|
Ok(Arc::new(image))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,10 +489,13 @@ impl ImageCache {
|
||||||
height: image.height,
|
height: image.height,
|
||||||
stride: None,
|
stride: None,
|
||||||
format: format,
|
format: format,
|
||||||
|
offset: 0,
|
||||||
is_opaque: is_image_opaque(format, &bytes),
|
is_opaque: is_image_opaque(format, &bytes),
|
||||||
};
|
};
|
||||||
let data = webrender_traits::ImageData::new(bytes);
|
let data = webrender_traits::ImageData::new(bytes);
|
||||||
image.id = Some(self.webrender_api.add_image(descriptor, data));
|
let image_key = self.webrender_api.generate_image_key();
|
||||||
|
self.webrender_api.add_image(image_key, descriptor, data, None);
|
||||||
|
image.id = Some(image_key);
|
||||||
}
|
}
|
||||||
LoadResult::PlaceholderLoaded(..) | LoadResult::None => {}
|
LoadResult::PlaceholderLoaded(..) | LoadResult::None => {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue