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

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

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gl/gl_context_egl.h" 5 #include "ui/gl/gl_context_egl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.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 "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 21 matching lines...) Expand all
32 unbind_fbo_on_makecurrent_(false) { 32 unbind_fbo_on_makecurrent_(false) {
33 } 33 }
34 34
35 bool GLContextEGL::Initialize( 35 bool GLContextEGL::Initialize(
36 GLSurface* compatible_surface, GpuPreference gpu_preference) { 36 GLSurface* compatible_surface, GpuPreference gpu_preference) {
37 DCHECK(compatible_surface); 37 DCHECK(compatible_surface);
38 DCHECK(!context_); 38 DCHECK(!context_);
39 39
40 static const EGLint kContextAttributes[] = { 40 static const EGLint kContextAttributes[] = {
41 EGL_CONTEXT_CLIENT_VERSION, 2, 41 EGL_CONTEXT_CLIENT_VERSION, 2,
42 #if defined(USE_NATIVE_SURFACE_LINUX)
43 EGL_CONTEXT_PRIORITY_LEVEL_IMG, EGL_CONTEXT_PRIORITY_HIGH_IMG,
44 #endif
42 EGL_NONE 45 EGL_NONE
43 }; 46 };
44 static const EGLint kContextRobustnessAttributes[] = { 47 static const EGLint kContextRobustnessAttributes[] = {
45 EGL_CONTEXT_CLIENT_VERSION, 2, 48 EGL_CONTEXT_CLIENT_VERSION, 2,
46 EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT, 49 EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
47 EGL_LOSE_CONTEXT_ON_RESET_EXT, 50 EGL_LOSE_CONTEXT_ON_RESET_EXT,
48 EGL_NONE 51 EGL_NONE
49 }; 52 };
50 53
51 display_ = compatible_surface->GetDisplay(); 54 display_ = compatible_surface->GetDisplay();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 195
193 #if !defined(OS_ANDROID) 196 #if !defined(OS_ANDROID)
194 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) { 197 bool GLContextEGL::GetTotalGpuMemory(size_t* bytes) {
195 DCHECK(bytes); 198 DCHECK(bytes);
196 *bytes = 0; 199 *bytes = 0;
197 return false; 200 return false;
198 } 201 }
199 #endif 202 #endif
200 203
201 } // namespace gfx 204 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698