OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEXTURE_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bool IsLevelCleared(GLenum target, GLint level) const; | 155 bool IsLevelCleared(GLenum target, GLint level) const; |
156 | 156 |
157 // Whether the texture has been defined | 157 // Whether the texture has been defined |
158 bool IsDefined() const { | 158 bool IsDefined() const { |
159 return estimated_size() > 0; | 159 return estimated_size() > 0; |
160 } | 160 } |
161 | 161 |
162 // Initialize TEXTURE_MAX_ANISOTROPY to 1 if we haven't done so yet. | 162 // Initialize TEXTURE_MAX_ANISOTROPY to 1 if we haven't done so yet. |
163 void InitTextureMaxAnisotropyIfNeeded(GLenum target); | 163 void InitTextureMaxAnisotropyIfNeeded(GLenum target); |
164 | 164 |
| 165 void OnWillModifyPixels(); |
| 166 void OnDidModifyPixels(); |
| 167 |
165 private: | 168 private: |
166 friend class MailboxManager; | 169 friend class MailboxManager; |
167 friend class MailboxManagerTest; | 170 friend class MailboxManagerTest; |
| 171 friend class TextureDefinition; |
168 friend class TextureManager; | 172 friend class TextureManager; |
169 friend class TextureRef; | 173 friend class TextureRef; |
170 friend class TextureTestHelper; | 174 friend class TextureTestHelper; |
171 | 175 |
172 ~Texture(); | 176 ~Texture(); |
173 void AddTextureRef(TextureRef* ref); | 177 void AddTextureRef(TextureRef* ref); |
174 void RemoveTextureRef(TextureRef* ref, bool have_context); | 178 void RemoveTextureRef(TextureRef* ref, bool have_context); |
175 MemoryTypeTracker* GetMemTracker(); | 179 MemoryTypeTracker* GetMemTracker(); |
176 | 180 |
177 // Condition on which this texture is renderable. Can be ONLY_IF_NPOT if it | 181 // Condition on which this texture is renderable. Can be ONLY_IF_NPOT if it |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 private: | 807 private: |
804 DecoderTextureState* texture_state_; | 808 DecoderTextureState* texture_state_; |
805 base::TimeTicks begin_time_; | 809 base::TimeTicks begin_time_; |
806 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 810 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
807 }; | 811 }; |
808 | 812 |
809 } // namespace gles2 | 813 } // namespace gles2 |
810 } // namespace gpu | 814 } // namespace gpu |
811 | 815 |
812 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 816 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
OLD | NEW |