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

Unified Diff: ui/gl/gl_surface_egl.h

Issue 1480333002: egl/x11: Created a child window to control resizes and prevent flashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « AUTHORS ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.h
diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
index 8fb84a08003fedf5ef6cc01be500e5b8e406524b..d501db635d1082656a30735c0898df9c4f5986d4 100644
--- a/ui/gl/gl_surface_egl.h
+++ b/ui/gl/gl_surface_egl.h
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/time/time.h"
+#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_bindings.h"
@@ -71,7 +72,8 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface {
};
// Encapsulates an EGL surface bound to a view.
-class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
+class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL,
+ public ui::PlatformEventDispatcher {
public:
explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window);
@@ -103,6 +105,10 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
EGLNativeWindowType window_;
+#if defined(USE_X11)
+ EGLNativeWindowType parent_window_;
+#endif
+
void OnSetSwapInterval(int interval) override;
private:
@@ -125,6 +131,11 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
#endif
DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL);
+
+ private:
+ // PlatformEventDispatcher implementation.
+ bool CanDispatchEvent(const ui::PlatformEvent& event) override;
+ uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
piman 2015/11/30 22:07:44 nit: keep these in the existing private: section.
};
// Encapsulates a pbuffer EGL surface.
@@ -180,6 +191,16 @@ class GL_EXPORT SurfacelessEGL : public GLSurfaceEGL {
DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL);
};
+#if !defined(USE_X11)
+// PlatformEventDispatcher implementation.
+bool NativeViewGLSurfaceEGL::CanDispatchEvent(const ui::PlatformEvent&) {
+ return false;
+}
+uint32_t NativeViewGLSurfaceEGL::DispatchEvent(const ui::PlatformEvent&) {
+ return ui::POST_DISPATCH_NONE;
+}
+#endif
piman 2015/11/30 22:07:44 nit: move these to the .cc file. Another option i
+
} // namespace gfx
#endif // UI_GL_GL_SURFACE_EGL_H_
« no previous file with comments | « AUTHORS ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698