mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update WR (new capture API, render target cache optimization)
This commit is contained in:
parent
7354a32c19
commit
bd16f1a33f
2 changed files with 24 additions and 20 deletions
|
@ -502,7 +502,9 @@ impl<VR: WebVRRenderHandler + 'static, OB: WebGLThreadObserver> WebGLThread<VR,
|
|||
let data = webrender_api::ExternalImageData {
|
||||
id: webrender_api::ExternalImageId(context_id.0 as u64),
|
||||
channel_index: 0,
|
||||
image_type: webrender_api::ExternalImageType::Texture2DHandle,
|
||||
image_type: webrender_api::ExternalImageType::TextureHandle(
|
||||
webrender_api::TextureTarget::Default,
|
||||
),
|
||||
};
|
||||
webrender_api::ImageData::External(data)
|
||||
}
|
||||
|
@ -612,10 +614,12 @@ impl<T: WebGLExternalImageApi> webrender::ExternalImageHandler for WebGLExternal
|
|||
let (texture_id, size) = self.handler.lock(ctx_id);
|
||||
|
||||
webrender::ExternalImage {
|
||||
u0: 0.0,
|
||||
u1: size.width as f32,
|
||||
v1: 0.0,
|
||||
v0: size.height as f32,
|
||||
uv: webrender_api::TexelRect::new(
|
||||
0.0,
|
||||
size.height as f32,
|
||||
size.width as f32,
|
||||
0.0,
|
||||
),
|
||||
source: webrender::ExternalImageSource::NativeTexture(texture_id),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue