Skip to content
Permalink
Browse files

Update WR (new capture API, render target cache optimization)

  • Loading branch information
gw3583 committed Jan 24, 2018
1 parent 7354a32 commit bd16f1a33f329d155ae73f2c7c9addb6bb4027fa
Showing with 24 additions and 20 deletions.
  1. +15 −15 Cargo.lock
  2. +9 −5 components/canvas/webgl_thread.rs

Some generated files are not rendered by default. Learn more.

@@ -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),
}

0 comments on commit bd16f1a

Please sign in to comment.
You can’t perform that action at this time.