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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 170743004: Added early out for pinch to prevent crash when no inner scroll layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed checks from PinchBegin/End Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index ec89ddcfd734a055a9cdc9fa4dd9bc60bc870f99..1773e6bb5cb069b5966d0fc7cb8179f548b7609d 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2508,9 +2508,10 @@ void LayerTreeHostImpl::PinchGestureBegin() {
void LayerTreeHostImpl::PinchGestureUpdate(float magnify_delta,
gfx::Point anchor) {
- TRACE_EVENT0("cc", "LayerTreeHostImpl::PinchGestureUpdate");
+ if (!InnerViewportScrollLayer())
+ return;
- DCHECK(InnerViewportScrollLayer());
+ TRACE_EVENT0("cc", "LayerTreeHostImpl::PinchGestureUpdate");
// Keep the center-of-pinch anchor specified by (x, y) in a stable
// position over the course of the magnify.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698