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

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

Issue 1652873002: Android: Use virtualized context only for those with compatible config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 10 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
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/command_line.h" 7 #include "base/command_line.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 "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 }; 51 };
52 const EGLint kContextRobustnessAttributes[] = { 52 const EGLint kContextRobustnessAttributes[] = {
53 EGL_CONTEXT_CLIENT_VERSION, context_client_version, 53 EGL_CONTEXT_CLIENT_VERSION, context_client_version,
54 EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT, 54 EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
55 EGL_LOSE_CONTEXT_ON_RESET_EXT, 55 EGL_LOSE_CONTEXT_ON_RESET_EXT,
56 EGL_NONE 56 EGL_NONE
57 }; 57 };
58 58
59 display_ = compatible_surface->GetDisplay(); 59 display_ = compatible_surface->GetDisplay();
60 config_ = compatible_surface->GetConfig(); 60 config_ = compatible_surface->GetConfig();
61 format_ = compatible_surface->GetFormat();
61 62
62 const EGLint* context_attributes = nullptr; 63 const EGLint* context_attributes = nullptr;
63 if (GLSurfaceEGL::IsCreateContextRobustnessSupported()) { 64 if (GLSurfaceEGL::IsCreateContextRobustnessSupported()) {
64 DVLOG(1) << "EGL_EXT_create_context_robustness supported."; 65 DVLOG(1) << "EGL_EXT_create_context_robustness supported.";
65 context_attributes = kContextRobustnessAttributes; 66 context_attributes = kContextRobustnessAttributes;
66 } else { 67 } else {
67 // At some point we should require the presence of the robustness 68 // At some point we should require the presence of the robustness
68 // extension and remove this code path. 69 // extension and remove this code path.
69 DVLOG(1) << "EGL_EXT_create_context_robustness NOT supported."; 70 DVLOG(1) << "EGL_EXT_create_context_robustness NOT supported.";
70 context_attributes = kContextAttributes; 71 context_attributes = kContextAttributes;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 211
211 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() { 212 bool GLContextEGL::WasAllocatedUsingRobustnessExtension() {
212 return GLSurfaceEGL::IsCreateContextRobustnessSupported(); 213 return GLSurfaceEGL::IsCreateContextRobustnessSupported();
213 } 214 }
214 215
215 GLContextEGL::~GLContextEGL() { 216 GLContextEGL::~GLContextEGL() {
216 Destroy(); 217 Destroy();
217 } 218 }
218 219
219 } // namespace gfx 220 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698