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

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

Issue 1325433003: command_buffer: Add support for creating non-WebGL ES 3 contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing hunk Created 5 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_CONTEXT_GROUP_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
7 7
8 #include <vector> 8 #include <vector>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "gpu/command_buffer/common/constants.h" 14 #include "gpu/command_buffer/common/constants.h"
15 #include "gpu/command_buffer/common/gles2_cmd_format.h" 15 #include "gpu/command_buffer/common/gles2_cmd_format.h"
16 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
16 #include "gpu/command_buffer/service/feature_info.h" 17 #include "gpu/command_buffer/service/feature_info.h"
17 #include "gpu/command_buffer/service/framebuffer_completeness_cache.h" 18 #include "gpu/command_buffer/service/framebuffer_completeness_cache.h"
18 #include "gpu/command_buffer/service/shader_translator_cache.h" 19 #include "gpu/command_buffer/service/shader_translator_cache.h"
19 #include "gpu/gpu_export.h" 20 #include "gpu/gpu_export.h"
20 21
21 namespace gpu { 22 namespace gpu {
22 23
23 class TransferBufferManager; 24 class TransferBufferManager;
24 class ValueStateMap; 25 class ValueStateMap;
25 26
(...skipping 11 matching lines...) Expand all
37 class TextureManager; 38 class TextureManager;
38 class SubscriptionRefSet; 39 class SubscriptionRefSet;
39 class ValuebufferManager; 40 class ValuebufferManager;
40 class MemoryTracker; 41 class MemoryTracker;
41 struct DisallowedFeatures; 42 struct DisallowedFeatures;
42 43
43 // A Context Group helps manage multiple GLES2Decoders that share 44 // A Context Group helps manage multiple GLES2Decoders that share
44 // resources. 45 // resources.
45 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { 46 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
46 public: 47 public:
47 enum ContextType {
48 CONTEXT_TYPE_WEBGL1,
49 CONTEXT_TYPE_WEBGL2,
50 CONTEXT_TYPE_OTHER,
51 CONTEXT_TYPE_UNDEFINED
52 };
53
54 static ContextType GetContextType(unsigned webgl_version);
55
56 ContextGroup( 48 ContextGroup(
57 const scoped_refptr<MailboxManager>& mailbox_manager, 49 const scoped_refptr<MailboxManager>& mailbox_manager,
58 const scoped_refptr<MemoryTracker>& memory_tracker, 50 const scoped_refptr<MemoryTracker>& memory_tracker,
59 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, 51 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
60 const scoped_refptr<FramebufferCompletenessCache>& 52 const scoped_refptr<FramebufferCompletenessCache>&
61 framebuffer_completeness_cache, 53 framebuffer_completeness_cache,
62 const scoped_refptr<FeatureInfo>& feature_info, 54 const scoped_refptr<FeatureInfo>& feature_info,
63 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set, 55 const scoped_refptr<SubscriptionRefSet>& subscription_ref_set,
64 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state, 56 const scoped_refptr<ValueStateMap>& pending_valuebuffer_state,
65 bool bind_generates_resource); 57 bool bind_generates_resource);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 303
312 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 304 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
313 }; 305 };
314 306
315 } // namespace gles2 307 } // namespace gles2
316 } // namespace gpu 308 } // namespace gpu
317 309
318 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 310 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
319 311
320 312
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_utils.cc ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698