Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: gpu/command_buffer/service/texture_manager.h

Issue 1275773003: gpu: support GL_TEXTURE_CUBE_MAP destination target to Copy(Sub)TextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Choose correct and expensive way Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <algorithm> 8 #include <algorithm>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 void SetImmutable(bool immutable) { 178 void SetImmutable(bool immutable) {
179 immutable_ = immutable; 179 immutable_ = immutable;
180 } 180 }
181 181
182 bool IsImmutable() const { 182 bool IsImmutable() const {
183 return immutable_; 183 return immutable_;
184 } 184 }
185 185
186 // In GLES2 "cube complete" means all 6 faces level 0 are defined, all the
187 // same format, all the same dimensions and all width = height.
188 bool cube_complete() const { return cube_complete_; }
189
186 // Get the cleared rectangle for a particular level. Returns an empty 190 // Get the cleared rectangle for a particular level. Returns an empty
187 // rectangle if level does not exist. 191 // rectangle if level does not exist.
188 gfx::Rect GetLevelClearedRect(GLenum target, GLint level) const; 192 gfx::Rect GetLevelClearedRect(GLenum target, GLint level) const;
189 193
190 // Whether a particular level/face is cleared. 194 // Whether a particular level/face is cleared.
191 bool IsLevelCleared(GLenum target, GLint level) const; 195 bool IsLevelCleared(GLenum target, GLint level) const;
192 196
193 // Whether the texture has been defined 197 // Whether the texture has been defined
194 bool IsDefined() const { 198 bool IsDefined() const {
195 return estimated_size() > 0; 199 return estimated_size() > 0;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 GLenum type, 271 GLenum type,
268 const gfx::Rect& cleared_rect); 272 const gfx::Rect& cleared_rect);
269 273
270 // In GLES2 "texture complete" means it has all required mips for filtering 274 // In GLES2 "texture complete" means it has all required mips for filtering
271 // down to a 1x1 pixel texture, they are in the correct order, they are all 275 // down to a 1x1 pixel texture, they are in the correct order, they are all
272 // the same format. 276 // the same format.
273 bool texture_complete() const { 277 bool texture_complete() const {
274 return texture_complete_; 278 return texture_complete_;
275 } 279 }
276 280
277 // In GLES2 "cube complete" means all 6 faces level 0 are defined, all the
278 // same format, all the same dimensions and all width = height.
279 bool cube_complete() const {
280 return cube_complete_;
281 }
282
283 // Whether or not this texture is a non-power-of-two texture. 281 // Whether or not this texture is a non-power-of-two texture.
284 bool npot() const { 282 bool npot() const {
285 return npot_; 283 return npot_;
286 } 284 }
287 285
288 // Marks a |rect| of a particular level as cleared. 286 // Marks a |rect| of a particular level as cleared.
289 void SetLevelClearedRect(GLenum target, 287 void SetLevelClearedRect(GLenum target,
290 GLint level, 288 GLint level,
291 const gfx::Rect& cleared_rect); 289 const gfx::Rect& cleared_rect);
292 290
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 private: 958 private:
961 DecoderTextureState* texture_state_; 959 DecoderTextureState* texture_state_;
962 base::TimeTicks begin_time_; 960 base::TimeTicks begin_time_;
963 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 961 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
964 }; 962 };
965 963
966 } // namespace gles2 964 } // namespace gles2
967 } // namespace gpu 965 } // namespace gpu
968 966
969 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 967 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698