summaryrefslogtreecommitdiff
path: root/chromium/ui/compositor/layer.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/compositor/layer.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/compositor/layer.h')
-rw-r--r--chromium/ui/compositor/layer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/chromium/ui/compositor/layer.h b/chromium/ui/compositor/layer.h
index 505c81e688c..8434ac53c33 100644
--- a/chromium/ui/compositor/layer.h
+++ b/chromium/ui/compositor/layer.h
@@ -458,7 +458,7 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimationDelegate,
float device_scale_factor() const { return device_scale_factor_; }
// Triggers a call to SwitchToLayer.
- void SwitchCCLayerForTest();
+ bool SwitchCCLayerForTest();
const cc::Region& damaged_region_for_testing() const {
return damaged_region_;
@@ -527,7 +527,7 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimationDelegate,
// Implementation of LayerAnimatorDelegate
void SetBoundsFromAnimation(const gfx::Rect& bounds,
PropertyChangeReason reason) override;
- void SetTransformFromAnimation(const gfx::Transform& transform,
+ void SetTransformFromAnimation(const gfx::Transform& new_transform,
PropertyChangeReason reason) override;
void SetOpacityFromAnimation(float opacity,
PropertyChangeReason reason) override;
@@ -575,8 +575,11 @@ class COMPOSITOR_EXPORT Layer : public LayerAnimationDelegate,
// Set all filters which got applied to the layer background.
void SetLayerBackgroundFilters();
- // Cleanup |cc_layer_| and replaces it with |new_layer|.
- void SwitchToLayer(scoped_refptr<cc::Layer> new_layer);
+ // Cleanup |cc_layer_| and replaces it with |new_layer|. When stopping
+ // animations handled by old cc layer before the switch, |this| could be
+ // released by an animation observer. Returns false when it happens and
+ // callers should take cautions as well. Otherwise returns true.
+ bool SwitchToLayer(scoped_refptr<cc::Layer> new_layer) WARN_UNUSED_RESULT;
void SetCompositorForAnimatorsInTree(Compositor* compositor);
void ResetCompositorForAnimatorsInTree(Compositor* compositor);