gecko-dev/dom/canvas/Queue.cpp
David Parks 180f310d81 Bug 1621762: Part 6 - Add and define IpdlQueue for WebGL IPC r=jgilbert
The IpdlQueue (de)serializes types into arrays that are then passed to another process via IPDL messages.  This means much less bloat than generating IPDL routines for each of the commands we send with WebGL.  This IPDL queue is fairly basic -- it simply sends "async" commands through an async IPDL message and sync commands through a sync message.  Future extensions, such as a facility for buffering async messages to be sent in bulk, are planned.
The IpdlQueue uses an existing actor to send messages.  That actor should derive from one of the provided base classes and implement any needed IPDL message.  For example, if the actor is used as the comsumer for sync messages then it should subclass SyncConsumerActor and should Recv (via IPDL) the ExchangeIpdlQueueData message -- the handler method for which is defined in the SyncProducerActor base class.

Differential Revision: https://phabricator.services.mozilla.com/D68263
2020-04-30 22:24:00 +00:00

16 lines
499 B
C++

/* -*- Mode: C++; tab-width: 20; 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 "ProducerConsumerQueue.h"
namespace mozilla {
namespace webgl {
mozilla::LazyLogModule gPCQLog("pcq");
mozilla::LazyLogModule gIpdlQueueLog("ipdlqueue");
} // namespace webgl
} // namespace mozilla