Chromium Code Reviews| 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; |