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

Side by Side Diff: ui/gl/async_pixel_transfer_delegate_stub.cc

Issue 12210129: gpu: Add the ability to wait on upload completion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added entry point for waiting. Rebased and added test. Created 7 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/gl/async_pixel_transfer_delegate_stub.h" 5 #include "ui/gl/async_pixel_transfer_delegate_stub.h"
6 6
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 return static_cast<AsyncPixelTransferState*>( 75 return static_cast<AsyncPixelTransferState*>(
76 new AsyncTransferStateStub(texture_id)); 76 new AsyncTransferStateStub(texture_id));
77 } 77 }
78 78
79 void AsyncPixelTransferDelegateStub::AsyncNotifyCompletion( 79 void AsyncPixelTransferDelegateStub::AsyncNotifyCompletion(
80 const AsyncMemoryParams& mem_params, 80 const AsyncMemoryParams& mem_params,
81 const CompletionCallback& callback) { 81 const CompletionCallback& callback) {
82 callback.Run(mem_params); 82 callback.Run(mem_params);
83 } 83 }
84 84
85 void AsyncPixelTransferDelegateStub::WaitOnUploadCompletion() {
86 // Already done.
87 }
88
85 void AsyncPixelTransferDelegateStub::AsyncTexImage2D( 89 void AsyncPixelTransferDelegateStub::AsyncTexImage2D(
86 AsyncPixelTransferState* transfer_state, 90 AsyncPixelTransferState* transfer_state,
87 const AsyncTexImage2DParams& tex_params, 91 const AsyncTexImage2DParams& tex_params,
88 const AsyncMemoryParams& mem_params) { 92 const AsyncMemoryParams& mem_params) {
89 // Save the define params to return later during deferred 93 // Save the define params to return later during deferred
90 // binding of the transfer texture. 94 // binding of the transfer texture.
91 DCHECK(transfer_state); 95 DCHECK(transfer_state);
92 AsyncTransferStateStub* state = 96 AsyncTransferStateStub* state =
93 static_cast<AsyncTransferStateStub*>(transfer_state); 97 static_cast<AsyncTransferStateStub*>(transfer_state);
94 // We don't actually need a late bind since this stub does 98 // We don't actually need a late bind since this stub does
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 uint32 AsyncPixelTransferDelegateStub::GetTextureUploadCount() { 146 uint32 AsyncPixelTransferDelegateStub::GetTextureUploadCount() {
143 return texture_upload_count_; 147 return texture_upload_count_;
144 } 148 }
145 149
146 base::TimeDelta AsyncPixelTransferDelegateStub::GetTotalTextureUploadTime() { 150 base::TimeDelta AsyncPixelTransferDelegateStub::GetTotalTextureUploadTime() {
147 return total_texture_upload_time_; 151 return total_texture_upload_time_;
148 } 152 }
149 153
150 } // namespace gfx 154 } // namespace gfx
151 155
OLDNEW
« gpu/command_buffer/service/gles2_cmd_decoder.cc ('K') | « ui/gl/async_pixel_transfer_delegate_stub.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698