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

Side by Side Diff: ui/gl/gl_surface_egl_x11.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/gl/gl_surface_egl.cc ('k') | ui/gl/init/gl_factory_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_surface_egl_x11.h" 5 #include "ui/gl/gl_surface_egl_x11.h"
6 6
7 #include "ui/events/platform/platform_event_source.h" 7 #include "ui/events/platform/platform_event_source.h"
8 #include "ui/gl/egl_util.h" 8 #include "ui/gl/egl_util.h"
9 9
10 extern "C" { 10 extern "C" {
11 #include <X11/Xlib.h> 11 #include <X11/Xlib.h>
12 } 12 }
13 13
14 using ui::GetLastEGLErrorString; 14 using ui::GetLastEGLErrorString;
15 using ui::PlatformEvent; 15 using ui::PlatformEvent;
16 using ui::PlatformEventSource; 16 using ui::PlatformEventSource;
17 17
18 namespace gl { 18 namespace gl {
19 19
20 NativeViewGLSurfaceEGLX11::NativeViewGLSurfaceEGLX11(EGLNativeWindowType window) 20 NativeViewGLSurfaceEGLX11::NativeViewGLSurfaceEGLX11(EGLNativeWindowType window)
21 : NativeViewGLSurfaceEGL(0), 21 : NativeViewGLSurfaceEGL(0, nullptr), parent_window_(window) {}
22 parent_window_(window) {
23 }
24 22
25 bool NativeViewGLSurfaceEGLX11::InitializeNativeWindow() { 23 bool NativeViewGLSurfaceEGLX11::InitializeNativeWindow() {
26 Display* x11_display = GetNativeDisplay(); 24 Display* x11_display = GetNativeDisplay();
27 XWindowAttributes attributes; 25 XWindowAttributes attributes;
28 if (!XGetWindowAttributes(x11_display, parent_window_, &attributes)) { 26 if (!XGetWindowAttributes(x11_display, parent_window_, &attributes)) {
29 LOG(ERROR) << "XGetWindowAttributes failed for window " << parent_window_ 27 LOG(ERROR) << "XGetWindowAttributes failed for window " << parent_window_
30 << "."; 28 << ".";
31 return false; 29 return false;
32 } 30 }
33 31
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 XSendEvent(x11_display, parent_window_, False, ExposureMask, &x_event); 169 XSendEvent(x11_display, parent_window_, False, ExposureMask, &x_event);
172 XFlush(x11_display); 170 XFlush(x11_display);
173 return ui::POST_DISPATCH_STOP_PROPAGATION; 171 return ui::POST_DISPATCH_STOP_PROPAGATION;
174 } 172 }
175 173
176 NativeViewGLSurfaceEGLX11::~NativeViewGLSurfaceEGLX11() { 174 NativeViewGLSurfaceEGLX11::~NativeViewGLSurfaceEGLX11() {
177 Destroy(); 175 Destroy();
178 } 176 }
179 177
180 } // namespace gl 178 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/gl/init/gl_factory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698