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 <vector> | 8 #include <vector> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // Whether a particular level/face is cleared. | 181 // Whether a particular level/face is cleared. |
182 bool IsLevelCleared(GLenum target, GLint level); | 182 bool IsLevelCleared(GLenum target, GLint level); |
183 | 183 |
184 private: | 184 private: |
185 friend class TextureManager; | 185 friend class TextureManager; |
186 friend class base::RefCounted<TextureInfo>; | 186 friend class base::RefCounted<TextureInfo>; |
187 | 187 |
188 ~TextureInfo(); | 188 ~TextureInfo(); |
189 | 189 |
190 struct LevelInfo { | 190 struct LevelInfo { |
191 LevelInfo() | 191 LevelInfo(); |
192 : cleared(true), | 192 LevelInfo(const LevelInfo& rhs); |
193 target(0), | |
194 level(-1), | |
195 internal_format(0), | |
196 width(0), | |
197 height(0), | |
198 depth(0), | |
199 border(0), | |
200 format(0), | |
201 type(0), | |
202 estimated_size(0) { | |
203 } | |
204 | |
205 LevelInfo(const LevelInfo& rhs) | |
206 : cleared(rhs.cleared), | |
207 target(rhs.target), | |
208 level(rhs.level), | |
209 internal_format(rhs.internal_format), | |
210 width(rhs.width), | |
211 height(rhs.height), | |
212 depth(rhs.depth), | |
213 border(rhs.border), | |
214 format(rhs.format), | |
215 type(rhs.type), | |
216 estimated_size(rhs.estimated_size) { | |
217 } | |
218 | 193 |
219 bool cleared; | 194 bool cleared; |
220 GLenum target; | 195 GLenum target; |
221 GLint level; | 196 GLint level; |
222 GLenum internal_format; | 197 GLenum internal_format; |
223 GLsizei width; | 198 GLsizei width; |
224 GLsizei height; | 199 GLsizei height; |
225 GLsizei depth; | 200 GLsizei depth; |
226 GLint border; | 201 GLint border; |
227 GLenum format; | 202 GLenum format; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 // The default textures for each target (texture name = 0) | 535 // The default textures for each target (texture name = 0) |
561 TextureInfo::Ref default_textures_[kNumDefaultTextures]; | 536 TextureInfo::Ref default_textures_[kNumDefaultTextures]; |
562 | 537 |
563 DISALLOW_COPY_AND_ASSIGN(TextureManager); | 538 DISALLOW_COPY_AND_ASSIGN(TextureManager); |
564 }; | 539 }; |
565 | 540 |
566 } // namespace gles2 | 541 } // namespace gles2 |
567 } // namespace gpu | 542 } // namespace gpu |
568 | 543 |
569 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ | 544 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ |
OLD | NEW |