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

Side by Side Diff: ui/gfx/gl/gl_context_egl.cc

Issue 6990051: Unix ifdefs patch for ui/ and webkit/ (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: removed some too general ifdefs and ppapi changes Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gfx/gl/gl_context_egl.h" 5 #include "ui/gfx/gl/gl_context_egl.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/angle/include/EGL/egl.h" 10 #include "third_party/angle/include/EGL/egl.h"
11 #include "ui/gfx/gl/gl_surface_egl.h" 11 #include "ui/gfx/gl/gl_surface_egl.h"
12 #include "ui/gfx/gl/egl_util.h" 12 #include "ui/gfx/gl/egl_util.h"
13 13
14 // This header must come after the above third-party include, as 14 // This header must come after the above third-party include, as
15 // it brings in #defines that cause conflicts. 15 // it brings in #defines that cause conflicts.
16 #include "ui/gfx/gl/gl_bindings.h" 16 #include "ui/gfx/gl/gl_bindings.h"
17 17
18 #if defined(OS_LINUX) 18 #if defined(USE_X11)
19 extern "C" { 19 extern "C" {
20 #include <X11/Xlib.h> 20 #include <X11/Xlib.h>
21 } 21 }
22 #endif 22 #endif
23 23
24 namespace gfx { 24 namespace gfx {
25 25
26 std::string GLContextEGL::GetExtensions() { 26 std::string GLContextEGL::GetExtensions() {
27 const char* extensions = eglQueryString(GLSurfaceEGL::GetDisplay(), 27 const char* extensions = eglQueryString(GLSurfaceEGL::GetDisplay(),
28 EGL_EXTENSIONS); 28 EGL_EXTENSIONS);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 void GLContextEGL::SetSwapInterval(int interval) { 124 void GLContextEGL::SetSwapInterval(int interval) {
125 DCHECK(IsCurrent(NULL)); 125 DCHECK(IsCurrent(NULL));
126 if (!eglSwapInterval(GLSurfaceEGL::GetDisplay(), interval)) { 126 if (!eglSwapInterval(GLSurfaceEGL::GetDisplay(), interval)) {
127 LOG(ERROR) << "eglSwapInterval failed with error " 127 LOG(ERROR) << "eglSwapInterval failed with error "
128 << GetLastEGLErrorString(); 128 << GetLastEGLErrorString();
129 } 129 }
130 } 130 }
131 131
132 } // namespace gfx 132 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698