author | WR Updater Bot <graphics-team@mozilla.staktrace.com> |
Sat, 24 Nov 2018 12:56:25 +0000 | |
changeset 447930 | b599964cc3ee9182a50a4ed38996cef6fe87c13a |
parent 447929 | bed93ebb313b1fb65bfbce423c7c09ac277c26e9 |
child 447931 | 5edbd3619c978b1dc78709685a89536c61df1263 |
child 447934 | 5461b62599d722d0c78b8f212653817d2d718362 |
push id | 35094 |
push user | rmaries@mozilla.com |
push date | Sat, 24 Nov 2018 21:40:10 +0000 |
treeherder | mozilla-central@b599964cc3ee [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | kats |
bugs | 1509592 |
milestone | 65.0a1 |
first release with | nightly linux32
b599964cc3ee
/
65.0a1
/
20181124220147
/
files
nightly linux64
b599964cc3ee
/
65.0a1
/
20181124220147
/
files
nightly mac
b599964cc3ee
/
65.0a1
/
20181124220147
/
files
nightly win32
b599964cc3ee
/
65.0a1
/
20181124220147
/
files
nightly win64
b599964cc3ee
/
65.0a1
/
20181124220147
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
65.0a1
/
20181124220147
/
pushlog to previous
nightly linux64
65.0a1
/
20181124220147
/
pushlog to previous
nightly mac
65.0a1
/
20181124220147
/
pushlog to previous
nightly win32
65.0a1
/
20181124220147
/
pushlog to previous
nightly win64
65.0a1
/
20181124220147
/
pushlog to previous
|
gfx/webrender_bindings/revision.txt | file | annotate | diff | comparison | revisions | |
gfx/wr/webrender/src/resource_cache.rs | file | annotate | diff | comparison | revisions |
--- a/gfx/webrender_bindings/revision.txt +++ b/gfx/webrender_bindings/revision.txt @@ -1,1 +1,1 @@ -af2b372624db589115511b4705849a33e6acd35d +7051f18fdcfbe60ecdbaeaa8e53c4ba98f2037a1
--- a/gfx/wr/webrender/src/resource_cache.rs +++ b/gfx/wr/webrender/src/resource_cache.rs @@ -1937,38 +1937,50 @@ impl ResourceCache { let short_path = format!("images/{}", file_name); fs::File::create(path_images.join(file_name)) .expect(&format!("Unable to create {}", short_path)) .write_all(&*arc) .unwrap(); entry.insert(short_path); } CachedImageData::Blob => { - assert_eq!(template.tiling, None); let blob_request_params = &[ BlobImageParams { request: BlobImageRequest { key: BlobImageKey(key), //TODO: support tiled blob images // https://github.com/servo/webrender/issues/2236 - tile: None, + tile: template.tiling.map(|_| TileOffset::origin()), }, descriptor: BlobImageDescriptor { rect: blob_size(desc.size).into(), format: desc.format, }, dirty_rect: DirtyRect::All, } ]; - let blob_handler = self.blob_image_handler.as_mut().unwrap(); - blob_handler.prepare_resources(&self.resources, blob_request_params); - let mut rasterizer = blob_handler.create_blob_rasterizer(); - let (_, result) = rasterizer.rasterize(blob_request_params, false).pop().unwrap(); - let result = result.expect("Blob rasterization failed"); + let requires_tiling = match template.tiling { + Some(tile_size) => desc.size.width > tile_size as i32 || desc.size.height > tile_size as i32, + None => false, + }; + + let result = if requires_tiling { + warn!("Tiled blob images aren't supported yet"); + RasterizedBlobImage { + rasterized_rect: desc.size.into(), + data: Arc::new(vec![0; desc.compute_total_size() as usize]) + } + } else { + let blob_handler = self.blob_image_handler.as_mut().unwrap(); + blob_handler.prepare_resources(&self.resources, blob_request_params); + let mut rasterizer = blob_handler.create_blob_rasterizer(); + let (_, result) = rasterizer.rasterize(blob_request_params, false).pop().unwrap(); + result.expect("Blob rasterization failed") + }; assert_eq!(result.rasterized_rect.size, desc.size); assert_eq!(result.data.len(), desc.compute_total_size() as usize); num_blobs += 1; #[cfg(feature = "png")] CaptureConfig::save_png( root.join(format!("blobs/{}.png", num_blobs)),