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

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

Issue 24152009: Allow rendering from non-stream GL_TEXTURE_EXTERNAL_OES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: eead63fe Rebase. Created 7 years, 2 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 <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 switch (target) { 521 switch (target) {
522 case GL_TEXTURE_2D: 522 case GL_TEXTURE_2D:
523 case GL_TEXTURE_EXTERNAL_OES: 523 case GL_TEXTURE_EXTERNAL_OES:
524 return max_texture_size_; 524 return max_texture_size_;
525 default: 525 default:
526 return max_cube_map_texture_size_; 526 return max_cube_map_texture_size_;
527 } 527 }
528 } 528 }
529 529
530 // Returns the maxium number of levels a texture of the given size can have. 530 // Returns the maxium number of levels a texture of the given size can have.
531 static GLsizei ComputeMipMapCount( 531 static GLsizei ComputeMipMapCount(GLenum target,
532 GLsizei width, GLsizei height, GLsizei depth); 532 GLsizei width,
533 GLsizei height,
534 GLsizei depth);
533 535
534 // Checks if a dimensions are valid for a given target. 536 // Checks if a dimensions are valid for a given target.
535 bool ValidForTarget( 537 bool ValidForTarget(
536 GLenum target, GLint level, 538 GLenum target, GLint level,
537 GLsizei width, GLsizei height, GLsizei depth); 539 GLsizei width, GLsizei height, GLsizei depth);
538 540
539 // True if this texture meets all the GLES2 criteria for rendering. 541 // True if this texture meets all the GLES2 criteria for rendering.
540 // See section 3.8.2 of the GLES2 spec. 542 // See section 3.8.2 of the GLES2 spec.
541 bool CanRender(const TextureRef* ref) const { 543 bool CanRender(const TextureRef* ref) const {
542 return ref->texture()->CanRender(feature_info_.get()); 544 return ref->texture()->CanRender(feature_info_.get());
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 private: 810 private:
809 DecoderTextureState* texture_state_; 811 DecoderTextureState* texture_state_;
810 base::TimeTicks begin_time_; 812 base::TimeTicks begin_time_;
811 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 813 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
812 }; 814 };
813 815
814 } // namespace gles2 816 } // namespace gles2
815 } // namespace gpu 817 } // namespace gpu
816 818
817 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 819 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698