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

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

Issue 1870483003: Add command buffer support for GL_RGB CHROMIUM image emulation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing braces. Created 4 years, 8 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 // Initialize TEXTURE_MAX_ANISOTROPY to 1 if we haven't done so yet. 263 // Initialize TEXTURE_MAX_ANISOTROPY to 1 if we haven't done so yet.
264 void InitTextureMaxAnisotropyIfNeeded(GLenum target); 264 void InitTextureMaxAnisotropyIfNeeded(GLenum target);
265 265
266 void DumpLevelMemory(base::trace_event::ProcessMemoryDump* pmd, 266 void DumpLevelMemory(base::trace_event::ProcessMemoryDump* pmd,
267 uint64_t client_tracing_id, 267 uint64_t client_tracing_id,
268 const std::string& dump_name) const; 268 const std::string& dump_name) const;
269 269
270 void ApplyFormatWorkarounds(FeatureInfo* feature_info); 270 void ApplyFormatWorkarounds(FeatureInfo* feature_info);
271 271
272 bool EmulatingRGB();
273
272 private: 274 private:
273 friend class MailboxManagerImpl; 275 friend class MailboxManagerImpl;
274 friend class MailboxManagerSync; 276 friend class MailboxManagerSync;
275 friend class MailboxManagerTest; 277 friend class MailboxManagerTest;
276 friend class TextureDefinition; 278 friend class TextureDefinition;
277 friend class TextureManager; 279 friend class TextureManager;
278 friend class TextureRef; 280 friend class TextureRef;
279 friend class TextureTestHelper; 281 friend class TextureTestHelper;
280 282
281 ~Texture(); 283 ~Texture();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 CanRenderCondition GetCanRenderCondition() const; 483 CanRenderCondition GetCanRenderCondition() const;
482 484
483 // Updates the unrenderable texture count in all the managers referencing this 485 // Updates the unrenderable texture count in all the managers referencing this
484 // texture. 486 // texture.
485 void UpdateCanRenderCondition(); 487 void UpdateCanRenderCondition();
486 488
487 // Updates the images count in all the managers referencing this 489 // Updates the images count in all the managers referencing this
488 // texture. 490 // texture.
489 void UpdateHasImages(); 491 void UpdateHasImages();
490 492
493 // Updates the flag that indicates whether this texture requires RGB
494 // emulation.
495 void UpdateEmulatingRGB();
496
491 // Increment the framebuffer state change count in all the managers 497 // Increment the framebuffer state change count in all the managers
492 // referencing this texture. 498 // referencing this texture.
493 void IncAllFramebufferStateChangeCount(); 499 void IncAllFramebufferStateChangeCount();
494 500
495 void UpdateBaseLevel(GLint base_level); 501 void UpdateBaseLevel(GLint base_level);
496 void UpdateMaxLevel(GLint max_level); 502 void UpdateMaxLevel(GLint max_level);
497 void UpdateNumMipLevels(); 503 void UpdateNumMipLevels();
498 504
499 // Increment the generation counter for all managers that have a reference to 505 // Increment the generation counter for all managers that have a reference to
500 // this texture. 506 // this texture.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 uint32_t estimated_size_; 591 uint32_t estimated_size_;
586 592
587 // Cache of the computed CanRenderCondition flag. 593 // Cache of the computed CanRenderCondition flag.
588 CanRenderCondition can_render_condition_; 594 CanRenderCondition can_render_condition_;
589 595
590 // Whether we have initialized TEXTURE_MAX_ANISOTROPY to 1. 596 // Whether we have initialized TEXTURE_MAX_ANISOTROPY to 1.
591 bool texture_max_anisotropy_initialized_; 597 bool texture_max_anisotropy_initialized_;
592 598
593 const CompatibilitySwizzle* compatibility_swizzle_; 599 const CompatibilitySwizzle* compatibility_swizzle_;
594 600
601 bool emulating_rgb_;
602
595 DISALLOW_COPY_AND_ASSIGN(Texture); 603 DISALLOW_COPY_AND_ASSIGN(Texture);
596 }; 604 };
597 605
598 // This class represents a texture in a client context group. It's mostly 1:1 606 // This class represents a texture in a client context group. It's mostly 1:1
599 // with a client id, though it can outlive the client id if it's still bound to 607 // with a client id, though it can outlive the client id if it's still bound to
600 // a FBO or another context when destroyed. 608 // a FBO or another context when destroyed.
601 // Multiple TextureRef can point to the same texture with cross-context sharing. 609 // Multiple TextureRef can point to the same texture with cross-context sharing.
602 class GPU_EXPORT TextureRef : public base::RefCounted<TextureRef> { 610 class GPU_EXPORT TextureRef : public base::RefCounted<TextureRef> {
603 public: 611 public:
604 TextureRef(TextureManager* manager, GLuint client_id, Texture* texture); 612 TextureRef(TextureManager* manager, GLuint client_id, Texture* texture);
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 private: 1146 private:
1139 DecoderTextureState* texture_state_; 1147 DecoderTextureState* texture_state_;
1140 base::TimeTicks begin_time_; 1148 base::TimeTicks begin_time_;
1141 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer); 1149 DISALLOW_COPY_AND_ASSIGN(ScopedTextureUploadTimer);
1142 }; 1150 };
1143 1151
1144 } // namespace gles2 1152 } // namespace gles2
1145 } // namespace gpu 1153 } // namespace gpu
1146 1154
1147 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 1155 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698