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

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

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 8 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_share_group.h ('k') | ui/gl/gl_surface_egl.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) 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 #include "ui/gl/gl_share_group.h" 5 #include "ui/gl/gl_share_group.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/gl/gl_context.h" 8 #include "ui/gl/gl_context.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 11
12 GLShareGroup::GLShareGroup() 12 GLShareGroup::GLShareGroup() : shared_context_(NULL) {
13 : shared_context_(NULL)
14 #if defined(OS_MACOSX)
15 , renderer_id_(-1)
16 #endif
17 {
18 } 13 }
19 14
20 void GLShareGroup::AddContext(GLContext* context) { 15 void GLShareGroup::AddContext(GLContext* context) {
21 contexts_.insert(context); 16 contexts_.insert(context);
22 } 17 }
23 18
24 void GLShareGroup::RemoveContext(GLContext* context) { 19 void GLShareGroup::RemoveContext(GLContext* context) {
25 contexts_.erase(context); 20 contexts_.erase(context);
26 if (shared_context_ == context) 21 if (shared_context_ == context)
27 shared_context_ = NULL; 22 shared_context_ = NULL;
(...skipping 20 matching lines...) Expand all
48 43
49 void GLShareGroup::SetSharedContext(GLContext* context) { 44 void GLShareGroup::SetSharedContext(GLContext* context) {
50 DCHECK(contexts_.find(context) != contexts_.end()); 45 DCHECK(contexts_.find(context) != contexts_.end());
51 shared_context_ = context; 46 shared_context_ = context;
52 } 47 }
53 48
54 GLContext* GLShareGroup::GetSharedContext() { 49 GLContext* GLShareGroup::GetSharedContext() {
55 return shared_context_; 50 return shared_context_;
56 } 51 }
57 52
58 #if defined(OS_MACOSX)
59 void GLShareGroup::SetRendererID(int renderer_id) {
60 renderer_id_ = renderer_id;
61 }
62
63 int GLShareGroup::GetRendererID() {
64 return renderer_id_;
65 }
66 #endif
67
68 GLShareGroup::~GLShareGroup() { 53 GLShareGroup::~GLShareGroup() {
69 } 54 }
70 55
71 } // namespace gfx 56 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_share_group.h ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698