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

Unified Diff: cc/trees/draw_property_utils.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/trees/draw_property_utils.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index c9ead984cb713f6c5d5b0600881370d6fbad8d0c..1e6d2c74ebc7510bee61ed777bf7485700b95b4e 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -157,11 +157,14 @@ void FindLayersThatNeedVisibleRects(Layer* layer,
const TransformTree& tree,
bool subtree_is_visible_from_ancestor,
std::vector<Layer*>* layers_to_update) {
- const bool subtree_is_invisble =
- layer->opacity() == 0.0f ||
+ const bool layer_is_invisible =
+ (!layer->opacity() && !layer->OpacityIsAnimating() &&
+ !layer->OpacityCanAnimateOnImplThread());
+ const bool layer_is_backfacing =
(layer->has_render_surface() && !layer->double_sided() &&
IsSurfaceBackFaceExposed(layer, tree));
+ const bool subtree_is_invisble = layer_is_invisible || layer_is_backfacing;
if (subtree_is_invisble)
return;
@@ -262,10 +265,11 @@ void ComputeVisibleRectsUsingPropertyTrees(
const gfx::Rect& viewport,
const gfx::Transform& device_transform,
TransformTree* transform_tree,
- ClipTree* clip_tree) {
+ ClipTree* clip_tree,
+ OpacityTree* opacity_tree) {
PropertyTreeBuilder::BuildPropertyTrees(
root_layer, page_scale_layer, page_scale_factor, device_scale_factor,
- viewport, device_transform, transform_tree, clip_tree);
+ viewport, device_transform, transform_tree, clip_tree, opacity_tree);
ComputeTransforms(transform_tree);
ComputeClips(clip_tree, *transform_tree);
« no previous file with comments | « cc/trees/draw_property_utils.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698