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

Unified Diff: ui/gl/scoped_cgl.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, 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/scoped_cgl.h ('k') | ui/platform_window/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/scoped_cgl.cc
diff --git a/ui/gl/scoped_cgl.cc b/ui/gl/scoped_cgl.cc
deleted file mode 100644
index 18eb9808de1dcef969ad43dedd7509954c6549fd..0000000000000000000000000000000000000000
--- a/ui/gl/scoped_cgl.cc
+++ /dev/null
@@ -1,27 +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.
-
-#include "base/logging.h"
-#include "ui/gl/scoped_cgl.h"
-
-namespace gfx {
-
-ScopedCGLSetCurrentContext::ScopedCGLSetCurrentContext(CGLContextObj context) {
- CGLContextObj previous_context = CGLGetCurrentContext();
- // It is possible for the previous context to have a zero reference count,
- // because making a context current does not increment the reference count.
- // In that case, do not restore the previous context.
- if (previous_context && CGLGetContextRetainCount(previous_context)) {
- previous_context_.reset(previous_context, base::scoped_policy::RETAIN);
- }
- CGLError error = CGLSetCurrentContext(context);
- DCHECK_EQ(error, kCGLNoError) << "CGLSetCurrentContext should never fail";
-}
-
-ScopedCGLSetCurrentContext::~ScopedCGLSetCurrentContext() {
- CGLError error = CGLSetCurrentContext(previous_context_);
- DCHECK_EQ(error, kCGLNoError) << "CGLSetCurrentContext should never fail";
-}
-
-} // namespace gfx
« no previous file with comments | « ui/gl/scoped_cgl.h ('k') | ui/platform_window/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698