Пример #1
0
/* static */ bool
OffscreenCanvas::PrefEnabled(JSContext* aCx, JSObject* aObj)
{
    if (NS_IsMainThread()) {
        return Preferences::GetBool("gfx.offscreencanvas.enabled");
    } else {
        WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(aCx);
        MOZ_ASSERT(workerPrivate);
        return workerPrivate->OffscreenCanvasEnabled();
    }
}