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

Unified Diff: ui/gl/init/gl_factory_android.cc

Issue 2497503004: Revert of Refactor context creation parameters into a struct. (Closed)
Patch Set: Created 4 years, 1 month 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/init/gl_factory.h ('k') | ui/gl/init/gl_factory_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory_android.cc
diff --git a/ui/gl/init/gl_factory_android.cc b/ui/gl/init/gl_factory_android.cc
index dbab9b003175e488e2714f66cb86b2fc041049bc..739684693278773940a04d4a09e44bbed2f920b8 100644
--- a/ui/gl/init/gl_factory_android.cc
+++ b/ui/gl/init/gl_factory_android.cc
@@ -33,7 +33,7 @@
// Implement GLContext.
bool Initialize(GLSurface* compatible_surface,
- const GLContextAttribs& attribs) override;
+ GpuPreference gpu_preference) override;
bool MakeCurrent(GLSurface* surface) override;
void ReleaseCurrent(GLSurface* surface) override {}
bool IsCurrent(GLSurface* surface) override { return true; }
@@ -54,7 +54,7 @@
: GLContextReal(share_group), display_(nullptr) {}
bool GLNonOwnedContext::Initialize(GLSurface* compatible_surface,
- const GLContextAttribs& attribs) {
+ GpuPreference gpu_preference) {
display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
return true;
}
@@ -94,21 +94,21 @@
scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
GLSurface* compatible_surface,
- const GLContextAttribs& attribs) {
+ GpuPreference gpu_preference) {
TRACE_EVENT0("gpu", "gl::init::CreateGLContext");
switch (GetGLImplementation()) {
case kGLImplementationMockGL:
return scoped_refptr<GLContext>(new GLContextStub(share_group));
case kGLImplementationOSMesaGL:
return InitializeGLContext(new GLContextOSMesa(share_group),
- compatible_surface, attribs);
+ compatible_surface, gpu_preference);
default:
if (compatible_surface->GetHandle()) {
return InitializeGLContext(new GLContextEGL(share_group),
- compatible_surface, attribs);
+ compatible_surface, gpu_preference);
} else {
return InitializeGLContext(new GLNonOwnedContext(share_group),
- compatible_surface, attribs);
+ compatible_surface, gpu_preference);
}
}
}
« no previous file with comments | « ui/gl/init/gl_factory.h ('k') | ui/gl/init/gl_factory_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698