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

Unified Diff: ui/gfx/compositor/compositor_gl.cc

Issue 7770002: gfx::Compositor: SchedulePaint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/gfx/compositor/compositor_gl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/gfx/compositor/compositor_gl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698