Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: media/gpu/ipc/service/gpu_video_encode_accelerator.h

Issue 2849443003: Fix errors in destruction sequence of GpuVideoEncodeAccelerator::OnWillDestroyStub() (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_ENCODE_ACCELERATOR_H_
6 #define MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // GPU IO thread task runner. 154 // GPU IO thread task runner.
155 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 155 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
156 156
157 // Task runner used for posting encode tasks. If 157 // Task runner used for posting encode tasks. If
158 // TryToSetupEncodeOnSeperateThread() is true, |io_task_runner_| is used, 158 // TryToSetupEncodeOnSeperateThread() is true, |io_task_runner_| is used,
159 // otherwise |main_thread_task_runner_|. 159 // otherwise |main_thread_task_runner_|.
160 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_; 160 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_;
161 161
162 // Weak pointer for referring back to |this| on |encoder_worker_task_runner_|. 162 // Weak pointer for referring back to |this| on |encoder_worker_task_runner_|.
163 base::WeakPtr<GpuVideoEncodeAccelerator> weak_this_for_encoder_worker_;
163 base::WeakPtrFactory<GpuVideoEncodeAccelerator> 164 base::WeakPtrFactory<GpuVideoEncodeAccelerator>
164 weak_this_factory_for_encoder_worker_; 165 weak_this_factory_for_encoder_worker_;
165 166
166 // Weak pointer for VideoFrames that refer back to |this| on 167 // Weak pointer for VideoFrames that refer back to |this| on
167 // |main_task_runner| or |io_task_runner_|. 168 // |main_task_runner| or |io_task_runner_|.
169 base::WeakPtr<GpuVideoEncodeAccelerator> weak_this_;
168 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; 170 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_;
169 171
170 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); 172 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator);
171 }; 173 };
172 174
173 } // namespace media 175 } // namespace media
174 176
175 #endif // MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_ENCODE_ACCELERATOR_H_ 177 #endif // MEDIA_GPU_IPC_SERVICE_GPU_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698