OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |