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

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

Issue 16035006: gpu: Increase thread priority for waited-on uploads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/async_pixel_transfer_delegate_share_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698