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

Unified Diff: services/gfx/compositor/compositor_engine.cc

Issue 1774373002: Mozart: Implement hit testing. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-4
Patch Set: Created 4 years, 9 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 | « mojo/services/gfx/composition/interfaces/hit_tests.mojom ('k') | services/gfx/compositor/graph/node_def.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gfx/compositor/compositor_engine.cc
diff --git a/services/gfx/compositor/compositor_engine.cc b/services/gfx/compositor/compositor_engine.cc
index 9f3c4a76f4a21852370564c9b93316dda32ce472..276c4bfad8681912e56371db6d5da58e092957c0 100644
--- a/services/gfx/compositor/compositor_engine.cc
+++ b/services/gfx/compositor/compositor_engine.cc
@@ -276,8 +276,13 @@ void CompositorEngine::HitTest(
DCHECK(point);
DVLOG(1) << "HitTest: renderer=" << renderer_state << ", point=" << point;
- // TODO(jeffbrown): hit tests on scenes
auto result = mojo::gfx::composition::HitTestResult::New();
+
+ if (renderer_state->visible_snapshot()) {
+ DCHECK(!renderer_state->visible_snapshot()->is_blocked());
+ renderer_state->visible_snapshot()->HitTest(*point, result.get());
+ }
+
callback.Run(result.Pass());
}
« no previous file with comments | « mojo/services/gfx/composition/interfaces/hit_tests.mojom ('k') | services/gfx/compositor/graph/node_def.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698