OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_GL_ASYNC_TASK_DELEGATE_H_ | 5 #ifndef UI_GL_ASYNC_TASK_DELEGATE_H_ |
6 #define UI_GL_ASYNC_TASK_DELEGATE_H_ | 6 #define UI_GL_ASYNC_TASK_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/time.h" |
12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
13 #include "ui/gl/gl_bindings.h" | 14 #include "ui/gl/gl_bindings.h" |
14 #include "ui/gl/gl_export.h" | 15 #include "ui/gl/gl_export.h" |
15 | 16 |
16 namespace base { | 17 namespace base { |
17 class SharedMemory; | 18 class SharedMemory; |
18 } | 19 } |
19 | 20 |
20 namespace gfx { | 21 namespace gfx { |
21 | 22 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 virtual void AsyncTexImage2D( | 95 virtual void AsyncTexImage2D( |
95 AsyncPixelTransferState* state, | 96 AsyncPixelTransferState* state, |
96 const AsyncTexImage2DParams& tex_params, | 97 const AsyncTexImage2DParams& tex_params, |
97 const AsyncMemoryParams& mem_params) = 0; | 98 const AsyncMemoryParams& mem_params) = 0; |
98 | 99 |
99 virtual void AsyncTexSubImage2D( | 100 virtual void AsyncTexSubImage2D( |
100 AsyncPixelTransferState* state, | 101 AsyncPixelTransferState* state, |
101 const AsyncTexSubImage2DParams& tex_params, | 102 const AsyncTexSubImage2DParams& tex_params, |
102 const AsyncMemoryParams& mem_params) = 0; | 103 const AsyncMemoryParams& mem_params) = 0; |
103 | 104 |
| 105 virtual uint32 GetTextureUploadCount() = 0; |
| 106 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; |
| 107 |
104 protected: | 108 protected: |
105 AsyncPixelTransferDelegate() {} | 109 AsyncPixelTransferDelegate() {} |
106 // For testing, as returning scoped_ptr wouldn't work with MOCK_METHOD. | 110 // For testing, as returning scoped_ptr wouldn't work with MOCK_METHOD. |
107 virtual AsyncPixelTransferState* | 111 virtual AsyncPixelTransferState* |
108 CreateRawPixelTransferState(GLuint texture_id) = 0; | 112 CreateRawPixelTransferState(GLuint texture_id) = 0; |
109 | 113 |
110 private: | 114 private: |
111 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate); | 115 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate); |
112 }; | 116 }; |
113 | 117 |
114 } // namespace gfx | 118 } // namespace gfx |
115 | 119 |
116 #endif // UI_GL_ASYNC_TASK_DELEGATE_H_ | 120 #endif // UI_GL_ASYNC_TASK_DELEGATE_H_ |
117 | 121 |
OLD | NEW |