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

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

Issue 182413006: Workaround Linux AMD driver bug where TEXTURE_MAX_ANISOTROPY init value is incorrect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rid of ppapi change Created 6 years, 9 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 153
154 // Whether a particular level/face is cleared. 154 // Whether a particular level/face is cleared.
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 // Initialize TEXTURE_MAX_ANISOTROPY to 1 if we haven't done so yet.
163 void InitTextureMaxAnisotropyIfNeeded(GLenum target);
164
162 private: 165 private:
163 friend class MailboxManager; 166 friend class MailboxManager;
164 friend class MailboxManagerTest; 167 friend class MailboxManagerTest;
165 friend class TextureManager; 168 friend class TextureManager;
166 friend class TextureRef; 169 friend class TextureRef;
167 friend class TextureTestHelper; 170 friend class TextureTestHelper;
168 171
169 ~Texture(); 172 ~Texture();
170 void AddTextureRef(TextureRef* ref); 173 void AddTextureRef(TextureRef* ref);
171 void RemoveTextureRef(TextureRef* ref, bool have_context); 174 void RemoveTextureRef(TextureRef* ref, bool have_context);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 375
373 // Whether or not this texture has images. 376 // Whether or not this texture has images.
374 bool has_images_; 377 bool has_images_;
375 378
376 // Size in bytes this texture is assumed to take in memory. 379 // Size in bytes this texture is assumed to take in memory.
377 uint32 estimated_size_; 380 uint32 estimated_size_;
378 381
379 // Cache of the computed CanRenderCondition flag. 382 // Cache of the computed CanRenderCondition flag.
380 CanRenderCondition can_render_condition_; 383 CanRenderCondition can_render_condition_;
381 384
385 // Whether we have initialized TEXTURE_MAX_ANISOTROPY to 1.
386 bool texture_max_anisotropy_initialized_;
387
382 DISALLOW_COPY_AND_ASSIGN(Texture); 388 DISALLOW_COPY_AND_ASSIGN(Texture);
383 }; 389 };
384 390
385 // This class represents a texture in a client context group. It's mostly 1:1 391 // This class represents a texture in a client context group. It's mostly 1:1
386 // with a client id, though it can outlive the client id if it's still bound to 392 // with a client id, though it can outlive the client id if it's still bound to
387 // a FBO or another context when destroyed. 393 // a FBO or another context when destroyed.
388 // Multiple TextureRef can point to the same texture with cross-context sharing. 394 // Multiple TextureRef can point to the same texture with cross-context sharing.
389 class GPU_EXPORT TextureRef : public base::RefCounted<TextureRef> { 395 class GPU_EXPORT TextureRef : public base::RefCounted<TextureRef> {
390 public: 396 public:
391 TextureRef(TextureManager* manager, GLuint client_id, Texture* texture); 397 TextureRef(TextureManager* manager, GLuint client_id, Texture* texture);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 private: 798 private:
793 DecoderTextureState* texture_state_; 799 DecoderTextureState* texture_state_;
794 base::TimeTicks begin_time_; 800 base::TimeTicks begin_time_;
795 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 801 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
796 }; 802 };
797 803
798 } // namespace gles2 804 } // namespace gles2
799 } // namespace gpu 805 } // namespace gpu
800 806
801 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 807 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_autogen.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698