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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 AsyncPixelTransferDelegate* GetPixelTransferDelegate( | 88 AsyncPixelTransferDelegate* GetPixelTransferDelegate( |
89 gles2::TextureRef* ref); | 89 gles2::TextureRef* ref); |
90 | 90 |
91 void ClearPixelTransferDelegateForTest(gles2::TextureRef* ref); | 91 void ClearPixelTransferDelegateForTest(gles2::TextureRef* ref); |
92 | 92 |
93 bool AsyncTransferIsInProgress(gles2::TextureRef* ref); | 93 bool AsyncTransferIsInProgress(gles2::TextureRef* ref); |
94 | 94 |
95 // gles2::TextureRef::DestructionObserver implementation: | 95 // gles2::TextureRef::DestructionObserver implementation: |
96 virtual void OnTextureManagerDestroying(gles2::TextureManager* manager) | 96 virtual void OnTextureManagerDestroying(gles2::TextureManager* manager) |
97 OVERRIDE; | 97 override; |
98 virtual void OnTextureRefDestroying(gles2::TextureRef* texture) OVERRIDE; | 98 virtual void OnTextureRefDestroying(gles2::TextureRef* texture) override; |
99 | 99 |
100 protected: | 100 protected: |
101 AsyncPixelTransferManager(); | 101 AsyncPixelTransferManager(); |
102 | 102 |
103 private: | 103 private: |
104 gles2::TextureManager* manager_; | 104 gles2::TextureManager* manager_; |
105 | 105 |
106 typedef base::hash_map<gles2::TextureRef*, | 106 typedef base::hash_map<gles2::TextureRef*, |
107 linked_ptr<AsyncPixelTransferDelegate> > | 107 linked_ptr<AsyncPixelTransferDelegate> > |
108 TextureToDelegateMap; | 108 TextureToDelegateMap; |
109 TextureToDelegateMap delegate_map_; | 109 TextureToDelegateMap delegate_map_; |
110 | 110 |
111 // A factory method called by CreatePixelTransferDelegate that is overriden | 111 // A factory method called by CreatePixelTransferDelegate that is overriden |
112 // by each implementation. | 112 // by each implementation. |
113 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( | 113 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( |
114 gles2::TextureRef* ref, | 114 gles2::TextureRef* ref, |
115 const AsyncTexImage2DParams& define_params) = 0; | 115 const AsyncTexImage2DParams& define_params) = 0; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManager); | 117 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManager); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace gpu | 120 } // namespace gpu |
121 | 121 |
122 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ | 122 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ |
OLD | NEW |