Index: gpu/command_buffer/service/context_group.h |
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h |
index 95cd4be2a92b9bc20c29d0fc0246c1a8ef97f8c6..5226aa10d6979643a41d48c5c737b263b52f5f96 100644 |
--- a/gpu/command_buffer/service/context_group.h |
+++ b/gpu/command_buffer/service/context_group.h |
@@ -44,6 +44,15 @@ struct DisallowedFeatures; |
// resources. |
class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
public: |
+ enum ContextType { |
+ kContextTypeWebGL1, |
piman
2015/06/09 02:19:37
nit: CONTEXT_TYPE_WEBGL1 etc. per style guide.
Zhenyao Mo
2015/06/09 03:50:23
Actually the new style guide prefers the constant
|
+ kContextTypeWebGL2, |
+ kContextTypeOther, |
+ kContextTypeUndefined |
+ }; |
+ |
+ static ContextType GetContextType(unsigned webgl_version); |
+ |
ContextGroup( |
const scoped_refptr<MailboxManager>& mailbox_manager, |
const scoped_refptr<MemoryTracker>& memory_tracker, |
@@ -57,6 +66,7 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
// call to destroy if it succeeds. |
bool Initialize( |
GLES2Decoder* decoder, |
+ ContextType context_type, |
const DisallowedFeatures& disallowed_features); |
// Destroys all the resources when called for the last context in the group. |
@@ -249,6 +259,8 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v); |
bool HaveContexts(); |
+ ContextType context_type_; |
+ |
scoped_refptr<MailboxManager> mailbox_manager_; |
scoped_refptr<MemoryTracker> memory_tracker_; |
scoped_refptr<ShaderTranslatorCache> shader_translator_cache_; |