Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes from mozilla-central gfx/wr #3833

Merged
merged 32 commits into from Jan 15, 2020
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1d95e5d
Bug 1606827 - A corner is not rounded when the radius is zero in eith…
SimonSapin Jan 15, 2020
8e3220d
Bug 1595767 - Don't use rayon for glyph rasterization unless there is…
bpeersmoz Jan 15, 2020
4a2f3cf
Bug 1607352 - Support DirectComposition virtual surface API. r=sotaro
Jan 15, 2020
8b55532
Bug 1606685 - Support empty tiles within compositor surfaces. r=sotaro
Jan 15, 2020
2a5c1b3
Bug 1607419 - Avoid option.expect(&format in hot code. r=jrmuizel
nical Jan 15, 2020
c5a8d9a
Bug 1607697 - Address some clippy lints in WebRender API. r=Gankro
nical Jan 15, 2020
6e0321a
Bug 1607697 - Remove leading zeros in dither matrix litterals. r=Gankro
nical Jan 15, 2020
2958cde
Bug 1607697 - Allow excessive precision in debug color constants. r=G…
nical Jan 15, 2020
4509d8f
Bug 1607697 - Address unwrap_or_else(callback) and functions in callb…
nical Jan 15, 2020
3597f88
Bug 1607697 - Address clippy lints about nested branches. r=Gankro
nical Jan 15, 2020
f4171db
Bug 1607697 - Pass-by-value clippy lints for some small structures. r…
nical Jan 15, 2020
f8796d8
Bug 1607697 - Box the memory reports in enums. r=Gankro
nical Jan 15, 2020
c76840d
Bug 1607697 - Miscellaneous clippy lint fixes. r=Gankro
nical Jan 15, 2020
a74df4e
Backed out 8 changesets (bug 1607697) for Build bustages. CLOSED TREE
dgluca Jan 15, 2020
d3458da
Bug 1607697 - Address some clippy lints in WebRender API. r=Gankro
nical Jan 15, 2020
f7e0447
Bug 1607697 - Remove leading zeros in dither matrix litterals. r=Gankro
nical Jan 15, 2020
8e23cfc
Bug 1607697 - Allow excessive precision in debug color constants. r=G…
nical Jan 15, 2020
4510da2
Bug 1607697 - Address unwrap_or_else(callback) and functions in callb…
nical Jan 15, 2020
d2dab4f
Bug 1607697 - Address clippy lints about nested branches. r=Gankro
nical Jan 15, 2020
4fe4faa
Bug 1607697 - Pass-by-value clippy lints for some small structures. r…
nical Jan 15, 2020
4a21991
Bug 1607697 - Box the memory reports in enums. r=Gankro
nical Jan 15, 2020
7b98dfb
Bug 1607697 - Miscellaneous clippy lint fixes. r=Gankro
nical Jan 15, 2020
b383cb6
Bug 1607697 - Address servo-tidy complaint.
nical Jan 15, 2020
b25c1f8
Bug 1608280 - Support a per-tile clip (valid) region for compositor t…
gw3583 Jan 15, 2020
67f9d48
Bug 1607746 - Part 1: Move opacity to its own shader in WebRender r=n…
cbrewster Jan 15, 2020
b549115
Bug 1607746 - Part 2: Clean up passing filter mode to shader r=nical
cbrewster Jan 15, 2020
3ddb13b
Backed out changeset 7295ca89e880 (bug 1608280) for causing bug 16089…
AndreeaPavel Jan 15, 2020
3b18bde
Merge mozilla-central to autoland on a CLOSED TREE
AndreeaPavel Jan 15, 2020
c9fe1c3
Bug 1609049 - WebRender version bump. r=jrmuizel
nical Jan 15, 2020
3167089
Bug 1609049 - Add required fileds in peek-poke Cargo.toml. r=jrmuizel
nical Jan 15, 2020
2b9f40d
Bug 1609136 - Fix cs_border_solid attribute names r=jrmuizel
kvark Jan 15, 2020
93c7a2b
Bug 1605171 - Replace wrupdater with github-sync r=tomprince
kvark Jan 15, 2020
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Bug 1607697 - Miscellaneous clippy lint fixes. r=Gankro

  • Loading branch information
nical authored and moz-gfx committed Jan 15, 2020
commit c76840da516f3b47f61403ccd37fcf34c2e93f95
@@ -165,7 +165,7 @@ fn push_component_transfer_data(
request: &mut GpuDataRequest,
) {
match func_comp {
SFilterDataComponent::Identity => { return; }
SFilterDataComponent::Identity => {}
SFilterDataComponent::Table(values) |
SFilterDataComponent::Discrete(values) => {
// Push a 256 entry lookup table.
@@ -1350,7 +1350,7 @@ impl DirtyRegion {
/// Creates a record of this dirty region for exporting to test infrastructure.
pub fn record(&self) -> RecordedDirtyRegion {
let mut rects: Vec<WorldRect> =
self.dirty_rects.iter().map(|r| r.world_rect.clone()).collect();
self.dirty_rects.iter().map(|r| r.world_rect).collect();
rects.sort_unstable_by_key(|r| (r.origin.y as usize, r.origin.x as usize));
RecordedDirtyRegion { rects }
}
@@ -5105,7 +5105,7 @@ impl TileNode {
.collect();

self.kind = TileNodeKind::Node {
children: children,
children,
};
}
Some(TileModification::Merge) => {
@@ -365,7 +365,7 @@ impl FontContext {
}

pub fn delete_font(&mut self, font_key: &FontKey) {
if let Some(_) = self.faces.remove(font_key) {
if self.faces.remove(font_key).is_some() {
self.variations.retain(|k, _| k.0 != *font_key);
}
}
@@ -253,7 +253,7 @@ impl FontContext {
let b = pixel[2];
print!("({}, {}, {}) ", r, g, b,);
}
println!("");
println!();
}
}

@@ -958,12 +958,12 @@ impl ProfileGraph {

for value in &self.values {
stats.min_value = stats.min_value.min(*value);
stats.mean_value = stats.mean_value + *value;
stats.mean_value += *value;
stats.max_value = stats.max_value.max(*value);
}

if !self.values.is_empty() {
stats.mean_value = stats.mean_value / self.values.len() as f32;
stats.mean_value /= self.values.len() as f32;
}

stats
@@ -3366,7 +3366,7 @@ impl Renderer {

let mut upload_time = TimeProfileCounter::new("GPU cache upload time", false, Some(0.0..2.0));
let updated_rows = upload_time.profile(|| {
return self.gpu_cache_texture.flush(&mut self.device);
self.gpu_cache_texture.flush(&mut self.device)
});
self.gpu_cache_upload_time += upload_time.get();

@@ -4566,7 +4566,7 @@ impl Renderer {
let _gm2 = self.gpu_profile.start_marker("box-shadows");
let textures = BatchTextures {
colors: [
mask_texture_id.clone(),
*mask_texture_id,
TextureSource::Invalid,
TextureSource::Invalid,
],
@@ -4586,7 +4586,7 @@ impl Renderer {
let _gm2 = self.gpu_profile.start_marker("clip images");
let textures = BatchTextures {
colors: [
mask_texture_id.clone(),
*mask_texture_id,
TextureSource::Invalid,
TextureSource::Invalid,
],
@@ -5496,7 +5496,7 @@ impl Renderer {
self.device.enable_pixel_local_storage(false);
}

pub fn debug_renderer<'b>(&'b mut self) -> Option<&'b mut DebugRenderer> {
pub fn debug_renderer(&mut self) -> Option<&mut DebugRenderer> {
self.debug.get_mut(&mut self.device)
}

@@ -5838,7 +5838,7 @@ impl Renderer {

let margin = 10.0;
debug_renderer.add_quad(
&x0 - margin,
x0 - margin,
y0 - margin,
x0 + text_width + margin,
y + margin,
@@ -6761,9 +6761,7 @@ impl Renderer {
}
}

fn get_vao<'a>(vertex_array_kind: VertexArrayKind,
vaos: &'a RendererVAOs)
-> &'a VAO {
fn get_vao(vertex_array_kind: VertexArrayKind, vaos: &RendererVAOs) -> &VAO {
match vertex_array_kind {
VertexArrayKind::Primitive => &vaos.prim_vao,
VertexArrayKind::Clip => &vaos.clip_vao,
@@ -518,7 +518,7 @@ impl SceneBuilderThread {

/// Do the bulk of the work of the scene builder thread.
fn process_transaction(&mut self, txn: &mut Transaction) -> Box<BuiltTransaction> {
if let &Some(ref hooks) = &self.hooks {
if let Some(ref hooks) = self.hooks {
hooks.pre_scene_build();
}

@@ -612,8 +612,8 @@ impl SceneBuilderThread {

/// Send the results of process_transaction back to the render backend.
fn forward_built_transactions(&mut self, txns: Vec<Box<BuiltTransaction>>) {
let (pipeline_info, result_tx, result_rx) = match &self.hooks {
&Some(ref hooks) => {
let (pipeline_info, result_tx, result_rx) = match self.hooks {
Some(ref hooks) => {
if txns.iter().any(|txn| txn.built_scene.is_some()) {
let info = PipelineInfo {
epochs: txns.iter()
@@ -646,7 +646,7 @@ impl SceneBuilderThread {
let have_resources_updates : Vec<DocumentId> = if pipeline_info.is_none() {
txns.iter()
.filter(|txn| !txn.resource_updates.is_empty() || txn.invalidate_rendered_frame)
.map(|txn| txn.document_id.clone())
.map(|txn| txn.document_id)
.collect()
} else {
Vec::new()
@@ -663,14 +663,11 @@ impl SceneBuilderThread {
self.hooks.as_ref().unwrap().post_scene_swap(&document_ids,
pipeline_info, scene_swap_time);
// Once the hook is done, allow the RB thread to resume
match swap_result {
Ok(SceneSwapResult::Complete(resume_tx)) => {
resume_tx.send(()).ok();
},
_ => (),
};
if let Ok(SceneSwapResult::Complete(resume_tx)) = swap_result {
resume_tx.send(()).ok();
}
} else if !have_resources_updates.is_empty() {
if let &Some(ref hooks) = &self.hooks {
if let Some(ref hooks) = self.hooks {
hooks.post_resource_update(&have_resources_updates);
}
} else if let Some(ref hooks) = self.hooks {
@@ -727,7 +727,7 @@ impl<'a> SceneBuilder<'a> {
((stats.num_bytes as f32 / total_bytes.max(1) as f32) * 100.0) as usize,
stats.num_bytes / stats.total_count.max(1));
}
println!("");
println!();
}
}

@@ -3740,7 +3740,7 @@ impl FlattenedStackingContext {

// We can skip mix-blend modes if they are the first primitive in a stacking context,
// see pop_stacking_context for a full explanation.
if !self.composite_ops.mix_blend_mode.is_none() &&
if self.composite_ops.mix_blend_mode.is_some() &&
!parent.prim_list.is_empty() {
return false;
}
@@ -3953,7 +3953,7 @@ fn filter_primitives_for_compositing(
// TODO(gw): Now that we resolve these later on,
// we could probably make it a bit
// more efficient than cloning these here.
input_filter_primitives.iter().map(|primitive| primitive.into()).collect()
input_filter_primitives.iter().map(|primitive| primitive).collect()
}

fn process_repeat_size(
@@ -300,7 +300,6 @@ impl SpatialNode {
match self.node_type {
SpatialNodeType::ReferenceFrame(info) if !info.invertible => {
self.mark_uninvertible(state);
return;
}
_ => self.invertible = true,
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.