summaryrefslogtreecommitdiff
path: root/chromium/ui/compositor/layer.h
diff options
context:
space:
mode:
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);