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

Side by Side Diff: ui/ozone/platform/x11/x11_surface_factory.cc

Issue 2801163002: Deletes NativeViewGLSurfaceEGL::Initialize(gfx::VSyncProvider). (Closed)
Patch Set: fixes DirectCompositionSurfaceTest Created 3 years, 8 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
« no previous file with comments | « ui/ozone/platform/wayland/gl_surface_wayland.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ozone/platform/x11/x11_surface_factory.h" 5 #include "ui/ozone/platform/x11/x11_surface_factory.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "third_party/khronos/EGL/egl.h" 10 #include "third_party/khronos/EGL/egl.h"
(...skipping 20 matching lines...) Expand all
31 float scale_factor, 31 float scale_factor,
32 bool has_alpha) override; 32 bool has_alpha) override;
33 33
34 private: 34 private:
35 ~GLSurfaceEGLOzoneX11() override; 35 ~GLSurfaceEGLOzoneX11() override;
36 36
37 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGLOzoneX11); 37 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGLOzoneX11);
38 }; 38 };
39 39
40 GLSurfaceEGLOzoneX11::GLSurfaceEGLOzoneX11(EGLNativeWindowType window) 40 GLSurfaceEGLOzoneX11::GLSurfaceEGLOzoneX11(EGLNativeWindowType window)
41 : NativeViewGLSurfaceEGL(window) {} 41 : NativeViewGLSurfaceEGL(window, nullptr) {}
42 42
43 EGLConfig GLSurfaceEGLOzoneX11::GetConfig() { 43 EGLConfig GLSurfaceEGLOzoneX11::GetConfig() {
44 // Try matching the window depth with an alpha channel, because we're worried 44 // Try matching the window depth with an alpha channel, because we're worried
45 // the destination alpha width could constrain blending precision. 45 // the destination alpha width could constrain blending precision.
46 const int kBufferSizeOffset = 1; 46 const int kBufferSizeOffset = 1;
47 const int kAlphaSizeOffset = 3; 47 const int kAlphaSizeOffset = 3;
48 EGLint config_attribs[] = {EGL_BUFFER_SIZE, 48 EGLint config_attribs[] = {EGL_BUFFER_SIZE,
49 ~0, // To be replaced. 49 ~0, // To be replaced.
50 EGL_ALPHA_SIZE, 50 EGL_ALPHA_SIZE,
51 8, 51 8,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 case gl::kGLImplementationEGLGLES2: 173 case gl::kGLImplementationEGLGLES2:
174 return egl_implementation_.get(); 174 return egl_implementation_.get();
175 case gl::kGLImplementationOSMesaGL: 175 case gl::kGLImplementationOSMesaGL:
176 return osmesa_implementation_.get(); 176 return osmesa_implementation_.get();
177 default: 177 default:
178 return nullptr; 178 return nullptr;
179 } 179 }
180 } 180 }
181 181
182 } // namespace ui 182 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/gl_surface_wayland.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698