Demos (master): egl: Follow the rules of propagating changes for tfp.
Chia-I Wu
olv at kemper.freedesktop.org
Sat Oct 30 17:37:50 UTC 2010
Module: Demos
Branch: master
Commit: f84d2225208b9ccb0f4f027d72fa75bb25439920
URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=f84d2225208b9ccb0f4f027d72fa75bb25439920
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Sun Oct 31 01:33:24 2010 +0800
egl: Follow the rules of propagating changes for tfp.
No difference is observed, but it only makes sense this way.
---
src/egl/opengles1/texture_from_pixmap.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/egl/opengles1/texture_from_pixmap.c b/src/egl/opengles1/texture_from_pixmap.c
index 8e7e803..cecf4fe 100644
--- a/src/egl/opengles1/texture_from_pixmap.c
+++ b/src/egl/opengles1/texture_from_pixmap.c
@@ -152,12 +152,23 @@ app_redraw(struct app_data *data)
{
/* pixmap has changed */
if (data->reshape || data->paint.active) {
+ /*
+ * The extension only states that
+ *
+ * If an application specifies an EGLImage sibling as the destination
+ * for rendering and/or pixel download operations (e.g., as an
+ * OpenGL-ES framebuffer object, glTexSubImage2D, etc.), the modified
+ * image results will be observed by all EGLImage siblings in all
+ * client API contexts.
+ *
+ * Though not required by the drivers I tested, I think the rules of
+ * "Propagating Changes to Objects" should apply here. That is, the
+ * changes made by the native engine must be completed and the resource
+ * must be re-attached.
+ */
eglWaitNative(EGL_CORE_NATIVE_ENGINE);
-
- if (data->reshape) {
- data->glEGLImageTargetTexture2DOES(GL_TEXTURE_2D,
- (GLeglImageOES) data->img);
- }
+ data->glEGLImageTargetTexture2DOES(GL_TEXTURE_2D,
+ (GLeglImageOES) data->img);
}
XCopyArea(data->xdpy, data->pix, data->canvas, data->fg,
More information about the mesa-commit
mailing list