chromium/third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_util.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_util.h"

#include "base/memory/raw_ptr.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/renderer/platform/heap/cross_thread_handle.h"
#include "third_party/blink/renderer/platform/scheduler/public/main_thread.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_std.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/wtf.h"

namespace blink {

// Define a function that is allowed to access MainThreadTaskRunnerRestricted.
MainThreadTaskRunnerRestricted
AccessMainThreadForWebGraphicsContext3DProvider() {}

namespace {

struct ContextProviderCreationInfo {};

void CreateOffscreenGraphicsContextOnMainThread(
    ContextProviderCreationInfo* creation_info,
    base::WaitableEvent* waitable_event) {}

void CreateWebGPUGraphicsContextOnMainThreadAsync(
    KURL url,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner,
    CrossThreadOnceFunction<void(std::unique_ptr<WebGraphicsContext3DProvider>)>
        callback) {}

}  // namespace

std::unique_ptr<WebGraphicsContext3DProvider>
CreateOffscreenGraphicsContext3DProvider(
    Platform::ContextAttributes context_attributes,
    Platform::GraphicsInfo* gl_info,
    const KURL& url) {}

void CreateWebGPUGraphicsContext3DProviderAsync(
    const KURL& url,
    scoped_refptr<base::SingleThreadTaskRunner> current_thread_task_runner,
    WTF::CrossThreadOnceFunction<
        void(std::unique_ptr<WebGraphicsContext3DProvider>)> callback) {}

}  // namespace blink