Skip to content

Commit acde6a7

Browse files
kylecharCommit Bot
kylechar
authored and
Commit Bot
committed
Remove RefCountedThreadSafe from CommandBufferTaskExecutor.
CommandBufferTaskExecutor needs to be created and destroyed on the GPU thread. To ensure it's destroyed on the GPU thread we hold onto a scoped_refptr there and destroy it last. Owning the object there and passing around a raw pointer accomplishes the same thing with less complexity. Bug: none Change-Id: I7c2d4f22044d28799c04144729c03d273abe7592 Reviewed-on: https://chromium-review.googlesource.com/c/1340907 Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#609557}
1 parent a8f4b17 commit acde6a7

26 files changed

+63
-89
lines changed

android_webview/browser/aw_render_thread_context_provider.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ namespace android_webview {
2828
scoped_refptr<AwRenderThreadContextProvider>
2929
AwRenderThreadContextProvider::Create(
3030
scoped_refptr<gl::GLSurface> surface,
31-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor) {
32-
return new AwRenderThreadContextProvider(surface, std::move(task_executor));
31+
gpu::CommandBufferTaskExecutor* task_executor) {
32+
return new AwRenderThreadContextProvider(surface, task_executor);
3333
}
3434

3535
AwRenderThreadContextProvider::AwRenderThreadContextProvider(
3636
scoped_refptr<gl::GLSurface> surface,
37-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor) {
37+
gpu::CommandBufferTaskExecutor* task_executor) {
3838
DCHECK(main_thread_checker_.CalledOnValidThread());
3939

4040
// This is an onscreen context, wrapping the GLSurface given to us from
@@ -66,9 +66,9 @@ AwRenderThreadContextProvider::AwRenderThreadContextProvider(
6666
limits.min_transfer_buffer_size = 64 * 1024;
6767

6868
context_ = std::make_unique<gpu::GLInProcessContext>();
69-
context_->Initialize(std::move(task_executor), surface,
70-
surface->IsOffscreen(), gpu::kNullSurfaceHandle,
71-
attributes, limits, nullptr, nullptr, nullptr);
69+
context_->Initialize(task_executor, surface, surface->IsOffscreen(),
70+
gpu::kNullSurfaceHandle, attributes, limits, nullptr,
71+
nullptr, nullptr);
7272

7373
context_->GetImplementation()->SetLostContextCallback(base::BindOnce(
7474
&AwRenderThreadContextProvider::OnLostContext, base::Unretained(this)));

android_webview/browser/aw_render_thread_context_provider.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class AwRenderThreadContextProvider
3636
public:
3737
static scoped_refptr<AwRenderThreadContextProvider> Create(
3838
scoped_refptr<gl::GLSurface> surface,
39-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor);
39+
gpu::CommandBufferTaskExecutor* task_executor);
4040

4141
// Gives the GL internal format that should be used for calling CopyTexImage2D
4242
// on the default framebuffer.
@@ -60,9 +60,8 @@ class AwRenderThreadContextProvider
6060
protected:
6161
friend class base::RefCountedThreadSafe<AwRenderThreadContextProvider>;
6262

63-
AwRenderThreadContextProvider(
64-
scoped_refptr<gl::GLSurface> surface,
65-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor);
63+
AwRenderThreadContextProvider(scoped_refptr<gl::GLSurface> surface,
64+
gpu::CommandBufferTaskExecutor* task_executor);
6665
~AwRenderThreadContextProvider() override;
6766

6867
private:

android_webview/browser/deferred_gpu_command_service.cc

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "android_webview/browser/render_thread_manager.h"
99
#include "base/command_line.h"
1010
#include "base/lazy_instance.h"
11-
#include "base/no_destructor.h"
1211
#include "base/strings/string_number_conversions.h"
1312
#include "base/synchronization/lock.h"
1413
#include "base/trace_event/trace_event.h"
@@ -146,9 +145,8 @@ DeferredGpuCommandService::CreateDeferredGpuCommandService() {
146145

147146
// static
148147
DeferredGpuCommandService* DeferredGpuCommandService::GetInstance() {
149-
static base::NoDestructor<scoped_refptr<DeferredGpuCommandService>> service(
150-
CreateDeferredGpuCommandService());
151-
return service->get();
148+
static DeferredGpuCommandService* service = CreateDeferredGpuCommandService();
149+
return service;
152150
}
153151

154152
DeferredGpuCommandService::DeferredGpuCommandService(

android_webview/browser/deferred_gpu_command_service.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class DeferredGpuCommandService : public gpu::CommandBufferTaskExecutor {
4646
public:
4747
static DeferredGpuCommandService* GetInstance();
4848

49+
~DeferredGpuCommandService() override;
50+
4951
// gpu::CommandBufferTaskExecutor implementation.
5052
bool ForceVirtualizedGLContexts() const override;
5153
bool ShouldCreateMemoryTracker() const override;
@@ -67,9 +69,6 @@ class DeferredGpuCommandService : public gpu::CommandBufferTaskExecutor {
6769
// idle tasks during the idle run.
6870
void PerformAllIdleWork();
6971

70-
protected:
71-
~DeferredGpuCommandService() override;
72-
7372
private:
7473
friend class ScopedAllowGL;
7574
friend class TaskForwardingSequence;

cc/test/pixel_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void PixelTest::SetUpGpuServiceOnGpuThread(base::WaitableEvent* event) {
269269
std::move(gpu_host_proxy), gpu::GpuProcessActivityFlags(),
270270
gl::init::CreateOffscreenGLSurface(gfx::Size()),
271271
nullptr /* sync_point_manager */, nullptr /* shutdown_event */);
272-
task_executor_ = base::MakeRefCounted<gpu::GpuInProcessThreadService>(
272+
task_executor_ = std::make_unique<gpu::GpuInProcessThreadService>(
273273
gpu_thread_->task_runner(), gpu_service_->scheduler(),
274274
gpu_service_->sync_point_manager(), gpu_service_->mailbox_manager(),
275275
gpu_service_->share_group(),
@@ -326,7 +326,7 @@ void PixelTest::SetUpSkiaRendererDDL() {
326326
gpu_service_->gpu_channel_manager()->delegate();
327327
child_context_provider_ =
328328
base::MakeRefCounted<viz::VizProcessContextProvider>(
329-
task_executor_, gpu::kNullSurfaceHandle,
329+
task_executor_.get(), gpu::kNullSurfaceHandle,
330330
gpu_memory_buffer_manager_.get(), image_factory,
331331
gpu_channel_manager_delegate, gpu::SharedMemoryLimits(),
332332
false /* requires_alpha_channel */);

cc/test/pixel_test.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class PixelTest : public testing::Test {
8686
std::unique_ptr<base::Thread> io_thread_;
8787
std::unique_ptr<viz::GpuServiceImpl> gpu_service_;
8888
std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager_;
89-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor_;
89+
std::unique_ptr<gpu::CommandBufferTaskExecutor> task_executor_;
9090

9191
viz::RendererSettings renderer_settings_;
9292
gfx::Size device_viewport_size_;

components/viz/service/display_embedder/gpu_display_provider.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace viz {
6464
GpuDisplayProvider::GpuDisplayProvider(
6565
uint32_t restart_id,
6666
GpuServiceImpl* gpu_service_impl,
67-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
67+
gpu::CommandBufferTaskExecutor* task_executor,
6868
gpu::GpuChannelManagerDelegate* gpu_channel_manager_delegate,
6969
std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager,
7070
gpu::ImageFactory* image_factory,
@@ -73,7 +73,7 @@ GpuDisplayProvider::GpuDisplayProvider(
7373
bool wait_for_all_pipeline_stages_before_draw)
7474
: restart_id_(restart_id),
7575
gpu_service_impl_(gpu_service_impl),
76-
task_executor_(std::move(task_executor)),
76+
task_executor_(task_executor),
7777
gpu_channel_manager_delegate_(gpu_channel_manager_delegate),
7878
gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)),
7979
image_factory_(image_factory),

components/viz/service/display_embedder/gpu_display_provider.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class VIZ_SERVICE_EXPORT GpuDisplayProvider : public DisplayProvider {
4242
GpuDisplayProvider(
4343
uint32_t restart_id,
4444
GpuServiceImpl* gpu_service_impl,
45-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
45+
gpu::CommandBufferTaskExecutor* task_executor,
4646
gpu::GpuChannelManagerDelegate* gpu_channel_manager_delegate,
4747
std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager,
4848
gpu::ImageFactory* image_factory,
@@ -75,7 +75,7 @@ class VIZ_SERVICE_EXPORT GpuDisplayProvider : public DisplayProvider {
7575

7676
const uint32_t restart_id_;
7777
GpuServiceImpl* const gpu_service_impl_;
78-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor_;
78+
gpu::CommandBufferTaskExecutor* const task_executor_;
7979
gpu::GpuChannelManagerDelegate* const gpu_channel_manager_delegate_;
8080
std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager_;
8181
gpu::ImageFactory* const image_factory_;

components/viz/service/display_embedder/viz_process_context_provider.cc

+5-6
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,16 @@ void UmaRecordContextLost(ContextLostReason reason) {
8787
} // namespace
8888

8989
VizProcessContextProvider::VizProcessContextProvider(
90-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
90+
gpu::CommandBufferTaskExecutor* task_executor,
9191
gpu::SurfaceHandle surface_handle,
9292
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
9393
gpu::ImageFactory* image_factory,
9494
gpu::GpuChannelManagerDelegate* gpu_channel_manager_delegate,
9595
const gpu::SharedMemoryLimits& limits,
9696
bool requires_alpha_channel)
9797
: attributes_(CreateAttributes(requires_alpha_channel)) {
98-
InitializeContext(std::move(task_executor), surface_handle,
99-
gpu_memory_buffer_manager, image_factory,
100-
gpu_channel_manager_delegate, limits);
98+
InitializeContext(task_executor, surface_handle, gpu_memory_buffer_manager,
99+
image_factory, gpu_channel_manager_delegate, limits);
101100

102101
if (context_result_ == gpu::ContextResult::kSuccess) {
103102
// |gles2_implementation_| is owned here so bind an unretained pointer or
@@ -201,7 +200,7 @@ uint32_t VizProcessContextProvider::GetCopyTextureInternalFormat() {
201200
}
202201

203202
void VizProcessContextProvider::InitializeContext(
204-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
203+
gpu::CommandBufferTaskExecutor* task_executor,
205204
gpu::SurfaceHandle surface_handle,
206205
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
207206
gpu::ImageFactory* image_factory,
@@ -210,7 +209,7 @@ void VizProcessContextProvider::InitializeContext(
210209
const bool is_offscreen = surface_handle == gpu::kNullSurfaceHandle;
211210

212211
command_buffer_ =
213-
std::make_unique<gpu::InProcessCommandBuffer>(std::move(task_executor));
212+
std::make_unique<gpu::InProcessCommandBuffer>(task_executor);
214213
context_result_ = command_buffer_->Initialize(
215214
/*surface=*/nullptr, is_offscreen, surface_handle, attributes_,
216215
/*share_command_buffer=*/nullptr, gpu_memory_buffer_manager,

components/viz/service/display_embedder/viz_process_context_provider.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class VIZ_SERVICE_EXPORT VizProcessContextProvider
4747
public base::trace_event::MemoryDumpProvider {
4848
public:
4949
VizProcessContextProvider(
50-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
50+
gpu::CommandBufferTaskExecutor* task_executor,
5151
gpu::SurfaceHandle surface_handle,
5252
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
5353
gpu::ImageFactory* image_factory,
@@ -84,7 +84,7 @@ class VIZ_SERVICE_EXPORT VizProcessContextProvider
8484
~VizProcessContextProvider() override;
8585

8686
void InitializeContext(
87-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
87+
gpu::CommandBufferTaskExecutor* task_executor,
8888
gpu::SurfaceHandle surface_handle,
8989
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
9090
gpu::ImageFactory* image_factory,

components/viz/service/main/viz_compositor_thread_runner.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ void VizCompositorThreadRunner::CreateFrameSinkManager(
8282

8383
void VizCompositorThreadRunner::CreateFrameSinkManager(
8484
mojom::FrameSinkManagerParamsPtr params,
85-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
85+
gpu::CommandBufferTaskExecutor* task_executor,
8686
GpuServiceImpl* gpu_service) {
8787
// All of the unretained objects are owned on the GPU thread and destroyed
8888
// after VizCompositorThread has been shutdown.
8989
task_runner_->PostTask(
9090
FROM_HERE,
9191
base::BindOnce(
9292
&VizCompositorThreadRunner::CreateFrameSinkManagerOnCompositorThread,
93-
base::Unretained(this), std::move(params), std::move(task_executor),
94-
base::Unretained(gpu_service)));
93+
base::Unretained(this), std::move(params),
94+
base::Unretained(task_executor), base::Unretained(gpu_service)));
9595
}
9696

9797
#if defined(USE_VIZ_DEVTOOLS)
@@ -119,7 +119,7 @@ void VizCompositorThreadRunner::CleanupForShutdown(
119119

120120
void VizCompositorThreadRunner::CreateFrameSinkManagerOnCompositorThread(
121121
mojom::FrameSinkManagerParamsPtr params,
122-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
122+
gpu::CommandBufferTaskExecutor* task_executor,
123123
GpuServiceImpl* gpu_service) {
124124
DCHECK(task_runner_->BelongsToCurrentThread());
125125
DCHECK(!frame_sink_manager_);
@@ -143,7 +143,7 @@ void VizCompositorThreadRunner::CreateFrameSinkManagerOnCompositorThread(
143143
gpu_service->sync_point_manager());
144144
auto* image_factory = gpu_service->gpu_image_factory();
145145
display_provider_ = std::make_unique<GpuDisplayProvider>(
146-
params->restart_id, gpu_service, std::move(task_executor), gpu_service,
146+
params->restart_id, gpu_service, task_executor, gpu_service,
147147
std::move(gpu_memory_buffer_manager), image_factory,
148148
server_shared_bitmap_manager_.get(), headless,
149149
run_all_compositor_stages_before_draw);

components/viz/service/main/viz_compositor_thread_runner.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ class VizCompositorThreadRunner {
6060
// version without supports only software compositing. Should be called from
6161
// the thread that owns |this| to initialize state on VizCompositorThread.
6262
void CreateFrameSinkManager(mojom::FrameSinkManagerParamsPtr params);
63-
void CreateFrameSinkManager(
64-
mojom::FrameSinkManagerParamsPtr params,
65-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
66-
GpuServiceImpl* gpu_service);
63+
void CreateFrameSinkManager(mojom::FrameSinkManagerParamsPtr params,
64+
gpu::CommandBufferTaskExecutor* task_executor,
65+
GpuServiceImpl* gpu_service);
6766

6867
#if defined(USE_VIZ_DEVTOOLS)
6968
void CreateVizDevTools(mojom::VizDevToolsParamsPtr params);
@@ -83,7 +82,7 @@ class VizCompositorThreadRunner {
8382
private:
8483
void CreateFrameSinkManagerOnCompositorThread(
8584
mojom::FrameSinkManagerParamsPtr params,
86-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor,
85+
gpu::CommandBufferTaskExecutor* task_executor,
8786
GpuServiceImpl* gpu_service);
8887
#if defined(USE_VIZ_DEVTOOLS)
8988
void CreateVizDevToolsOnCompositorThread(mojom::VizDevToolsParamsPtr params);

components/viz/service/main/viz_main_impl.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,14 @@ void VizMainImpl::CreateFrameSinkManagerInternal(
261261
DCHECK_EQ(gl::GetGLImplementation(), gl::kGLImplementationDisabled);
262262
}
263263

264-
task_executor_ = base::MakeRefCounted<gpu::GpuInProcessThreadService>(
264+
task_executor_ = std::make_unique<gpu::GpuInProcessThreadService>(
265265
gpu_thread_task_runner_, gpu_service_->scheduler(),
266266
gpu_service_->sync_point_manager(), gpu_service_->mailbox_manager(),
267267
gpu_service_->share_group(), format, gpu_service_->gpu_feature_info(),
268268
gpu_service_->gpu_channel_manager()->gpu_preferences());
269269

270270
viz_compositor_thread_runner_->CreateFrameSinkManager(
271-
std::move(params), task_executor_, gpu_service_.get());
271+
std::move(params), task_executor_.get(), gpu_service_.get());
272272
}
273273

274274
void VizMainImpl::CreateVizDevTools(mojom::VizDevToolsParamsPtr params) {

components/viz/service/main/viz_main_impl.h

+2-9
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,8 @@ class VizMainImpl : public gpu::GpuSandboxHelper, public mojom::VizMain {
146146

147147
// This is created for OOP-D only. It allows the display compositor to use
148148
// InProcessCommandBuffer to send GPU commands to the GPU thread from the
149-
// compositor thread.
150-
// TODO(kylechar): The only reason this member variable exists is so the last
151-
// reference is released and the object is destroyed on the GPU thread. This
152-
// works because |task_executor_| is destroyed after the VizCompositorThread
153-
// has been shutdown. All usage of CommandBufferTaskExecutor has the same
154-
// pattern, where the last scoped_refptr is released on the GPU thread after
155-
// all InProcessCommandBuffers are destroyed, so the class doesn't need to be
156-
// RefCountedThreadSafe.
157-
scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor_;
149+
// compositor thread. This must outlive |viz_compositor_thread_runner_|.
150+
std::unique_ptr<gpu::CommandBufferTaskExecutor> task_executor_;
158151

159152
// If the gpu service is not yet ready then we stash pending
160153
// FrameSinkManagerParams.

gpu/ipc/command_buffer_task_executor.h

+2-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include "base/callback.h"
1111
#include "base/macros.h"
12-
#include "base/memory/ref_counted.h"
1312
#include "gpu/command_buffer/common/activity_flags.h"
1413
#include "gpu/command_buffer/common/sync_token.h"
1514
#include "gpu/command_buffer/service/framebuffer_completeness_cache.h"
@@ -39,8 +38,7 @@ class ProgramCache;
3938

4039
// Provides accessors for GPU service objects and the serializer interface to
4140
// the GPU thread used by InProcessCommandBuffer.
42-
class GL_IN_PROCESS_CONTEXT_EXPORT CommandBufferTaskExecutor
43-
: public base::RefCountedThreadSafe<CommandBufferTaskExecutor> {
41+
class GL_IN_PROCESS_CONTEXT_EXPORT CommandBufferTaskExecutor {
4442
public:
4543
// Represents a single task execution sequence. Tasks posted to a sequence are
4644
// run in order. Tasks across sequences should be synchronized using sync
@@ -76,6 +74,7 @@ class GL_IN_PROCESS_CONTEXT_EXPORT CommandBufferTaskExecutor
7674
MailboxManager* mailbox_manager,
7775
scoped_refptr<gl::GLShareGroup> share_group,
7876
gl::GLSurfaceFormat share_group_surface_format);
77+
virtual ~CommandBufferTaskExecutor();
7978

8079
// Always use virtualized GL contexts if this returns true.
8180
virtual bool ForceVirtualizedGLContexts() const = 0;
@@ -126,11 +125,6 @@ class GL_IN_PROCESS_CONTEXT_EXPORT CommandBufferTaskExecutor
126125
gles2::Outputter* outputter();
127126
gles2::ProgramCache* program_cache();
128127

129-
protected:
130-
friend class base::RefCountedThreadSafe<CommandBufferTaskExecutor>;
131-
132-
virtual ~CommandBufferTaskExecutor();
133-
134128
private:
135129
const GpuPreferences gpu_preferences_;
136130
const GpuFeatureInfo gpu_feature_info_;

gpu/ipc/gl_in_process_context.cc

+2-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SharedImageInterface* GLInProcessContext::GetSharedImageInterface() {
5353
}
5454

5555
ContextResult GLInProcessContext::Initialize(
56-
scoped_refptr<CommandBufferTaskExecutor> task_executor,
56+
CommandBufferTaskExecutor* task_executor,
5757
scoped_refptr<gl::GLSurface> surface,
5858
bool is_offscreen,
5959
SurfaceHandle window,
@@ -72,8 +72,7 @@ ContextResult GLInProcessContext::Initialize(
7272
DCHECK_GE(attribs.offscreen_framebuffer_size.width(), 0);
7373
DCHECK_GE(attribs.offscreen_framebuffer_size.height(), 0);
7474

75-
command_buffer_ =
76-
std::make_unique<InProcessCommandBuffer>(std::move(task_executor));
75+
command_buffer_ = std::make_unique<InProcessCommandBuffer>(task_executor);
7776

7877
auto result = command_buffer_->Initialize(
7978
surface, is_offscreen, window, attribs, /*share_command_buffer=*/nullptr,

gpu/ipc/gl_in_process_context.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext {
4242
// not thread safe. If |surface| is null, then the other parameters are used
4343
// to correctly create a surface.
4444
ContextResult Initialize(
45-
scoped_refptr<CommandBufferTaskExecutor> task_executor,
45+
CommandBufferTaskExecutor* task_executor,
4646
scoped_refptr<gl::GLSurface> surface,
4747
bool is_offscreen,
4848
SurfaceHandle window,

gpu/ipc/gpu_in_process_thread_service.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class GL_IN_PROCESS_CONTEXT_EXPORT GpuInProcessThreadService
3131
gl::GLSurfaceFormat share_group_surface_format,
3232
const GpuFeatureInfo& gpu_feature_info,
3333
const GpuPreferences& gpu_preferences);
34+
~GpuInProcessThreadService() override;
3435

3536
// CommandBufferTaskExecutor implementation.
3637
bool ForceVirtualizedGLContexts() const override;
@@ -42,8 +43,6 @@ class GL_IN_PROCESS_CONTEXT_EXPORT GpuInProcessThreadService
4243
void ScheduleDelayedWork(base::OnceClosure task) override;
4344

4445
private:
45-
~GpuInProcessThreadService() override;
46-
4746
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
4847
Scheduler* scheduler_;
4948

0 commit comments

Comments
 (0)