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 #3861

Merged
merged 4 commits into from Feb 18, 2020
Prev

Bug 1616140 - Rename append_dynamic_properties to append_dynamic_tran…

…sform_properties. r=gw

It's only for transforms by APZC.

Differential Revision: https://phabricator.services.mozilla.com/D63115

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/57b23bc537f239276d37a1e055320951dfa8d14c
  • Loading branch information
hiikezoe authored and moz-gfx committed Feb 18, 2020
commit 0479ab9ef9a082ad997d7ecb889c5f759e65fbab
@@ -514,8 +514,8 @@ impl Document {
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() {
@@ -3,7 +3,7 @@
* 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};
@@ -42,13 +42,12 @@ impl SceneProperties {
}

/// 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);
}
@@ -383,8 +383,8 @@ impl Transaction {
/// 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.
@@ -862,7 +862,7 @@ pub enum FrameMsg {
///
UpdateDynamicProperties(DynamicProperties),
///
AppendDynamicProperties(DynamicProperties),
AppendDynamicTransformProperties(Vec<PropertyValue<LayoutTransform>>),
///
SetPinchZoom(ZoomFactor),
///
@@ -894,7 +894,7 @@ impl fmt::Debug for FrameMsg {
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",
})
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.