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  PCanvas.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 "mozilla/layers/LayersMessageUtils.h";
include "mozilla/layers/CanvasTranslator.h";

[MoveOnly] using mozilla::CrossProcessSemaphoreHandle from "mozilla/ipc/CrossProcessSemaphore.h";
using mozilla::layers::RemoteTextureOwnerId from "mozilla/layers/LayersTypes.h";
using mozilla::layers::TextureType from "mozilla/layers/LayersTypes.h";
[MoveOnly] using mozilla::ipc::SharedMemory::Handle from "mozilla/ipc/SharedMemory.h";
using mozilla::gfx::BackendType from "mozilla/gfx/Types.h";

namespace mozilla {
namespace layers {

/**
 * PCanvas is the IPDL for recorded Canvas drawing.
 */
[ParentImpl="CanvasTranslator"]
async protocol PCanvas {
  manager PCanvasManager;

parent:
  /**
   * Initialize a CanvasTranslator for a particular TextureType, which
   * translates events from shared memory buffers. aHeaderHandle is a shared
   * memory handle for the control header. aBufferHandles are shared memory
   * handles for the initial buffers for translation. aBufferSize is the size of
   * each aBufferHandles' memory and the default size. aReaderSem and aWriterSem
   * are handles for the semaphores to handle waiting on either side.
   */
  async InitTranslator(TextureType aTextureType, TextureType aWebglTextureType,
                       BackendType aBackendType, Handle aHeaderHandle,
                       Handle[] aBufferHandles, uint64_t aBufferSize,
                       CrossProcessSemaphoreHandle aReaderSem,
                       CrossProcessSemaphoreHandle aWriterSem);

  /**
   * Restart the translation from a Stopped state.
   */
  async RestartTranslation();

  /**
   * Adds a new buffer to be translated. The current buffer will be recycled if
   * it is of the default size. The translation will then be restarted.
   */
  async AddBuffer(Handle aBufferHandle, uint64_t aBufferSize);

  /**
   * Sets the shared memory to be used for readback.
   */
  async SetDataSurfaceBuffer(Handle aBufferHandle, uint64_t aBufferSize);

  /**
   * Notify CanvasTranslator it is about to be minimized.
   */
  async ClearCachedResources();

  /**
   * Notify CanvasTranslator when it is dormant.
   */
  async DropFreeBuffersWhenDormant();

  async __delete__();

child:
  /**
   * Notify that the canvas device used by the translator has changed.
   */
  async NotifyDeviceChanged();

  /**
   * Notify that the canvas device used by the translator has been reset.
   */
  async NotifyDeviceReset(RemoteTextureOwnerId[] aOwners);

  /**
   * Deactivate remote canvas, which will cause fall back to software.
   */
  async Deactivate();

  /**
   * Block further accelerated canvases from being created, but allow existing
   * canvases to continue processing.
   */
  async BlockCanvas();

  /**
   * Notify that a remote accelerated canvas requires a fallback refresh.
   */
  async NotifyRequiresRefresh(RemoteTextureOwnerId aTextureOwnerId);

  /**
   * Cache the shmem of the framebuffer for snapshotting.
   */
  async SnapshotShmem(RemoteTextureOwnerId aTextureOwnerId, Handle aShmemHandle, uint32_t aShmemSize) returns (bool aSuccess);

  async NotifyTextureDestruction(RemoteTextureOwnerId aTextureOwnerId);
};

} // layers
} // mozilla

[ Dauer der Verarbeitung: 0.24 Sekunden  (vorverarbeitet)  ]