| 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 #include "base/atomic_ref_count.h" |
| 9 | 10 |
| 10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 11 | 12 |
| 12 namespace gpu { | 13 namespace gpu { |
| 13 class AsyncPixelTransferDelegateEGL; | 14 class AsyncPixelTransferDelegateEGL; |
| 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(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 32 struct SharedState { | 33 struct SharedState { |
| 33 SharedState(); | 34 SharedState(); |
| 34 ~SharedState(); | 35 ~SharedState(); |
| 35 | 36 |
| 36 scoped_refptr<AsyncPixelTransferUploadStats> texture_upload_stats; | 37 scoped_refptr<AsyncPixelTransferUploadStats> texture_upload_stats; |
| 37 bool is_imagination; | 38 bool is_imagination; |
| 38 bool is_qualcomm; | 39 bool is_qualcomm; |
| 39 typedef std::list<base::WeakPtr<AsyncPixelTransferDelegateEGL> > | 40 typedef std::list<base::WeakPtr<AsyncPixelTransferDelegateEGL> > |
| 40 TransferQueue; | 41 TransferQueue; |
| 41 TransferQueue pending_allocations; | 42 TransferQueue pending_allocations; |
| 43 base::AtomicRefCount pending_uploads; |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 private: | 46 private: |
| 45 // AsyncPixelTransferManager implementation: | 47 // AsyncPixelTransferManager implementation: |
| 46 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( | 48 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( |
| 47 gles2::TextureRef* ref, | 49 gles2::TextureRef* ref, |
| 48 const AsyncTexImage2DParams& define_params) OVERRIDE; | 50 const AsyncTexImage2DParams& define_params) OVERRIDE; |
| 49 | 51 |
| 50 SharedState shared_state_; | 52 SharedState shared_state_; |
| 51 | 53 |
| 52 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerEGL); | 54 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerEGL); |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 } // namespace gpu | 57 } // namespace gpu |
| 56 | 58 |
| 57 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ | 59 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ |
| OLD | NEW |