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

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

Issue 1545113002: Switch to standard integer types in ui/gl/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/scoped_binders.h ('k') | ui/gl/scoped_make_current.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SCOPED_CGL_H_ 5 #ifndef UI_GL_SCOPED_CGL_H_
6 #define UI_GL_SCOPED_CGL_H_ 6 #define UI_GL_SCOPED_CGL_H_
7 7
8 #include <OpenGL/OpenGL.h> 8 #include <OpenGL/OpenGL.h>
9 9
10 #include "base/mac/scoped_typeref.h" 10 #include "base/mac/scoped_typeref.h"
11 #include "base/macros.h"
11 #include "ui/gl/gl_export.h" 12 #include "ui/gl/gl_export.h"
12 13
13 namespace base { 14 namespace base {
14 15
15 template<> 16 template<>
16 struct ScopedTypeRefTraits<CGLContextObj> { 17 struct ScopedTypeRefTraits<CGLContextObj> {
17 static CGLContextObj InvalidValue() { return nullptr; } 18 static CGLContextObj InvalidValue() { return nullptr; }
18 static void Retain(CGLContextObj object) { 19 static void Retain(CGLContextObj object) {
19 CGLRetainContext(object); 20 CGLRetainContext(object);
20 } 21 }
(...skipping 28 matching lines...) Expand all
49 // will be made current, then released, so NULL will be current if that 50 // will be made current, then released, so NULL will be current if that
50 // release destroys the context). 51 // release destroys the context).
51 base::ScopedTypeRef<CGLContextObj> previous_context_; 52 base::ScopedTypeRef<CGLContextObj> previous_context_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(ScopedCGLSetCurrentContext); 54 DISALLOW_COPY_AND_ASSIGN(ScopedCGLSetCurrentContext);
54 }; 55 };
55 56
56 } // namespace gfx 57 } // namespace gfx
57 58
58 #endif // UI_GL_SCOPED_CGL_H_ 59 #endif // UI_GL_SCOPED_CGL_H_
OLDNEW
« no previous file with comments | « ui/gl/scoped_binders.h ('k') | ui/gl/scoped_make_current.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698