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

Unified Diff: cc/layer_tree_host_common.cc

Issue 12280014: cc: Don't consider HUD layer for touches (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a test Created 7 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 | cc/layer_tree_host_common_unittest.cc » ('j') | cc/layer_tree_host_common_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index 4d3377a919de45164bb5a33f7b0663b8d4397fcd..e2d3a4df7055a6ebc0c21eaf5eeb53512fb190a7 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -7,10 +7,12 @@
#include <algorithm>
#include "base/debug/trace_event.h"
+#include "cc/heads_up_display_layer_impl.h"
danakj 2013/02/19 20:08:12 you don't need this header i don't think?
#include "cc/layer.h"
#include "cc/layer_impl.h"
#include "cc/layer_iterator.h"
#include "cc/layer_sorter.h"
+#include "cc/layer_tree_impl.h"
#include "cc/math_util.h"
#include "cc/render_surface.h"
#include "cc/render_surface_impl.h"
@@ -1133,6 +1135,11 @@ static bool pointIsClippedBySurfaceOrClipRect(const gfx::PointF& screenSpacePoin
LayerImpl* LayerTreeHostCommon::findLayerThatIsHitByPoint(const gfx::PointF& screenSpacePoint, const std::vector<LayerImpl*>& renderSurfaceLayerList)
{
LayerImpl* foundLayer = 0;
+ LayerImpl* hudLayer = 0;
+ if (renderSurfaceLayerList.empty())
+ return foundLayer;
+ else
+ hudLayer = renderSurfaceLayerList.front()->layerTreeImpl()->hud_layer();
danakj 2013/02/19 20:08:12 If this code is going to move to LTImpl anyways, I
danakj 2013/02/19 22:52:58 Nix that. It will require a lot of test changes..
typedef LayerIterator<LayerImpl, std::vector<LayerImpl*>, RenderSurfaceImpl, LayerIteratorActions::FrontToBack> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::end(&renderSurfaceLayerList);
@@ -1144,6 +1151,9 @@ LayerImpl* LayerTreeHostCommon::findLayerThatIsHitByPoint(const gfx::PointF& scr
LayerImpl* currentLayer = (*it);
+ if (currentLayer == hudLayer)
danakj 2013/02/19 22:52:58 Since this is the least likely thing to exclude a
+ continue;
+
gfx::RectF contentRect(gfx::PointF(), currentLayer->contentBounds());
if (!pointHitsRect(screenSpacePoint, currentLayer->screenSpaceTransform(), contentRect))
continue;
« no previous file with comments | « no previous file | cc/layer_tree_host_common_unittest.cc » ('j') | cc/layer_tree_host_common_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698