Files
palemoon27/gfx/layers/ipc/PCompositorBridge.ipdl
T
roytam1 07da6b90ed import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1248822 - In LayerManagerComposite::UpdateAndRender(), call PostProcessLayers() before LayerTreeInvalidation. r=mattwoodrow (503f81f51f)
- Bug 1259541 - Reduce clearing backbuffer in nsBaseWidget::CreateBackBufferDrawTarget() r=mattwoodrow (4f8cf8ab04)
- Bug 1174461 - [e10s] Return a cached result from SendGetNativePluginPort (r=jimm) a=kwierso (fff65b95ac)
- Bug 1263200 - Reset the APZ pointer in the base widget to null if the compositor creation fails. r=mstange (109d4a16a8)
- Bug 1264161 - Ensure we null out APZ pointers to the widget when it gets destroyed. r=botond (fdb516451e)
- Bug 1260018 - Route drag events to APZ, so it can accurately detect the end of a drag. r=kats (acd2b4a051)
- Remove drawWidgetAsOnScreen. (bug 1264393, r=mattwoodrow, webidl r=khuey) (b0ce23eacc)
- Bug 1254151 - use B8G8R8X8 for 24 bit depth visuals in nsShmImage with Cairo. r=jrmuizel (070ef9495d)
- Bug 1218955 - Remove nsIMEPicker, r=jchen (83adb6c582)
- Bug 1255655 - Const-ify keysymtab. r=karlt. (d9544cbf0c)
- Bug 1165048 - Music playback is getting stopped and is not resumed when modem is restarted. r=mwu (d3f99f8542)
- Bug 1264183. Remove unused argument to nsView::InvalidateHierarchy. r=mats (218ce04623)
- Bug 1210617 - [e10s] Implement PrivateBrowsingChannel for ExternalHelperAppParent. r=jduell (36e6ab7635)
- Bug 1258087 - Fix -Wunreachable-code warning in StartupCache.cpp on macosx64-mulet. r=froydnj (5f88df6993)
- Bug 1329798 - Include sys/sysmacros.h for major(), minor() on Linux. r=glandium, a=jcristau (a5c4073eb2)
- guard for non-linux system again or mac & FreeBSD fail to compile (6b5d2856b6)
2024-05-30 14:34:55 +08:00

195 lines
7.6 KiB
Plaintext

