/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
class Decoder; class DecodePoolImpl; class IDecodingTask;
/** *DecodePoolisasingletonclassthatmanagesdecodingofrasterimages.It *ownsapoolofimagedecodingthreadsthatareusedforasynchronous *decoding. * *DecodePoolallowscallerstorunadecoder,handlingmanagementofthe *decoder'slifecycleandwhetheritexecutesonthemainthread, *off-main-threadintheimagedecodingthreadpool,oronsomecombinationof *thetwo.
*/ class DecodePool final : public nsIObserver { public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIOBSERVER
/// Initializes the singleton instance. Should be called from the main thread. staticvoid Initialize();
/// Returns the singleton instance. static DecodePool* Singleton();
/// @return the number of processor cores we have available. This is not the /// same as the number of decoding threads we're actually using. static uint32_t NumberOfCores();
/// True if the DecodePool is being shutdown. This may only be called by /// threads from the pool to check if they should keep working or not. staticbool IsShuttingDown();
/// Ask the DecodePool to run @aTask asynchronously and return immediately. void AsyncRun(IDecodingTask* aTask);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.