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

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

Issue 9581018: GPU: Build most of the gpu as a single DLL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 <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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "gpu/command_buffer/service/feature_info.h" 13 #include "gpu/command_buffer/service/feature_info.h"
14 #include "gpu/command_buffer/service/gl_utils.h" 14 #include "gpu/command_buffer/service/gl_utils.h"
15 #include "gpu/gpu_export.h"
15 16
16 namespace gpu { 17 namespace gpu {
17 namespace gles2 { 18 namespace gles2 {
18 19
19 class GLES2Decoder; 20 class GLES2Decoder;
20 21
21 // This class keeps track of the textures and their sizes so we can do NPOT and 22 // This class keeps track of the textures and their sizes so we can do NPOT and
22 // texture complete checking. 23 // texture complete checking.
23 // 24 //
24 // NOTE: To support shared resources an instance of this class will need to be 25 // NOTE: To support shared resources an instance of this class will need to be
25 // shared by multiple GLES2Decoders. 26 // shared by multiple GLES2Decoders.
26 class TextureManager { 27 class GPU_EXPORT TextureManager {
27 public: 28 public:
28 enum DefaultAndBlackTextures { 29 enum DefaultAndBlackTextures {
29 kTexture2D, 30 kTexture2D,
30 kCubeMap, 31 kCubeMap,
31 kExternalOES, 32 kExternalOES,
32 kRectangleARB, 33 kRectangleARB,
33 kNumDefaultTextures 34 kNumDefaultTextures
34 }; 35 };
35 36
36 // Info about Textures currently in the system. 37 // Info about Textures currently in the system.
37 class TextureInfo : public base::RefCounted<TextureInfo> { 38 class GPU_EXPORT TextureInfo : public base::RefCounted<TextureInfo> {
38 public: 39 public:
39 typedef scoped_refptr<TextureInfo> Ref; 40 typedef scoped_refptr<TextureInfo> Ref;
40 41
41 TextureInfo(TextureManager* manager, GLuint service_id) 42 TextureInfo(TextureManager* manager, GLuint service_id)
42 : manager_(manager), 43 : manager_(manager),
43 service_id_(service_id), 44 service_id_(service_id),
44 deleted_(false), 45 deleted_(false),
45 cleared_(true), 46 cleared_(true),
46 num_uncleared_mips_(0), 47 num_uncleared_mips_(0),
47 target_(0), 48 target_(0),
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // The default textures for each target (texture name = 0) 551 // The default textures for each target (texture name = 0)
551 TextureInfo::Ref default_textures_[kNumDefaultTextures]; 552 TextureInfo::Ref default_textures_[kNumDefaultTextures];
552 553
553 DISALLOW_COPY_AND_ASSIGN(TextureManager); 554 DISALLOW_COPY_AND_ASSIGN(TextureManager);
554 }; 555 };
555 556
556 } // namespace gles2 557 } // namespace gles2
557 } // namespace gpu 558 } // namespace gpu
558 559
559 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_ 560 #endif // GPU_COMMAND_BUFFER_SERVICE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_translator.h ('k') | gpu/command_buffer/service/vertex_attrib_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698