Chromium Code Reviews| Index: ui/gl/gl_surface_egl.cc |
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
| index 081ffa546ee58e12e5a4c559e22b1043c24b4691..61fe2117c85573bec064f657e86f1cc8769f5d32 100644 |
| --- a/ui/gl/gl_surface_egl.cc |
| +++ b/ui/gl/gl_surface_egl.cc |
| @@ -16,6 +16,7 @@ |
| #include "base/message_loop/message_loop.h" |
| #include "base/metrics/histogram_macros.h" |
| #include "base/strings/string_number_conversions.h" |
| +#include "base/sys_info.h" |
| #include "base/trace_event/trace_event.h" |
| #include "build/build_config.h" |
| #include "ui/gfx/geometry/rect.h" |
| @@ -436,8 +437,8 @@ void GetEGLInitDisplays(bool supports_angle_d3d, |
| } |
| GLSurfaceEGL::GLSurfaceEGL() : |
| - config_(nullptr), |
| - format_(SURFACE_DEFAULT) {} |
| + GLSurface(), |
| + config_(nullptr) {} |
| bool GLSurfaceEGL::InitializeOneOff() { |
| static bool initialized = false; |
| @@ -539,6 +540,10 @@ bool GLSurfaceEGL::IsDirectCompositionSupported() { |
| return g_use_direct_composition; |
| } |
| +GLSurface::Format GLSurfaceEGL::GetDefaultFormat() const { |
| + return base::SysInfo::IsLowEndDevice() ? SURFACE_RGB565 : SURFACE_ARGB8888; |
|
no sievers
2016/02/18 20:19:45
wherever we override this, it needs #ifdef ANDROID
Jinsuk Kim
2016/02/19 01:04:40
Done. Moved it to PbufferGLSurafceEGL::Initialize(
|
| +} |
| + |
| GLSurfaceEGL::~GLSurfaceEGL() {} |
| // InitializeDisplay is necessary because the static binding code |
| @@ -619,10 +624,6 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(EGLNativeWindowType window) |
| #endif |
| } |
| -bool NativeViewGLSurfaceEGL::Initialize() { |
| - return Initialize(SURFACE_DEFAULT); |
| -} |
| - |
| bool NativeViewGLSurfaceEGL::Initialize(GLSurface::Format format) { |
| format_ = format; |
| return Initialize(nullptr); |