Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: cc/layers/layer.cc

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index ca0e3b8e99f607d3a3e284abcbc5e454b8ec7c21..bf2f26a4c4b5d06c36ceb10766a86219a2dccee0 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -1204,6 +1204,12 @@ void Layer::RemoveAnimation(int animation_id) {
SetNeedsCommit();
}
+void Layer::RemoveAnimation(int animation_id,
+ Animation::TargetProperty property) {
+ layer_animation_controller_->RemoveAnimation(animation_id, property);
+ SetNeedsCommit();
+}
+
void Layer::SetLayerAnimationControllerForTest(
scoped_refptr<LayerAnimationController> controller) {
layer_animation_controller_->RemoveValueObserver(this);
@@ -1318,6 +1324,24 @@ gfx::Transform Layer::draw_transform_from_property_trees(
return xform;
}
+float Layer::DrawOpacityFromPropertyTrees(const OpacityTree& tree) const {
+ if (!render_target())
+ return 0.f;
+
+ const OpacityNode* target_node =
+ tree.Node(render_target()->opacity_tree_index());
+ const OpacityNode* node = tree.Node(opacity_tree_index());
+ if (node == target_node)
+ return 1.f;
+
+ float draw_opacity = 1.f;
+ while (node != target_node) {
+ draw_opacity *= node->data;
+ node = tree.parent(node);
+ }
+ return draw_opacity;
+}
+
void Layer::SetFrameTimingRequests(
const std::vector<FrameTimingRequest>& requests) {
frame_timing_requests_ = requests;
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698