| 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 private: | 162 private: |
| 163 friend class MailboxManager; | 163 friend class MailboxManager; |
| 164 friend class MailboxManagerTest; | 164 friend class MailboxManagerTest; |
| 165 friend class TextureDefinition; |
| 165 friend class TextureManager; | 166 friend class TextureManager; |
| 166 friend class TextureRef; | 167 friend class TextureRef; |
| 167 friend class TextureTestHelper; | 168 friend class TextureTestHelper; |
| 168 | 169 |
| 169 ~Texture(); | 170 ~Texture(); |
| 170 void AddTextureRef(TextureRef* ref); | 171 void AddTextureRef(TextureRef* ref); |
| 171 void RemoveTextureRef(TextureRef* ref, bool have_context); | 172 void RemoveTextureRef(TextureRef* ref, bool have_context); |
| 172 MemoryTypeTracker* GetMemTracker(); | 173 MemoryTypeTracker* GetMemTracker(); |
| 173 | 174 |
| 174 // Condition on which this texture is renderable. Can be ONLY_IF_NPOT if it | 175 // Condition on which this texture is renderable. Can be ONLY_IF_NPOT if it |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 private: | 793 private: |
| 793 DecoderTextureState* texture_state_; | 794 DecoderTextureState* texture_state_; |
| 794 base::TimeTicks begin_time_; | 795 base::TimeTicks begin_time_; |
| 795 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); | 796 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); |
| 796 }; | 797 }; |
| 797 | 798 |
| 798 } // namespace gles2 | 799 } // namespace gles2 |
| 799 } // namespace gpu | 800 } // namespace gpu |
| 800 | 801 |
| 801 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 802 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
| OLD | NEW |