Add ScopedAllowBaseSyncPrimitives to sync calls from viz thread
With the WebViewVizUseThreadPool feature enabled we need to make sure
the sync calls are annotated correctly.
Bug: 341151462
Change-Id: Icf60aef103c3fb8c44d3d0bdfe39a0b573079085
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5558373
Reviewed-by: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1305814}
NOKEYCHECK=True
GitOrigin-RevId: 39164ca8b920ce00030c2bef414bc1aab658503e
diff --git a/threading/thread_restrictions.h b/threading/thread_restrictions.h
index e6cdadc..d74d335 100644
--- a/threading/thread_restrictions.h
+++ b/threading/thread_restrictions.h
@@ -169,6 +169,7 @@
class AwFormDatabaseService;
class CookieManager;
class JsSandboxIsolate;
+class OverlayProcessorWebView;
class ScopedAllowInitGLBindings;
class VizCompositorThreadRunnerWebView;
} // namespace android_webview
@@ -433,6 +434,8 @@
namespace viz {
class HostGpuMemoryBufferManager;
class ClientGpuMemoryBufferManager;
+class DisplayCompositorMemoryAndTaskController;
+class SkiaOutputSurfaceImpl;
} // namespace viz
namespace vr {
class VrShell;
@@ -810,7 +813,12 @@
// Usage that should be fixed:
// Sorted by class name (with namespace).
friend class ::NativeBackendKWallet; // http://crbug.com/125331
+ friend class android_webview::
+ OverlayProcessorWebView; // http://crbug.com/341151462
friend class blink::VideoFrameResourceProvider; // http://crbug.com/878070
+ friend class viz::
+ DisplayCompositorMemoryAndTaskController; // http://crbug.com/341151462
+ friend class viz::SkiaOutputSurfaceImpl; // http://crbug.com/341151462
ScopedAllowBaseSyncPrimitives() DEFAULT_IF_DCHECK_IS_OFF;
~ScopedAllowBaseSyncPrimitives() DEFAULT_IF_DCHECK_IS_OFF;