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_delegate_share_group.h
" | 5 #include "gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.h
" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 388 |
389 void AsyncPixelTransferDelegateShareGroup::WaitForTransferCompletion( | 389 void AsyncPixelTransferDelegateShareGroup::WaitForTransferCompletion( |
390 AsyncPixelTransferState* transfer_state) { | 390 AsyncPixelTransferState* transfer_state) { |
391 scoped_refptr<TransferStateInternal> state = | 391 scoped_refptr<TransferStateInternal> state = |
392 static_cast<AsyncTransferStateImpl*>(transfer_state)->internal(); | 392 static_cast<AsyncTransferStateImpl*>(transfer_state)->internal(); |
393 DCHECK(state); | 393 DCHECK(state); |
394 DCHECK(state->texture_id()); | 394 DCHECK(state->texture_id()); |
395 | 395 |
396 if (state->TransferIsInProgress()) { | 396 if (state->TransferIsInProgress()) { |
397 #if defined(OS_ANDROID) || defined(OS_LINUX) | 397 #if defined(OS_ANDROID) || defined(OS_LINUX) |
398 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Normal); | 398 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Display); |
399 #endif | 399 #endif |
400 | 400 |
401 state->WaitForTransferCompletion(); | 401 state->WaitForTransferCompletion(); |
402 DCHECK(!state->TransferIsInProgress()); | 402 DCHECK(!state->TransferIsInProgress()); |
403 | 403 |
404 #if defined(OS_ANDROID) || defined(OS_LINUX) | 404 #if defined(OS_ANDROID) || defined(OS_LINUX) |
405 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Background); | 405 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Background); |
406 #endif | 406 #endif |
407 } | 407 } |
408 } | 408 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 } | 495 } |
496 | 496 |
497 void AsyncPixelTransferDelegateShareGroup::ProcessMorePendingTransfers() { | 497 void AsyncPixelTransferDelegateShareGroup::ProcessMorePendingTransfers() { |
498 } | 498 } |
499 | 499 |
500 bool AsyncPixelTransferDelegateShareGroup::NeedsProcessMorePendingTransfers() { | 500 bool AsyncPixelTransferDelegateShareGroup::NeedsProcessMorePendingTransfers() { |
501 return false; | 501 return false; |
502 } | 502 } |
503 | 503 |
504 } // namespace gpu | 504 } // namespace gpu |
OLD | NEW |