| // Copyright 2021 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. |
| |
| module media.mojom; |
| |
| import "mojo/public/mojom/base/unguessable_token.mojom"; |
| |
| // For Windows MediaFoundation playback, we need to send a DirectComposition |
| // (DCOMP) surface handle from the render process to the GPU process which can |
| // be later retrievd and set in GLImageDCOMPSurface. However, we cannot send the |
| // handle directly from the non-privileged render process to the GPU process, |
| // e.g. as part of DCOMPTexture interface (see gpu_channel.mojom). Instead, we |
| // use this interface to send the handle to DCOMPSurfaceRegistryBroker in the |
| // browser process, which then uses GpuService to send it the GPU process. The |
| // client is MediaFoundationRendererClient in the render process, and the |
| // implementation is the DCOMPSurfaceRegistryBroker in the browser process. |
| interface DCOMPSurfaceRegistry { |
| // Registers a DCOMP surface handle and returns a token. The token will then |
| // be used by MediaFoundationRendererClient to call DCOMPTexture to set the |
| // surface in GLImageDCOMPSurface. |
| RegisterDCOMPSurfaceHandle(handle<platform> surface_handle) |
| => (mojo_base.mojom.UnguessableToken token); |
| }; |