Bug 1509592 - Update webrender to commit 7051f18fdcfbe60ecdbaeaa8e53c4ba98f2037a1 (WR PR #3344). r=kats
authorWR Updater Bot <graphics-team@mozilla.staktrace.com>
Sat, 24 Nov 2018 12:56:25 +0000
changeset 447947 b599964cc3ee9182a50a4ed38996cef6fe87c13a
parent 447946 bed93ebb313b1fb65bfbce423c7c09ac277c26e9
child 447948 5edbd3619c978b1dc78709685a89536c61df1263
child 447951 5461b62599d722d0c78b8f212653817d2d718362
push id73635
push userkgupta@mozilla.com
push dateSat, 24 Nov 2018 12:56:57 +0000
treeherderautoland@b599964cc3ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1509592
milestone65.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
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509592 - Update webrender to commit 7051f18fdcfbe60ecdbaeaa8e53c4ba98f2037a1 (WR PR #3344). r=kats https://github.com/servo/webrender/pull/3344 Differential Revision: https://phabricator.services.mozilla.com/D12822
gfx/webrender_bindings/revision.txt
gfx/wr/webrender/src/resource_cache.rs
--- 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)),