0
Files
src/content/gpu/in_process_gpu_thread.h
Peter Boström 1d6a095400 Remove unused "base/macros.h" in content/
Removes `#include "base/macros.h"` from files in content/ that do not
contain `ignore_result(`.

Bug: 1010217
No-Try: true
Change-Id: I887403408704241047e3bd66e953ff7df195368b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3274993
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940781}
2021-11-11 16:07:03 +00:00

49 lines
1.4 KiB
C++

// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
#define CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_
#include "base/threading/thread.h"
#include "content/common/content_export.h"
#include "content/common/in_process_child_thread_params.h"
#include "gpu/config/gpu_preferences.h"
namespace content {
class GpuProcess;
// This class creates a GPU thread (instead of a GPU process), when running
// with --in-process-gpu or --single-process.
class InProcessGpuThread : public base::Thread {
public:
explicit InProcessGpuThread(const InProcessChildThreadParams& params,
const gpu::GpuPreferences& gpu_preferences);
InProcessGpuThread(const InProcessGpuThread&) = delete;
InProcessGpuThread& operator=(const InProcessGpuThread&) = delete;
~InProcessGpuThread() override;
protected:
void Init() override;
void CleanUp() override;
private:
InProcessChildThreadParams params_;
// Deleted in CleanUp() on the gpu thread, so don't use smart pointers.
GpuProcess* gpu_process_;
gpu::GpuPreferences gpu_preferences_;
};
CONTENT_EXPORT base::Thread* CreateInProcessGpuThread(
const InProcessChildThreadParams& params,
const gpu::GpuPreferences& gpu_preferences);
} // namespace content
#endif // CONTENT_GPU_IN_PROCESS_GPU_THREAD_H_