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

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 1265013003: Adds support for hittesting points on surface quads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 5 years, 4 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
Index: content/browser/compositor/delegated_frame_host.cc
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index 903f7a092666ec6aa667e10a07378c42bd263513..b8a8ad45153eabff883f7f53ab830ff7821c69b9 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -14,8 +14,10 @@
#include "cc/resources/texture_mailbox.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
+#include "cc/surfaces/surface_hittest.h"
#include "cc/surfaces/surface_manager.h"
#include "content/browser/compositor/resize_lock.h"
+#include "content/browser/compositor/surface_utils.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/common/gpu/client/gl_helper.h"
#include "content/public/browser/render_widget_host_view_frame_subscriber.h"
@@ -203,6 +205,13 @@ uint32_t DelegatedFrameHost::GetSurfaceIdNamespace() {
return id_allocator_->id_namespace();
}
+cc::SurfaceId DelegatedFrameHost::SurfaceIdAtPoint(
+ const gfx::Point& point,
+ gfx::Point* transformed_point) {
+ cc::SurfaceHittest hittest(GetSurfaceManager());
+ return hittest.Hittest(surface_id_, point, transformed_point);
+}
+
bool DelegatedFrameHost::ShouldSkipFrame(gfx::Size size_in_dip) const {
// Should skip a frame only when another frame from the renderer is guaranteed
// to replace it. Otherwise may cause hangs when the renderer is waiting for
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698