Chromium Code Reviews| Index: ui/gfx/compositor/compositor_gl.cc |
| diff --git a/ui/gfx/compositor/compositor_gl.cc b/ui/gfx/compositor/compositor_gl.cc |
| index ee1a38d994c861e7ece04cd0a7bc28e0fa1efff0..36320b283e1aab5f94655421a32214f7f17c7c97 100644 |
| --- a/ui/gfx/compositor/compositor_gl.cc |
| +++ b/ui/gfx/compositor/compositor_gl.cc |
| @@ -14,6 +14,7 @@ |
| #include "third_party/skia/include/core/SkMatrix.h" |
| #include "third_party/skia/include/core/SkRect.h" |
| #include "third_party/skia/include/core/SkScalar.h" |
|
jonathan.backer
2011/09/06 12:25:37
probably need to #include <X11/Xlib.h> --- must be
sadrul
2011/09/06 13:51:44
Done.
|
| +#include "ui/base/x/x11_util.h" |
| #include "ui/gfx/rect.h" |
| #include "ui/gfx/transform.h" |
| #include "ui/gfx/gl/gl_bindings.h" |
| @@ -444,6 +445,7 @@ void TextureGL::DrawInternal(const ui::TextureProgramGL& program, |
| CompositorGL::CompositorGL(gfx::AcceleratedWidget widget, |
| const gfx::Size& size) |
| : Compositor(size), |
| + widget_(widget), |
| started_(false) { |
| gl_surface_ = gfx::GLSurface::CreateViewGLSurface(false, widget); |
| gl_context_ = SharedResources::GetInstance()-> |
| @@ -494,8 +496,19 @@ void CompositorGL::Blur(const gfx::Rect& bounds) { |
| } |
| void CompositorGL::SchedulePaint() { |
| - // TODO: X doesn't provide coalescing of regions, its left to the toolkit. |
| - NOTIMPLEMENTED(); |
| + Display* display = ui::GetXDisplay(); |
| + XEvent event; |
| + event.xexpose.type = Expose; |
| + event.xexpose.serial = XNextRequest(display); |
| + event.xexpose.send_event = true; |
| + event.xexpose.display = display; |
| + event.xexpose.window = widget_; |
| + event.xexpose.x = 0; |
| + event.xexpose.y = 0; |
| + event.xexpose.width = size().width(); |
| + event.xexpose.height = size().height(); |
| + event.xexpose.count = 0; |
| + XSendEvent(display, widget_, true, ExposureMask, &event); |
| } |
| // static |