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

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

Issue 8872061: Fixed service side implementation of glTexStorage2DEXT to only initialize the number of (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
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 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Returns false if a GL error was generated. 247 // Returns false if a GL error was generated.
248 bool ClearLevel(GLES2Decoder* decoder, GLenum target, GLint level); 248 bool ClearLevel(GLES2Decoder* decoder, GLenum target, GLint level);
249 249
250 // Sets a texture parameter. 250 // Sets a texture parameter.
251 // TODO(gman): Expand to SetParameteri,f,iv,fv 251 // TODO(gman): Expand to SetParameteri,f,iv,fv
252 // Returns false if param was INVALID_ENUN 252 // Returns false if param was INVALID_ENUN
253 bool SetParameter( 253 bool SetParameter(
254 const FeatureInfo* feature_info, GLenum pname, GLint param); 254 const FeatureInfo* feature_info, GLenum pname, GLint param);
255 255
256 // Makes each of the mip levels as though they were generated. 256 // Makes each of the mip levels as though they were generated.
257 bool MarkMipmapsGenerated(const FeatureInfo* feature_info, bool cleared); 257 bool MarkMipmapsGenerated(const FeatureInfo* feature_info);
258 258
259 void MarkAsDeleted() { 259 void MarkAsDeleted() {
260 service_id_ = 0; 260 service_id_ = 0;
261 deleted_ = true; 261 deleted_ = true;
262 } 262 }
263 263
264 bool NeedsMips() const { 264 bool NeedsMips() const {
265 return min_filter_ != GL_NEAREST && min_filter_ != GL_LINEAR; 265 return min_filter_ != GL_NEAREST && min_filter_ != GL_LINEAR;
266 } 266 }
267 267
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 void SetLevelCleared(TextureInfo* info, GLenum target, GLint level); 402 void SetLevelCleared(TextureInfo* info, GLenum target, GLint level);
403 403
404 // Sets a texture parameter of a TextureInfo 404 // Sets a texture parameter of a TextureInfo
405 // TODO(gman): Expand to SetParameteri,f,iv,fv 405 // TODO(gman): Expand to SetParameteri,f,iv,fv
406 bool SetParameter( 406 bool SetParameter(
407 const FeatureInfo* feature_info, 407 const FeatureInfo* feature_info,
408 TextureInfo* info, GLenum pname, GLint param); 408 TextureInfo* info, GLenum pname, GLint param);
409 409
410 // Makes each of the mip levels as though they were generated. 410 // Makes each of the mip levels as though they were generated.
411 // Returns false if that's not allowed for the given texture. 411 // Returns false if that's not allowed for the given texture.
412 bool MarkMipmapsGenerated(const FeatureInfo* feature_info, TextureInfo* info, 412 bool MarkMipmapsGenerated(const FeatureInfo* feature_info,
413 bool cleared); 413 TextureInfo* info);
414 414
415 // Clears any uncleared renderable levels. 415 // Clears any uncleared renderable levels.
416 bool ClearRenderableLevels(GLES2Decoder* decoder, TextureInfo* info); 416 bool ClearRenderableLevels(GLES2Decoder* decoder, TextureInfo* info);
417 417
418 // Clear a specific level. 418 // Clear a specific level.
419 bool ClearTextureLevel( 419 bool ClearTextureLevel(
420 GLES2Decoder* decoder,TextureInfo* info, GLenum target, GLint level); 420 GLES2Decoder* decoder,TextureInfo* info, GLenum target, GLint level);
421 421
422 // Creates a new texture info. 422 // Creates a new texture info.
423 TextureInfo* CreateTextureInfo( 423 TextureInfo* CreateTextureInfo(
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 TextureInfo::Ref default_texture_external_oes_; 510 TextureInfo::Ref default_texture_external_oes_;
511 TextureInfo::Ref default_texture_rectangle_arb_; 511 TextureInfo::Ref default_texture_rectangle_arb_;
512 512
513 DISALLOW_COPY_AND_ASSIGN(TextureManager); 513 DISALLOW_COPY_AND_ASSIGN(TextureManager);
514 }; 514 };
515 515
516 } // namespace gles2 516 } // namespace gles2
517 } // namespace gpu 517 } // namespace gpu
518 518
519 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 519 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698