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

Unified Diff: ui/gl/gl_surface_glx.h

Issue 1723303002: Implement GLX for Ozone X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use #define Created 4 years, 3 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 | « ui/gl/BUILD.gn ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_glx.h
diff --git a/ui/gl/gl_surface_glx.h b/ui/gl/gl_surface_glx.h
index 2d5a4945e5fa2b8b74a5b61997ff31c439957368..29e45e0b03dc7176a2bcfa0355366849275148ff 100644
--- a/ui/gl/gl_surface_glx.h
+++ b/ui/gl/gl_surface_glx.h
@@ -7,11 +7,11 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/vsync_provider.h"
@@ -54,8 +54,7 @@ class GL_EXPORT GLSurfaceGLX : public GLSurface {
};
// A surface used to render to a view.
-class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX,
- public ui::PlatformEventDispatcher {
+class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX {
public:
explicit NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window);
@@ -77,14 +76,22 @@ class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX,
protected:
~NativeViewGLSurfaceGLX() override;
+ // Handle registering and unregistering for Expose events.
+ virtual void RegisterEvents() = 0;
+ virtual void UnregisterEvents() = 0;
+
+ // Forwards Expose event to child window.
+ void ForwardExposeEvent(XEvent* xevent);
+
+ // Checks if event is Expose for child window.
+ bool CanHandleEvent(XEvent* xevent);
+
+ gfx::AcceleratedWidget window() const { return window_; }
+
private:
// The handle for the drawable to make current or swap.
GLXDrawable GetDrawableHandle() const;
- // PlatformEventDispatcher implementation
- bool CanDispatchEvent(const ui::PlatformEvent& event) override;
- uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
-
// Window passed in at creation. Always valid.
gfx::AcceleratedWidget parent_window_;
« no previous file with comments | « ui/gl/BUILD.gn ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698