OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_egl.h" | 5 #include "gpu/command_buffer/service/async_pixel_transfer_delegate_egl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 491 |
492 void AsyncPixelTransferDelegateEGL::WaitForTransferCompletion( | 492 void AsyncPixelTransferDelegateEGL::WaitForTransferCompletion( |
493 AsyncPixelTransferState* transfer_state) { | 493 AsyncPixelTransferState* transfer_state) { |
494 scoped_refptr<TransferStateInternal> state = | 494 scoped_refptr<TransferStateInternal> state = |
495 static_cast<AsyncTransferStateImpl*>(transfer_state)->internal_.get(); | 495 static_cast<AsyncTransferStateImpl*>(transfer_state)->internal_.get(); |
496 DCHECK(state); | 496 DCHECK(state); |
497 DCHECK(state->texture_id_); | 497 DCHECK(state->texture_id_); |
498 | 498 |
499 if (state->TransferIsInProgress()) { | 499 if (state->TransferIsInProgress()) { |
500 #if defined(OS_ANDROID) || defined(OS_LINUX) | 500 #if defined(OS_ANDROID) || defined(OS_LINUX) |
501 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Normal); | 501 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Display); |
502 #endif | 502 #endif |
503 | 503 |
504 state->WaitForTransferCompletion(); | 504 state->WaitForTransferCompletion(); |
505 DCHECK(!state->TransferIsInProgress()); | 505 DCHECK(!state->TransferIsInProgress()); |
506 | 506 |
507 #if defined(OS_ANDROID) || defined(OS_LINUX) | 507 #if defined(OS_ANDROID) || defined(OS_LINUX) |
508 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Background); | 508 g_transfer_thread.Pointer()->SetPriority(base::kThreadPriority_Background); |
509 #endif | 509 #endif |
510 } | 510 } |
511 } | 511 } |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 if (texture_upload_stats_) { | 740 if (texture_upload_stats_) { |
741 texture_upload_stats_->AddUpload( | 741 texture_upload_stats_->AddUpload( |
742 base::TimeTicks::HighResNow() - begin_time); | 742 base::TimeTicks::HighResNow() - begin_time); |
743 } | 743 } |
744 | 744 |
745 DCHECK(CHECK_GL()); | 745 DCHECK(CHECK_GL()); |
746 return true; | 746 return true; |
747 } | 747 } |
748 | 748 |
749 } // namespace gpu | 749 } // namespace gpu |
OLD | NEW |