| author | Hiroyuki Ikezoe <hikezoe.birchill@mozilla.com> |
| Mon, 17 Feb 2020 23:41:52 +0000 | |
| changeset 514352 | 57b23bc537f239276d37a1e055320951dfa8d14c |
| parent 514351 | 4d6cb9cd66fab40cd692cf38ef72febf0fbdad7f |
| child 514353 | 5df075b6a6bb092533d786fefc350535dd940f67 |
| push id | 37132 |
| push user | rmaries@mozilla.com |
| push date | Tue, 18 Feb 2020 04:10:21 +0000 |
| treeherder | mozilla-central@5df075b6a6bb [default view] [failures only] |
| perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
| reviewers | gw |
| bugs | 1616140 |
| milestone | 75.0a1 |
| first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
| last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/webrender_bindings/src/bindings.rs +++ b/gfx/webrender_bindings/src/bindings.rs @@ -1794,33 +1794,29 @@ pub extern "C" fn wr_transaction_append_ txn: &mut Transaction, transform_array: *const WrTransformProperty, transform_count: usize, ) { if transform_count == 0 { return; } - let mut properties = DynamicProperties { - transforms: Vec::new(), - floats: Vec::new(), - }; - + let mut transforms = Vec::with_capacity(transform_count); let transform_slice = unsafe { make_slice(transform_array, transform_count) }; - properties.transforms.reserve(transform_slice.len()); + transforms.reserve(transform_slice.len()); for element in transform_slice.iter() { let prop = PropertyValue { key: PropertyBindingKey::new(element.id), value: element.transform.into(), }; - properties.transforms.push(prop); + transforms.push(prop); } - txn.append_dynamic_properties(properties); + txn.append_dynamic_transform_properties(transforms); } #[no_mangle] pub extern "C" fn wr_transaction_scroll_layer( txn: &mut Transaction, pipeline_id: WrPipelineId, scroll_id: u64, new_scroll_origin: LayoutPoint
--- a/gfx/wr/webrender/src/render_backend.rs +++ b/gfx/wr/webrender/src/render_backend.rs @@ -509,18 +509,18 @@ impl Document { } FrameMsg::GetScrollNodeState(tx) => { profile_scope!("GetScrollNodeState"); tx.send(self.scene.spatial_tree.get_scroll_node_state()).unwrap(); } FrameMsg::UpdateDynamicProperties(property_bindings) => { self.dynamic_properties.set_properties(property_bindings); } - FrameMsg::AppendDynamicProperties(property_bindings) => { - self.dynamic_properties.add_properties(property_bindings); + FrameMsg::AppendDynamicTransformProperties(property_bindings) => { + self.dynamic_properties.add_transforms(property_bindings); } FrameMsg::SetPinchZoom(factor) => { if self.view.pinch_zoom_factor != factor.get() { self.view.pinch_zoom_factor = factor.get(); self.frame_is_valid = false; } } FrameMsg::SetIsTransformAsyncZooming(is_zooming, animation_id) => {
--- a/gfx/wr/webrender/src/scene.rs +++ b/gfx/wr/webrender/src/scene.rs @@ -1,14 +1,14 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use api::{BuiltDisplayList, DisplayItemCache, ColorF, DynamicProperties, Epoch, FontRenderMode}; -use api::{PipelineId, PropertyBinding, PropertyBindingId, MixBlendMode, StackingContext}; +use api::{PipelineId, PropertyBinding, PropertyBindingId, PropertyValue, MixBlendMode, StackingContext}; use api::units::*; use crate::composite::CompositorKind; use crate::clip::{ClipStore, ClipDataStore}; use crate::spatial_tree::{SpatialTree, SpatialNodeIndex}; use crate::frame_builder::{ChasePrimitive, FrameBuilderConfig}; use crate::hit_test::{HitTester, HitTestingScene, HitTestingSceneStats}; use crate::internal_types::{FastHashMap, FastHashSet}; use crate::prim_store::{PrimitiveStore, PrimitiveStoreStats, PictureIndex}; @@ -37,23 +37,22 @@ impl SceneProperties { } /// Set the current property list for this display list. pub fn set_properties(&mut self, properties: DynamicProperties) { self.pending_properties = Some(properties); } /// Add to the current property list for this display list. - pub fn add_properties(&mut self, properties: DynamicProperties) { + pub fn add_transforms(&mut self, transforms: Vec<PropertyValue<LayoutTransform>>) { let mut pending_properties = self.pending_properties .take() .unwrap_or_default(); - pending_properties.transforms.extend(properties.transforms); - pending_properties.floats.extend(properties.floats); + pending_properties.transforms.extend(transforms); self.pending_properties = Some(pending_properties); } /// Flush any pending updates to the scene properties. Returns /// true if the properties have changed since the last flush /// was called. This code allows properties to be changed by /// multiple set_properties and add_properties calls during a
--- a/gfx/wr/webrender_api/src/api.rs +++ b/gfx/wr/webrender_api/src/api.rs @@ -378,18 +378,18 @@ impl Transaction { pub fn update_dynamic_properties(&mut self, properties: DynamicProperties) { self.frame_ops.push(FrameMsg::UpdateDynamicProperties(properties)); } /// Add to the list of animated property bindings that should be used to /// resolve bindings in the current display list. This is a convenience method /// so the caller doesn't have to figure out all the dynamic properties before /// setting them on the transaction but can do them incrementally. - pub fn append_dynamic_properties(&mut self, properties: DynamicProperties) { - self.frame_ops.push(FrameMsg::AppendDynamicProperties(properties)); + pub fn append_dynamic_transform_properties(&mut self, transforms: Vec<PropertyValue<LayoutTransform>>) { + self.frame_ops.push(FrameMsg::AppendDynamicTransformProperties(transforms)); } /// Consumes this object and just returns the frame ops. pub fn get_frame_ops(self) -> Vec<FrameMsg> { self.frame_ops } fn finalize(self) -> (TransactionMsg, Vec<Payload>) { @@ -857,17 +857,17 @@ pub enum FrameMsg { Scroll(ScrollLocation, WorldPoint), /// ScrollNodeWithId(LayoutPoint, di::ExternalScrollId, ScrollClamping), /// GetScrollNodeState(MsgSender<Vec<ScrollNodeState>>), /// UpdateDynamicProperties(DynamicProperties), /// - AppendDynamicProperties(DynamicProperties), + AppendDynamicTransformProperties(Vec<PropertyValue<LayoutTransform>>), /// SetPinchZoom(ZoomFactor), /// SetIsTransformAsyncZooming(bool, PropertyBindingId), } impl fmt::Debug for SceneMsg { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { @@ -889,17 +889,17 @@ impl fmt::Debug for FrameMsg { f.write_str(match *self { FrameMsg::UpdateEpoch(..) => "FrameMsg::UpdateEpoch", FrameMsg::HitTest(..) => "FrameMsg::HitTest", FrameMsg::SetPan(..) => "FrameMsg::SetPan", FrameMsg::Scroll(..) => "FrameMsg::Scroll", FrameMsg::ScrollNodeWithId(..) => "FrameMsg::ScrollNodeWithId", FrameMsg::GetScrollNodeState(..) => "FrameMsg::GetScrollNodeState", FrameMsg::UpdateDynamicProperties(..) => "FrameMsg::UpdateDynamicProperties", - FrameMsg::AppendDynamicProperties(..) => "FrameMsg::AppendDynamicProperties", + FrameMsg::AppendDynamicTransformProperties(..) => "FrameMsg::AppendDynamicTransformProperties", FrameMsg::SetPinchZoom(..) => "FrameMsg::SetPinchZoom", FrameMsg::SetIsTransformAsyncZooming(..) => "FrameMsg::SetIsTransformAsyncZooming", }) } } bitflags!{ /// Bit flags for WR stages to store in a capture.