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

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

Issue 12717013: Add reference-counting for mailbox textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 // State to facilitate async transfers on this texture. 346 // State to facilitate async transfers on this texture.
347 scoped_ptr<gfx::AsyncPixelTransferState> async_transfer_state_; 347 scoped_ptr<gfx::AsyncPixelTransferState> async_transfer_state_;
348 348
349 // Whether the texture is immutable and no further changes to the format 349 // Whether the texture is immutable and no further changes to the format
350 // or dimensions of the texture object can be made. 350 // or dimensions of the texture object can be made.
351 bool immutable_; 351 bool immutable_;
352 352
353 // Size in bytes this texture is assumed to take in memory. 353 // Size in bytes this texture is assumed to take in memory.
354 uint32 estimated_size_; 354 uint32 estimated_size_;
355 355
356 // A reference to a texture definition ater putting it into a mailbox.
apatrick_chromium 2013/03/19 18:50:18 ater -> after
no sievers 2013/04/02 03:07:20 Done.
357 scoped_refptr<TextureDefinition> mailbox_;
358
356 DISALLOW_COPY_AND_ASSIGN(Texture); 359 DISALLOW_COPY_AND_ASSIGN(Texture);
357 }; 360 };
358 361
359 // This class keeps track of the textures and their sizes so we can do NPOT and 362 // This class keeps track of the textures and their sizes so we can do NPOT and
360 // texture complete checking. 363 // texture complete checking.
361 // 364 //
362 // NOTE: To support shared resources an instance of this class will need to be 365 // NOTE: To support shared resources an instance of this class will need to be
363 // shared by multiple GLES2Decoders. 366 // shared by multiple GLES2Decoders.
364 class GPU_EXPORT TextureManager { 367 class GPU_EXPORT TextureManager {
365 public: 368 public:
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 // The default textures for each target (texture name = 0) 611 // The default textures for each target (texture name = 0)
609 scoped_refptr<Texture> default_textures_[kNumDefaultTextures]; 612 scoped_refptr<Texture> default_textures_[kNumDefaultTextures];
610 613
611 DISALLOW_COPY_AND_ASSIGN(TextureManager); 614 DISALLOW_COPY_AND_ASSIGN(TextureManager);
612 }; 615 };
613 616
614 } // namespace gles2 617 } // namespace gles2
615 } // namespace gpu 618 } // namespace gpu
616 619
617 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 620 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698