| 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_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; | 71 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; |
| 72 | 72 |
| 73 // ProcessMorePendingTransfers() will be called at a good time | 73 // ProcessMorePendingTransfers() will be called at a good time |
| 74 // to process a small amount of pending transfer work while | 74 // to process a small amount of pending transfer work while |
| 75 // NeedsProcessMorePendingTransfers() returns true. Implementations | 75 // NeedsProcessMorePendingTransfers() returns true. Implementations |
| 76 // that can't dispatch work to separate threads should use | 76 // that can't dispatch work to separate threads should use |
| 77 // this to avoid blocking the caller thread inappropriately. | 77 // this to avoid blocking the caller thread inappropriately. |
| 78 virtual void ProcessMorePendingTransfers() = 0; | 78 virtual void ProcessMorePendingTransfers() = 0; |
| 79 virtual bool NeedsProcessMorePendingTransfers() = 0; | 79 virtual bool NeedsProcessMorePendingTransfers() = 0; |
| 80 | 80 |
| 81 // Wait for all AsyncTex(Sub)Image2D uploads to finish before returning. |
| 82 virtual void WaitAllAsyncTexImage2D() = 0; |
| 83 |
| 81 AsyncPixelTransferDelegate* CreatePixelTransferDelegate( | 84 AsyncPixelTransferDelegate* CreatePixelTransferDelegate( |
| 82 gles2::TextureRef* ref, | 85 gles2::TextureRef* ref, |
| 83 const AsyncTexImage2DParams& define_params); | 86 const AsyncTexImage2DParams& define_params); |
| 84 | 87 |
| 85 AsyncPixelTransferDelegate* GetPixelTransferDelegate( | 88 AsyncPixelTransferDelegate* GetPixelTransferDelegate( |
| 86 gles2::TextureRef* ref); | 89 gles2::TextureRef* ref); |
| 87 | 90 |
| 88 void ClearPixelTransferDelegateForTest(gles2::TextureRef* ref); | 91 void ClearPixelTransferDelegateForTest(gles2::TextureRef* ref); |
| 89 | 92 |
| 90 bool AsyncTransferIsInProgress(gles2::TextureRef* ref); | 93 bool AsyncTransferIsInProgress(gles2::TextureRef* ref); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 110 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( | 113 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( |
| 111 gles2::TextureRef* ref, | 114 gles2::TextureRef* ref, |
| 112 const AsyncTexImage2DParams& define_params) = 0; | 115 const AsyncTexImage2DParams& define_params) = 0; |
| 113 | 116 |
| 114 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManager); | 117 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManager); |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 } // namespace gpu | 120 } // namespace gpu |
| 118 | 121 |
| 119 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ | 122 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ |
| OLD | NEW |