https://github.com/mozilla/gecko-dev
Raw File
Tip revision: 65baa7add9fb515f95b0e6404616de76537b1757 authored by ffxbld on 17 January 2017, 12:37:08 UTC
Added FENNEC_51_0_RELEASE FENNEC_51_0_BUILD1 tag(s) for changeset 792e280b5c36. DONTBUILD CLOSED TREE a=release
Tip revision: 65baa7a
PGPU.ipdl
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 GraphicsMessages;
include protocol PCompositorBridge;
include protocol PImageBridge;
include protocol PVRManager;
include protocol PVsyncBridge;

using base::ProcessId from "base/process.h";
using mozilla::TimeDuration from "mozilla/TimeStamp.h";
using mozilla::CSSToLayoutDeviceScale from "Units.h";
using mozilla::gfx::IntSize from "mozilla/gfx/2D.h";

namespace mozilla {
namespace gfx {

union GfxPrefValue {
  bool;
  int32_t;
  uint32_t;
  float;
};

struct GfxPrefSetting {
  int32_t index;
  GfxPrefValue value;
};

sync protocol PGPU
{
parent:
  // Sent by the UI process to initiate core settings.
  async Init(GfxPrefSetting[] prefs,
             GfxVarUpdate[] vars,
             DevicePrefs devicePrefs);

  async InitVsyncBridge(Endpoint<PVsyncBridgeParent> endpoint);
  async InitImageBridge(Endpoint<PImageBridgeParent> endpoint);
  async InitVRManager(Endpoint<PVRManagerParent> endpoint);

  // Called to update a gfx preference or variable.
  async UpdatePref(GfxPrefSetting pref);
  async UpdateVar(GfxVarUpdate var);

  // Create a new top-level compositor.
  async NewWidgetCompositor(Endpoint<PCompositorBridgeParent> endpoint,
                            CSSToLayoutDeviceScale scale,
                            TimeDuration vsyncRate,
                            bool useExternalSurface,
                            IntSize surfaceSize);

  // Create a new content-process compositor bridge.
  async NewContentCompositorBridge(Endpoint<PCompositorBridgeParent> endpoint);
  async NewContentImageBridge(Endpoint<PImageBridgeParent> endpoint);
  async NewContentVRManager(Endpoint<PVRManagerParent> endpoint);

  async DeallocateLayerTreeId(uint64_t layersId);

  // Called to notify the GPU process of who owns a layersId.
  sync AddLayerTreeIdMapping(uint64_t layersId, ProcessId ownerId);

  // Request the current DeviceStatus from the GPU process. This blocks until
  // one is available (i.e., Init has completed).
  sync GetDeviceStatus() returns (GPUDeviceData status);

child:
  // Sent when the GPU process has initialized devices. This occurs once, after
  // Init().
  async InitComplete(GPUDeviceData data);
};

} // namespace gfx
} // namespace mozilla
back to top