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

Unified Diff: ui/gl/scoped_cgl.h

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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gpu_switching_manager.cc ('k') | ui/gl/scoped_cgl.cc » ('j') | 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
deleted file mode 100644
index 81e1e6ea36068c9fddd99123d5a9ac3733e6aa6e..0000000000000000000000000000000000000000
--- a/ui/gl/scoped_cgl.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_GL_SCOPED_CGL_H_
-#define UI_GL_SCOPED_CGL_H_
-
-#include <OpenGL/OpenGL.h>
-
-#include "base/mac/scoped_typeref.h"
-#include "ui/gl/gl_export.h"
-
-namespace base {
-
-template<>
-struct ScopedTypeRefTraits<CGLContextObj> {
- static void Retain(CGLContextObj object) {
- CGLRetainContext(object);
- }
- static void Release(CGLContextObj object) {
- CGLReleaseContext(object);
- }
-};
-
-template<>
-struct ScopedTypeRefTraits<CGLPixelFormatObj> {
- static void Retain(CGLPixelFormatObj object) {
- CGLRetainPixelFormat(object);
- }
- static void Release(CGLPixelFormatObj object) {
- CGLReleasePixelFormat(object);
- }
-};
-
-} // namespace base
-
-namespace gfx {
-
-class GL_EXPORT ScopedCGLSetCurrentContext {
- public:
- explicit ScopedCGLSetCurrentContext(CGLContextObj context);
- ~ScopedCGLSetCurrentContext();
- private:
- // Note that if a context is destroyed when it is current, then the current
- // context is changed to NULL. Take out a reference on |previous_context_| to
- // preserve this behavior (when this falls out of scope, |previous_context_|
- // will be made current, then released, so NULL will be current if that
- // release destroys the context).
- base::ScopedTypeRef<CGLContextObj> previous_context_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedCGLSetCurrentContext);
-};
-
-} // namespace gfx
-
-#endif // UI_GL_SCOPED_CGL_H_
« no previous file with comments | « ui/gl/gpu_switching_manager.cc ('k') | ui/gl/scoped_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698