diff options
author | fsamuel <fsamuel@chromium.org> | 2015-12-06 06:54:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-06 14:55:08 +0000 |
commit | a40c9c16df5a0c9a9e14411dc3aa9a3dcde7e498 (patch) | |
tree | fca19c1e1f0b0c49f567c661ea35e7c4580f5a68 /cc/surfaces/surface_hittest_delegate.h | |
parent | 79adad4e7973e44df1ee34b4952c2bfade88ee01 (diff) | |
download | chromium_src-a40c9c16df5a0c9a9e14411dc3aa9a3dcde7e498.zip chromium_src-a40c9c16df5a0c9a9e14411dc3aa9a3dcde7e498.tar.gz chromium_src-a40c9c16df5a0c9a9e14411dc3aa9a3dcde7e498.tar.bz2 |
cc: Allow Surfaces clients to customize hit testing
Until we have a better hit testing data structure based on
slimming paint work, Mus needs to annotate surfaces hit
testing with additional information for shadows.
This CL provides a generic customization hook to allow a
Surfaces client to make a hit testing decision based on
factors unknown to cc.
Note that this is a short term solution until we have a
better hit testing data structure from slimming paint.
BUG=548424
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1503553002
Cr-Commit-Position: refs/heads/master@{#363371}
Diffstat (limited to 'cc/surfaces/surface_hittest_delegate.h')
-rw-r--r-- | cc/surfaces/surface_hittest_delegate.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cc/surfaces/surface_hittest_delegate.h b/cc/surfaces/surface_hittest_delegate.h new file mode 100644 index 0000000..1f0fbf9 --- /dev/null +++ b/cc/surfaces/surface_hittest_delegate.h @@ -0,0 +1,24 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ +#define CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ + +namespace cc { + +class SurfaceDrawQuad; + +// Clients of SurfaceHittest can provide a SurfaceHittestDelegate implementation +// to override the hit target based on metadata outside of the Surfaces system. +class SurfaceHittestDelegate { + public: + // Return true if this delegate rejects this |surface_quad| as a candidate hit + // target. + virtual bool RejectHitTarget(const SurfaceDrawQuad* surface_quad, + const gfx::Point& point_in_quad_space) = 0; +}; + +} // namespace cc + +#endif // CC_SURFACES_SURFACE_HITTEST_DELEGATE_H_ |