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

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

Issue 12383042: Switch all contexts in a share group to be on the same screen as the window they present to. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « ui/gl/gl_context_cgl.cc ('k') | ui/gl/gl_share_group.cc » ('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) 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 UI_GL_GL_SHARE_GROUP_H_ 5 #ifndef UI_GL_GL_SHARE_GROUP_H_
6 #define UI_GL_GL_SHARE_GROUP_H_ 6 #define UI_GL_GL_SHARE_GROUP_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // Returns a pointer to any initialized context in the share group 32 // Returns a pointer to any initialized context in the share group
33 // or NULL if there are no initialized contexts in the share group. 33 // or NULL if there are no initialized contexts in the share group.
34 GLContext* GetContext(); 34 GLContext* GetContext();
35 35
36 // Sets and returns the unique shared GL context. Used for context 36 // Sets and returns the unique shared GL context. Used for context
37 // virtualization. 37 // virtualization.
38 void SetSharedContext(GLContext* context); 38 void SetSharedContext(GLContext* context);
39 GLContext* GetSharedContext(); 39 GLContext* GetSharedContext();
40 40
41 #if defined(OS_MACOSX)
42 // Sets and returns the ID of the renderer that all contexts in this share
43 // group should be on.
44 void SetRendererID(int renderer_id);
45 int GetRendererID();
46 #endif
47
41 private: 48 private:
42 friend class base::RefCounted<GLShareGroup>; 49 friend class base::RefCounted<GLShareGroup>;
43 50
44 ~GLShareGroup(); 51 ~GLShareGroup();
45 52
46 // References to GLContext are by raw pointer to avoid a reference count 53 // References to GLContext are by raw pointer to avoid a reference count
47 // cycle. 54 // cycle.
48 typedef std::set<GLContext*> ContextSet; 55 typedef std::set<GLContext*> ContextSet;
49 ContextSet contexts_; 56 ContextSet contexts_;
50 57
51 GLContext* shared_context_; 58 GLContext* shared_context_;
52 59
60 #if defined(OS_MACOSX)
61 int renderer_id_;
62 #endif
63
53 DISALLOW_COPY_AND_ASSIGN(GLShareGroup); 64 DISALLOW_COPY_AND_ASSIGN(GLShareGroup);
54 }; 65 };
55 66
56 } // namespace gfx 67 } // namespace gfx
57 68
58 #endif // UI_GL_GL_SHARE_GROUP_H_ 69 #endif // UI_GL_GL_SHARE_GROUP_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_context_cgl.cc ('k') | ui/gl/gl_share_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698