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

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc

Issue 1051863003: Turn ThreadPriority enum into an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setthreadpri
Patch Set: nits Created 5 years, 8 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 #include "gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h" 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager_share_group.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 29 matching lines...) Expand all
40 40
41 // TODO(backer): Factor out common thread scheduling logic from the EGL and 41 // TODO(backer): Factor out common thread scheduling logic from the EGL and
42 // ShareGroup implementations. http://crbug.com/239889 42 // ShareGroup implementations. http://crbug.com/239889
43 class TransferThread : public base::Thread { 43 class TransferThread : public base::Thread {
44 public: 44 public:
45 TransferThread() 45 TransferThread()
46 : base::Thread(kAsyncTransferThreadName), 46 : base::Thread(kAsyncTransferThreadName),
47 initialized_(false) { 47 initialized_(false) {
48 Start(); 48 Start();
49 #if defined(OS_ANDROID) || defined(OS_LINUX) 49 #if defined(OS_ANDROID) || defined(OS_LINUX)
50 SetPriority(base::kThreadPriority_Background); 50 SetPriority(base::ThreadPriority::BACKGROUND);
51 #endif 51 #endif
52 } 52 }
53 53
54 ~TransferThread() override { 54 ~TransferThread() override {
55 // The only instance of this class was declared leaky. 55 // The only instance of this class was declared leaky.
56 NOTREACHED(); 56 NOTREACHED();
57 } 57 }
58 58
59 void InitializeOnMainThread(gfx::GLContext* parent_context) { 59 void InitializeOnMainThread(gfx::GLContext* parent_context) {
60 TRACE_EVENT0("gpu", "TransferThread::InitializeOnMainThread"); 60 TRACE_EVENT0("gpu", "TransferThread::InitializeOnMainThread");
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 542
543 AsyncPixelTransferDelegate* 543 AsyncPixelTransferDelegate*
544 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl( 544 AsyncPixelTransferManagerShareGroup::CreatePixelTransferDelegateImpl(
545 gles2::TextureRef* ref, 545 gles2::TextureRef* ref,
546 const AsyncTexImage2DParams& define_params) { 546 const AsyncTexImage2DParams& define_params) {
547 return new AsyncPixelTransferDelegateShareGroup( 547 return new AsyncPixelTransferDelegateShareGroup(
548 &shared_state_, ref->service_id(), define_params); 548 &shared_state_, ref->service_id(), define_params);
549 } 549 }
550 550
551 } // namespace gpu 551 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc ('k') | media/audio/audio_device_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698