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