summaryrefslogtreecommitdiffstats
path: root/content/browser/compositor/surface_utils.h
diff options
context:
space:
mode:
authorkenrb <kenrb@chromium.org>2016-02-26 16:53:50 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-27 00:56:25 +0000
commite975655cd86a5d47b0cfdb5c82039bcb5a561665 (patch)
tree9d67eec0b226c4b5872449419c44994238d0f7ab /content/browser/compositor/surface_utils.h
parentaab21cbcda7d71f8ea7103e7dceb414b9280173d (diff)
downloadchromium_src-e975655cd86a5d47b0cfdb5c82039bcb5a561665.zip
chromium_src-e975655cd86a5d47b0cfdb5c82039bcb5a561665.tar.gz
chromium_src-e975655cd86a5d47b0cfdb5c82039bcb5a561665.tar.bz2
Add helper class for tests using browser process hit testing
Tests that rely on browser process hit testing are challenging to write because hit testing will not work until a compositor frame has been received from an out-of-process iframe's renderer, and a subsequent compositor frame is received from its parent renderer that contains the SurfaceId used by the OOPIF. In trying to write a test that hit tests through nested OOPIFs, trying to reason it out just based on compositor frame swap events becomes the kind of concurrency problem that you studied in school and thought, "Thankfully there are primitives to handle this sort of thing so I won't have to remember any of this after the exam." This CL adds a helper class that handles the problem by reaching into the compositor's Surface code and signalling when a desired Surface is available for hit testing. BUG=589572 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1734403003 Cr-Commit-Position: refs/heads/master@{#378044}
Diffstat (limited to 'content/browser/compositor/surface_utils.h')
-rw-r--r--content/browser/compositor/surface_utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/content/browser/compositor/surface_utils.h b/content/browser/compositor/surface_utils.h
index 00d0fd7..6d986a9 100644
--- a/content/browser/compositor/surface_utils.h
+++ b/content/browser/compositor/surface_utils.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_COMPOSITOR_SURFACE_UTILS_H_
#include "base/memory/scoped_ptr.h"
+#include "content/common/content_export.h"
#include "content/public/browser/readback_types.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/gfx/geometry/size.h"
@@ -20,6 +21,7 @@ namespace content {
scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator();
+CONTENT_EXPORT
cc::SurfaceManager* GetSurfaceManager();
void CopyFromCompositingSurfaceHasResult(