Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/layers/ipc/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 3 kB image not shown  

Quelle  PCompositorManager.ipdl   Sprache: unbekannt

 
/* -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 * vim: sw=2 ts=8 et :
 */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

include protocol PCanvasManager;
include protocol PCompositorBridge;
include LayersSurfaces;
include "mozilla/GfxMessageUtils.h";
include "mozilla/layers/WebRenderMessageUtils.h";

using mozilla::TimeDuration from "mozilla/TimeStamp.h";
using mozilla::CSSToLayoutDeviceScale from "Units.h";
using mozilla::gfx::IntSize from "mozilla/gfx/2D.h";
[MoveOnly] using mozilla::ipc::SharedMemory::Handle from "mozilla/ipc/SharedMemory.h";
using mozilla::layers::CompositorOptions from "mozilla/layers/LayersMessageUtils.h";
using mozilla::wr::ExternalImageId from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::MemoryReport from "mozilla/webrender/WebRenderTypes.h";
using mozilla::wr::WebRenderError from "mozilla/webrender/WebRenderTypes.h";
using mozilla::layers::SharedSurfacesMemoryReport from "mozilla/layers/SharedSurfacesMemoryReport.h";

namespace mozilla {
namespace layers {

struct WidgetCompositorOptions {
  CSSToLayoutDeviceScale scale;
  TimeDuration vsyncRate;
  CompositorOptions options;
  bool useExternalSurfaceSize;
  IntSize surfaceSize;
  uint64_t innerWindowId;
};

struct ContentCompositorOptions {
};

struct SameProcessWidgetCompositorOptions {
};

union CompositorBridgeOptions {
  ContentCompositorOptions;
  WidgetCompositorOptions;
  SameProcessWidgetCompositorOptions;
};

/**
 * The PCompositorManager protocol is the top-level protocol between the
 * compositor thread and the creators of compositors. It exists in the
 * following conditions:
 * - One PCompositorManager between the GPU process and each content process.
 *   If the GPU/UI processes are combined, there is one PCompositorManager
 *   between the combined GPU/UI process and each content process.
 * - One PCompositorManager between the GPU process and the UI process. If
 *   they are combined, there is still one PCompositorManager, but both the
 *   child and parent live in the same process.
 * The intention for this protocol is to facilitate communication with the
 * compositor thread for compositor data that is only shared once, rather than
 * per PCompositorBridge instance.
 */
[NeedsOtherPid, ParentProc=compositor, ChildProc=anydom]
sync protocol PCompositorManager
{
  manages PCompositorBridge;

parent:
  /**
   * There are three variants of a PCompositorBridge protocol, each of which can
   * only be created by certain processes and configurations:
   * - A "content" PCompositorBridge is requested by each content process,
   *   representing the drawable area for Web content.
   * - A "widget" PCompositorBridge is requested by the UI process for each
   *   "top level browser window" for chrome and such.
   * - A "same process widget" PCompositorBridge is requested by the combined
   *   GPU/UI process for each "top level browser window" as above.
   * See gfx/layers/ipc/PCompositorBridge.ipdl for more details.
   */
  async PCompositorBridge(CompositorBridgeOptions options);

  async AddSharedSurface(ExternalImageId aId, SurfaceDescriptorShared aDesc);
  async RemoveSharedSurface(ExternalImageId aId);
  async ReportSharedSurfacesMemory() returns (SharedSurfacesMemoryReport aReport);

  async NotifyMemoryPressure();

  async ReportMemory() returns (MemoryReport aReport);

  async InitCanvasManager(Endpoint<PCanvasManagerParent> endpoint);

child:
  async NotifyWebRenderError(WebRenderError error);
};

} // layers
} // mozilla

[ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ]