OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_manager_sync.h" | 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager_sync.h" |
6 | 6 |
7 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h" | 7 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h" |
8 | 8 |
9 namespace gpu { | 9 namespace gpu { |
10 | 10 |
11 // Class which handles async pixel transfers synchronously. | 11 // Class which handles async pixel transfers synchronously. |
12 class AsyncPixelTransferDelegateSync : public AsyncPixelTransferDelegate { | 12 class AsyncPixelTransferDelegateSync : public AsyncPixelTransferDelegate { |
13 public: | 13 public: |
14 explicit AsyncPixelTransferDelegateSync( | 14 explicit AsyncPixelTransferDelegateSync( |
15 AsyncPixelTransferManagerSync::SharedState* shared_state); | 15 AsyncPixelTransferManagerSync::SharedState* shared_state); |
16 virtual ~AsyncPixelTransferDelegateSync(); | 16 virtual ~AsyncPixelTransferDelegateSync(); |
17 | 17 |
18 // Implement AsyncPixelTransferDelegate: | 18 // Implement AsyncPixelTransferDelegate: |
19 virtual void AsyncTexImage2D( | 19 virtual void AsyncTexImage2D( |
20 const AsyncTexImage2DParams& tex_params, | 20 const AsyncTexImage2DParams& tex_params, |
21 const AsyncMemoryParams& mem_params, | 21 const AsyncMemoryParams& mem_params, |
22 const base::Closure& bind_callback) OVERRIDE; | 22 const base::Closure& bind_callback) override; |
23 virtual void AsyncTexSubImage2D( | 23 virtual void AsyncTexSubImage2D( |
24 const AsyncTexSubImage2DParams& tex_params, | 24 const AsyncTexSubImage2DParams& tex_params, |
25 const AsyncMemoryParams& mem_params) OVERRIDE; | 25 const AsyncMemoryParams& mem_params) override; |
26 virtual bool TransferIsInProgress() OVERRIDE; | 26 virtual bool TransferIsInProgress() override; |
27 virtual void WaitForTransferCompletion() OVERRIDE; | 27 virtual void WaitForTransferCompletion() override; |
28 | 28 |
29 private: | 29 private: |
30 // Safe to hold a raw pointer because SharedState is owned by the Manager | 30 // Safe to hold a raw pointer because SharedState is owned by the Manager |
31 // which owns the Delegate. | 31 // which owns the Delegate. |
32 AsyncPixelTransferManagerSync::SharedState* shared_state_; | 32 AsyncPixelTransferManagerSync::SharedState* shared_state_; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateSync); | 34 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateSync); |
35 }; | 35 }; |
36 | 36 |
37 AsyncPixelTransferDelegateSync::AsyncPixelTransferDelegateSync( | 37 AsyncPixelTransferDelegateSync::AsyncPixelTransferDelegateSync( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 132 } |
133 | 133 |
134 AsyncPixelTransferDelegate* | 134 AsyncPixelTransferDelegate* |
135 AsyncPixelTransferManagerSync::CreatePixelTransferDelegateImpl( | 135 AsyncPixelTransferManagerSync::CreatePixelTransferDelegateImpl( |
136 gles2::TextureRef* ref, | 136 gles2::TextureRef* ref, |
137 const AsyncTexImage2DParams& define_params) { | 137 const AsyncTexImage2DParams& define_params) { |
138 return new AsyncPixelTransferDelegateSync(&shared_state_); | 138 return new AsyncPixelTransferDelegateSync(&shared_state_); |
139 } | 139 } |
140 | 140 |
141 } // namespace gpu | 141 } // namespace gpu |
OLD | NEW |