OLD | NEW |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 AsyncPixelTransferState* | 72 AsyncPixelTransferState* |
73 AsyncPixelTransferDelegateStub::CreateRawPixelTransferState( | 73 AsyncPixelTransferDelegateStub::CreateRawPixelTransferState( |
74 GLuint texture_id) { | 74 GLuint texture_id) { |
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 base::Closure& task) { | 80 const AsyncMemoryParams& mem_params, |
81 task.Run(); | 81 const CompletionCallback& callback) { |
| 82 callback.Run(mem_params); |
82 } | 83 } |
83 | 84 |
84 void AsyncPixelTransferDelegateStub::AsyncTexImage2D( | 85 void AsyncPixelTransferDelegateStub::AsyncTexImage2D( |
85 AsyncPixelTransferState* transfer_state, | 86 AsyncPixelTransferState* transfer_state, |
86 const AsyncTexImage2DParams& tex_params, | 87 const AsyncTexImage2DParams& tex_params, |
87 const AsyncMemoryParams& mem_params) { | 88 const AsyncMemoryParams& mem_params) { |
88 // Save the define params to return later during deferred | 89 // Save the define params to return later during deferred |
89 // binding of the transfer texture. | 90 // binding of the transfer texture. |
90 DCHECK(transfer_state); | 91 DCHECK(transfer_state); |
91 AsyncTransferStateStub* state = | 92 AsyncTransferStateStub* state = |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 uint32 AsyncPixelTransferDelegateStub::GetTextureUploadCount() { | 142 uint32 AsyncPixelTransferDelegateStub::GetTextureUploadCount() { |
142 return texture_upload_count_; | 143 return texture_upload_count_; |
143 } | 144 } |
144 | 145 |
145 base::TimeDelta AsyncPixelTransferDelegateStub::GetTotalTextureUploadTime() { | 146 base::TimeDelta AsyncPixelTransferDelegateStub::GetTotalTextureUploadTime() { |
146 return total_texture_upload_time_; | 147 return total_texture_upload_time_; |
147 } | 148 } |
148 | 149 |
149 } // namespace gfx | 150 } // namespace gfx |
150 | 151 |
OLD | NEW |