| 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ |
| 7 | 7 |
| 8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h" | 8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h" |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 | 11 |
| 12 namespace gpu { | 12 namespace gpu { |
| 13 class AsyncPixelTransferDelegateEGL; | 13 class AsyncPixelTransferDelegateEGL; |
| 14 class AsyncPixelTransferManagerCompressed; |
| 14 class AsyncPixelTransferUploadStats; | 15 class AsyncPixelTransferUploadStats; |
| 15 | 16 |
| 16 class AsyncPixelTransferManagerEGL : public AsyncPixelTransferManager { | 17 class AsyncPixelTransferManagerEGL : public AsyncPixelTransferManager { |
| 17 public: | 18 public: |
| 18 AsyncPixelTransferManagerEGL(); | 19 AsyncPixelTransferManagerEGL(); |
| 19 ~AsyncPixelTransferManagerEGL() override; | 20 ~AsyncPixelTransferManagerEGL() override; |
| 20 | 21 |
| 21 // AsyncPixelTransferManager implementation: | 22 // AsyncPixelTransferManager implementation: |
| 22 void BindCompletedAsyncTransfers() override; | 23 void BindCompletedAsyncTransfers() override; |
| 23 void AsyncNotifyCompletion( | 24 void AsyncNotifyCompletion( |
| (...skipping 12 matching lines...) Expand all Loading... |
| 36 | 37 |
| 37 scoped_refptr<AsyncPixelTransferUploadStats> texture_upload_stats; | 38 scoped_refptr<AsyncPixelTransferUploadStats> texture_upload_stats; |
| 38 bool is_imagination; | 39 bool is_imagination; |
| 39 bool is_qualcomm; | 40 bool is_qualcomm; |
| 40 typedef std::list<base::WeakPtr<AsyncPixelTransferDelegateEGL> > | 41 typedef std::list<base::WeakPtr<AsyncPixelTransferDelegateEGL> > |
| 41 TransferQueue; | 42 TransferQueue; |
| 42 TransferQueue pending_allocations; | 43 TransferQueue pending_allocations; |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 private: | 46 private: |
| 47 friend class AsyncPixelTransferManagerCompressed; |
| 48 |
| 49 // Used by AsyncPixelTransferManagerCompressed: |
| 50 void SuspendUploads(base::WaitableEvent* waitable); |
| 51 void SignalWhenUploadsCompleted(base::WaitableEvent* waitable); |
| 52 |
| 46 // AsyncPixelTransferManager implementation: | 53 // AsyncPixelTransferManager implementation: |
| 47 AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( | 54 AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( |
| 48 gles2::TextureRef* ref, | 55 gles2::TextureRef* ref, |
| 49 const AsyncTexImage2DParams& define_params) override; | 56 const AsyncTexImage2DParams& define_params) override; |
| 57 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( |
| 58 gles2::TextureRef* ref, |
| 59 const AsyncCompressedTexImage2DParams& define_params) override; |
| 50 | 60 |
| 51 SharedState shared_state_; | 61 SharedState shared_state_; |
| 52 | 62 |
| 53 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerEGL); | 63 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerEGL); |
| 54 }; | 64 }; |
| 55 | 65 |
| 56 } // namespace gpu | 66 } // namespace gpu |
| 57 | 67 |
| 58 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ | 68 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ |
| OLD | NEW |