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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 2764853002: gl: Remove redundant methods/variables from GLSurfaceFormat (Closed)
Patch Set: Replaced format.IsDefault() check with format.IsCompatible(GLSurfaceFormat()) Created 3 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 | « no previous file | ui/gl/gl_surface_format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 9196ca0b094fb5621a4fc78e7efec853cd56b91f..497c0e61b054de278c0b5755fd15c53de56512f3 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -271,7 +271,7 @@ bool ValidateEglConfig(EGLDisplay display,
return true;
}
-EGLConfig ChooseConfig(GLSurfaceFormat format) {
+EGLConfig ChooseConfig(GLSurfaceFormat format, bool surfaceless) {
// Choose an EGL configuration.
// On X this is only used for PBuffer surfaces.
@@ -299,9 +299,8 @@ EGLConfig ChooseConfig(GLSurfaceFormat format) {
}
#endif
- EGLint surface_type = (format.IsSurfaceless()
- ? EGL_DONT_CARE
- : EGL_WINDOW_BIT | EGL_PBUFFER_BIT);
+ EGLint surface_type =
+ (surfaceless ? EGL_DONT_CARE : EGL_WINDOW_BIT | EGL_PBUFFER_BIT);
for (auto renderable_type : renderable_types) {
EGLint config_attribs_8888[] = {EGL_BUFFER_SIZE,
@@ -495,7 +494,7 @@ EGLDisplay GLSurfaceEGL::GetDisplay() {
EGLConfig GLSurfaceEGL::GetConfig() {
if (!config_) {
- config_ = ChooseConfig(format_);
+ config_ = ChooseConfig(format_, IsSurfaceless());
}
return config_;
}
@@ -1201,14 +1200,9 @@ PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
Destroy();
}
-SurfacelessEGL::SurfacelessEGL(const gfx::Size& size)
- : size_(size) {
- format_ = GLSurfaceFormat();
- format_.SetIsSurfaceless();
-}
+SurfacelessEGL::SurfacelessEGL(const gfx::Size& size) : size_(size) {}
bool SurfacelessEGL::Initialize(GLSurfaceFormat format) {
- format.SetIsSurfaceless();
format_ = format;
return true;
}
« no previous file with comments | « no previous file | ui/gl/gl_surface_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698