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

Unified Diff: ui/gl/scoped_cgl.h

Issue 1551943002: Rewrite most of the scopers in //base/mac to use ScopedTypeRef or ScopedGeneric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS Created 5 years 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 side-by-side diff with in-line comments
Download patch
« base/mac/scoped_typeref.h ('K') | « ui/accelerated_widget_mac/display_link_mac.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/scoped_cgl.h
diff --git a/ui/gl/scoped_cgl.h b/ui/gl/scoped_cgl.h
index 071b65872166cd0f1f3be6656aab6b82f07bbe5c..860a7568c1d16b191b3e766f15498f481ad0f501 100644
--- a/ui/gl/scoped_cgl.h
+++ b/ui/gl/scoped_cgl.h
@@ -16,8 +16,8 @@ namespace base {
template<>
struct ScopedTypeRefTraits<CGLContextObj> {
static CGLContextObj InvalidValue() { return nullptr; }
- static void Retain(CGLContextObj object) {
- CGLRetainContext(object);
+ static CGLContextObj Retain(CGLContextObj object) {
+ return CGLRetainContext(object);
}
static void Release(CGLContextObj object) {
CGLReleaseContext(object);
@@ -27,8 +27,8 @@ struct ScopedTypeRefTraits<CGLContextObj> {
template<>
struct ScopedTypeRefTraits<CGLPixelFormatObj> {
static CGLPixelFormatObj InvalidValue() { return nullptr; }
- static void Retain(CGLPixelFormatObj object) {
- CGLRetainPixelFormat(object);
+ static CGLPixelFormatObj Retain(CGLPixelFormatObj object) {
+ return CGLRetainPixelFormat(object);
}
static void Release(CGLPixelFormatObj object) {
CGLReleasePixelFormat(object);
« base/mac/scoped_typeref.h ('K') | « ui/accelerated_widget_mac/display_link_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698