/* -*- Mode: C++; 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 LayersSurfaces;
include LayersMessages;
include protocol PBrowser;
include protocol PLayer;
include protocol PLayerTransaction;
include "mozilla/GfxMessageUtils.h";
using struct mozilla::null_t from "ipc/IPCMessageUtils.h";
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
using struct mozilla::layers::FrameMetrics from "FrameMetrics.h";
using mozilla::layers::FrameMetrics::ViewID from "FrameMetrics.h";
using mozilla::layers::MaybeZoomConstraints from "FrameMetrics.h";
using struct mozilla::layers::ScrollableLayerGuid from "FrameMetrics.h";
using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
using mozilla::layers::TouchBehaviorFlags from "mozilla/layers/APZUtils.h";
using mozilla::CrossProcessMutexHandle from "mozilla/ipc/CrossProcessMutex.h";
using mozilla::ipc::SharedMemoryBasic::Handle from "mozilla/ipc/SharedMemoryBasic.h";
using mozilla::CSSIntRegion from "Units.h";
using mozilla::LayoutDeviceIntPoint from "Units.h";
using mozilla::LayoutDeviceIntRegion from "Units.h";
using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
using class mozilla::layers::FrameUniformityData from "mozilla/layers/FrameUniformityData.h";
namespace mozilla {
namespace layers {
/**
* The PCompositorBridge protocol is used to manage communication between
* the main thread and the compositor thread context. It's primary
* purpose is to manage the PLayerTransaction sub protocol.
*/
sync protocol PCompositorBridge
{
// A Compositor manages a single Layer Manager (PLayerTransaction)
manages PLayerTransaction;
child:
// The child should invalidate retained layers. This is used for local
// compositor device resets, such as in CompositorD3D9, and ensures that
// TextureSources are recreated.
async InvalidateLayers(uint64_t layersId);
// The compositor type or device has changed, and a new texture factory
// identifier is available. Layers must be invalidated and the new identifier
// must be propagated.
async CompositorUpdated(uint64_t layersId, TextureFactoryIdentifier newIdentifier);
// The compositor completed a layers transaction. id is the layers id
// of the child layer tree that was composited (or 0 when notifying
// the root layer tree).
// transactionId is the id of the transaction before this composite, or 0
// if there was no transaction since the last composite.
async DidComposite(uint64_t id, uint64_t transactionId,
TimeStamp compositeStart, TimeStamp compositeEnd);
// The parent sends the child the requested fill ratio numbers.
async Overfill(uint32_t aOverfill);
/**
* Parent informs the child that the graphics objects are ready for
* compositing. This usually means that the graphics objects (textures
* and the like) are available on the GPU. This is used for chrome UI.
* @see RequestNotifyAfterRemotePaint
* @see PBrowser
*/
async RemotePaintIsReady();
/**
* Bounce plugin widget configurations over to the main thread for
* application on the widgets. Used on Windows and Linux in managing
* plugin widgets.
*/
async UpdatePluginConfigurations(LayoutDeviceIntPoint aContentOffset,
LayoutDeviceIntRegion aVisibleRegion,
PluginWindowData[] aPlugins);
/**
* Hides all registered plugin widgets associated with a particular chrome
* widget.
*/
async HideAllPlugins(uintptr_t aParentWidget);
/**
* Drop any buffers that might be retained on the child compositor
* side.
*/
async ClearCachedResources(uint64_t id);
parent:
/**
* Confirmation callback for UpdatePluginConfigurations and HideAllPlugins.
*/
async RemotePluginsReady();
// Confirmation that the child has invalidated all its layers, and will not
// request layers against an old compositor.
async AcknowledgeCompositorUpdate(uint64_t id);
// Child sends the parent a request for fill ratio numbers.
async RequestOverfill();
// Child requests frame uniformity measurements
sync GetFrameUniformity() returns (FrameUniformityData data);
// The child is about to be destroyed, so perform any necessary cleanup.
sync WillClose();
// Pause/resume the compositor. These are intended to be used on mobile, when
// the compositor needs to pause/resume in lockstep with the application.
sync Pause();
sync Resume();
// The child layer tree is hidden. id is the layers id of the child
// layer tree.
async NotifyHidden(uint64_t id);
// The child layer tree is visible. id is the layers id of the child
// layer tree.
async NotifyVisible(uint64_t id);
async NotifyChildCreated(uint64_t id);
async AdoptChild(uint64_t id);
// Make a snapshot of the content that would have been drawn to our
// render target at the time this message is received. If the size
// or format of |inSnapshot| doesn't match our render target,
// results are undefined.
//
// NB: this message will result in animations, transforms, effects,
// and so forth being interpolated. That's what we want to happen.
sync MakeSnapshot(SurfaceDescriptor inSnapshot, IntRect dirtyRect);
// Make sure any pending composites are started immediately and
// block until they are completed.
sync FlushRendering();
// Force an additional frame presentation to be executed. This is used to
// work around a windows presentation bug (See Bug 1232042)
async ForcePresent();
// Get the size of the tiles. This number should not change at runtime.
sync GetTileSize()
returns (int32_t tileWidth, int32_t tileHeight);
sync StartFrameTimeRecording(int32_t bufferSize)
returns (uint32_t startIndex);
sync StopFrameTimeRecording(uint32_t startIndex)
returns (float[] intervals);
// layersBackendHints is an ordered list of preffered backends where
// layersBackendHints[0] is the best backend. If any hints are LayersBackend::LAYERS_NONE
// that hint is ignored.
sync PLayerTransaction(LayersBackend[] layersBackendHints, uint64_t id)
returns (TextureFactoryIdentifier textureFactoryIdentifier, bool success);
// Notify the compositor that a region of the screen has been invalidated.
async NotifyRegionInvalidated(nsIntRegion region);
/**
* The child (content/chrome thread) requests that the parent inform it when
* the graphics objects are ready to display.
* @see PBrowser
* @see RemotePaintIsReady
*/
async RequestNotifyAfterRemotePaint();
// The child clears the 'approximately visible' regions associated with the
// provided layers ID and pres shell ID (i.e., the regions for all view IDs
// associated with those IDs).
async ClearApproximatelyVisibleRegions(uint64_t layersId, uint32_t presShellId);
// The child sends a region containing rects associated with the provided
// scrollable layer GUID that the child considers 'approximately visible'.
// We visualize this information in the APZ minimap.
async NotifyApproximatelyVisibleRegion(ScrollableLayerGuid guid, CSSIntRegion region);
child:
// Send back Compositor Frame Metrics from APZCs so tiled layers can
// update progressively.
async SharedCompositorFrameMetrics(Handle metrics, CrossProcessMutexHandle mutex, uint64_t aLayersId, uint32_t aAPZCId);
async ReleaseSharedCompositorFrameMetrics(ViewID aId, uint32_t aAPZCId);
};
} // layers
} // mozilla