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

Side by Side Diff: ui/gfx/gl/gl_share_group.h

Issue 7659015: Revert 96982 - Add gl.dll, compositor.dll, and surface.dll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « ui/gfx/gl/gl_interface.h ('k') | ui/gfx/gl/gl_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 UI_GFX_GL_GL_SHARE_GROUP_H_ 5 #ifndef UI_GFX_GL_GL_SHARE_GROUP_H_
6 #define UI_GFX_GL_GL_SHARE_GROUP_H_ 6 #define UI_GFX_GL_GL_SHARE_GROUP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "ui/gfx/gl/gl_export.h"
14 13
15 namespace gfx { 14 namespace gfx {
16 15
17 class GLContext; 16 class GLContext;
18 17
19 // A group of GL contexts that share an ID namespace. 18 // A group of GL contexts that share an ID namespace.
20 class GL_EXPORT GLShareGroup : public base::RefCounted<GLShareGroup> { 19 class GLShareGroup : public base::RefCounted<GLShareGroup> {
21 public: 20 public:
22 GLShareGroup(); 21 GLShareGroup();
23 22
24 // These two should only be called from the constructor and destructor of 23 // These two should only be called from the constructor and destructor of
25 // GLContext. 24 // GLContext.
26 void AddContext(GLContext* context); 25 void AddContext(GLContext* context);
27 void RemoveContext(GLContext* context); 26 void RemoveContext(GLContext* context);
28 27
29 // Returns a handle to any initialized context in the share group or NULL if 28 // Returns a handle to any initialized context in the share group or NULL if
30 // there are no initialized contexts in the share group. 29 // there are no initialized contexts in the share group.
31 void* GetHandle(); 30 void* GetHandle();
32 31
33 private: 32 private:
34 friend class base::RefCounted<GLShareGroup>; 33 friend class base::RefCounted<GLShareGroup>;
35 ~GLShareGroup(); 34 ~GLShareGroup();
36 35
37 // References to GLContext are by raw pointer to avoid a reference count 36 // References to GLContext are by raw pointer to avoid a reference count
38 // cycle. 37 // cycle.
39 typedef std::set<GLContext*> ContextSet; 38 typedef std::set<GLContext*> ContextSet;
40 ContextSet contexts_; 39 ContextSet contexts_;
41 DISALLOW_COPY_AND_ASSIGN(GLShareGroup); 40 DISALLOW_COPY_AND_ASSIGN(GLShareGroup);
42 }; 41 };
43 42
44 } // namespace gfx 43 } // namespace gfx
45 44
46 #endif // UI_GFX_GL_GL_SHARE_GROUP_H_ 45 #endif // UI_GFX_GL_GL_SHARE_GROUP_H_
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_interface.h ('k') | ui/gfx/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698