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

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: Fix test comment for cases 2-3. Created 6 years, 8 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.h » ('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 a9e59d35ed8007322e6961899eb8ad625c2e9b8a..733ecd2dbc6d4eca593b8c0fc9a1a1d4e875677d 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -59,6 +59,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),
@@ -605,6 +606,7 @@ void Layer::SetTransform(const gfx::Transform& transform) {
if (transform_ == transform)
return;
transform_ = transform;
+ transform_is_invertible_ = transform.IsInvertible();
SetNeedsCommit();
}
@@ -920,7 +922,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698