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

Unified Diff: cc/layers/layer.cc

Issue 217313003: Stop displaying layers with non-invertible transforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 44c71e5f409e06c38d28eebf749a94c1ec08a65c..6ce3054388682e042f3aa59361abaf7012774723 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -58,6 +58,7 @@ Layer::Layer()
draw_checkerboard_for_missing_tiles_(false),
force_render_surface_(false),
is_3d_sorted_(false),
+ transform_is_invertible_(true),
anchor_point_(0.5f, 0.5f),
background_color_(0),
opacity_(1.f),
@@ -604,6 +605,7 @@ void Layer::SetTransform(const gfx::Transform& transform) {
if (transform_ == transform)
return;
transform_ = transform;
+ transform_is_invertible_ = transform.IsInvertible();
SetNeedsCommit();
}
@@ -944,7 +946,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer->SetIs3dSorted(is_3d_sorted_);
layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_);
if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating())
- layer->SetTransform(transform_);
+ layer->SetTransformAndInvertibility(transform_, transform_is_invertible_);
DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly()));
layer->SetScrollClipLayer(scroll_clip_layer_id_);
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | cc/layers/layer_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698