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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 25904004: Add --disable-compositor-touch-hit-testing flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable touch hit testing flag: fix uninitialized variable Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/base/switches.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 client_->SetNeedsRedrawOnImplThread(); 419 client_->SetNeedsRedrawOnImplThread();
420 client_->SetNeedsCommitOnImplThread(); 420 client_->SetNeedsCommitOnImplThread();
421 client_->RenewTreePriority(); 421 client_->RenewTreePriority();
422 } 422 }
423 423
424 void LayerTreeHostImpl::ScheduleAnimation() { 424 void LayerTreeHostImpl::ScheduleAnimation() {
425 client_->SetNeedsRedrawOnImplThread(); 425 client_->SetNeedsRedrawOnImplThread();
426 } 426 }
427 427
428 bool LayerTreeHostImpl::HaveTouchEventHandlersAt(gfx::Point viewport_point) { 428 bool LayerTreeHostImpl::HaveTouchEventHandlersAt(gfx::Point viewport_point) {
429 if (!settings_.touch_hit_testing)
430 return true;
429 if (!EnsureRenderSurfaceLayerList()) 431 if (!EnsureRenderSurfaceLayerList())
430 return false; 432 return false;
431 433
432 gfx::PointF device_viewport_point = 434 gfx::PointF device_viewport_point =
433 gfx::ScalePoint(viewport_point, device_scale_factor_); 435 gfx::ScalePoint(viewport_point, device_scale_factor_);
434 436
435 // First find out which layer was hit from the saved list of visible layers 437 // First find out which layer was hit from the saved list of visible layers
436 // in the most recent frame. 438 // in the most recent frame.
437 LayerImpl* layer_impl = LayerTreeHostCommon::FindLayerThatIsHitByPoint( 439 LayerImpl* layer_impl = LayerTreeHostCommon::FindLayerThatIsHitByPoint(
438 device_viewport_point, 440 device_viewport_point,
(...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2800 std::set<UIResourceId>::iterator found_in_evicted = 2802 std::set<UIResourceId>::iterator found_in_evicted =
2801 evicted_ui_resources_.find(uid); 2803 evicted_ui_resources_.find(uid);
2802 if (found_in_evicted == evicted_ui_resources_.end()) 2804 if (found_in_evicted == evicted_ui_resources_.end())
2803 return; 2805 return;
2804 evicted_ui_resources_.erase(found_in_evicted); 2806 evicted_ui_resources_.erase(found_in_evicted);
2805 if (evicted_ui_resources_.empty()) 2807 if (evicted_ui_resources_.empty())
2806 client_->OnCanDrawStateChanged(CanDraw()); 2808 client_->OnCanDrawStateChanged(CanDraw());
2807 } 2809 }
2808 2810
2809 } // namespace cc 2811 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/switches.cc ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698