summaryrefslogtreecommitdiffstats
path: root/src/openvg/qwindowsurface_vgegl.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-30 05:24:51 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-30 05:24:51 (GMT)
commit46eec6d54bad7a686b3dd5cd6e4aa8577d38740d (patch)
treee4c828d1d1456b3fafe74a339562263b3f2c156d /src/openvg/qwindowsurface_vgegl.cpp
parentd85d7addc5084ee7d5de31dec562437f9c31c35d (diff)
parentd788c0127b86d8245aa0a8e2472562f444d98ee9 (diff)
downloadQt-46eec6d54bad7a686b3dd5cd6e4aa8577d38740d.zip
Qt-46eec6d54bad7a686b3dd5cd6e4aa8577d38740d.tar.gz
Qt-46eec6d54bad7a686b3dd5cd6e4aa8577d38740d.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/qml/qmlcomponentjs.cpp src/declarative/qml/qmlcomponentjs_p.h src/declarative/qml/qmlcomponentjs_p_p.h
Diffstat (limited to 'src/openvg/qwindowsurface_vgegl.cpp')
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index d622c1f..103f84d 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -101,18 +101,6 @@ QImage::Format qt_vg_config_to_image_format(QEglContext *context)
return argbFormat; // XXX
}
-static void copySubImage(QImage *image, VGImage vgImage, const QRect& rect)
-{
- vgGetImageSubData
- (vgImage,
- image->bits() + rect.bottom() * image->bytesPerLine() +
- rect.x() * (image->depth() / 8),
- -(image->bytesPerLine()),
- qt_vg_image_to_vg_format(image->format()),
- rect.x(), (image->height() - 1) - rect.bottom(),
- rect.width(), rect.height());
-}
-
#if !defined(QVG_NO_SINGLE_CONTEXT)
class QVGSharedContext
@@ -336,20 +324,6 @@ QVGEGLWindowSurfacePrivate::~QVGEGLWindowSurfacePrivate()
destroyPaintEngine();
}
-QVGEGLWindowSurfacePrivate *QVGEGLWindowSurfacePrivate::create
- (SurfaceType type, QWindowSurface *win)
-{
-#if defined(QVG_VGIMAGE_BACKBUFFERS)
- if (type == VGImageSurface)
- return new QVGEGLWindowSurfaceVGImage(win);
- else if (type == QImageSurface)
- return new QVGEGLWindowSurfaceQImage(win);
-#endif
- if (type == WindowSurface)
- return new QVGEGLWindowSurfaceDirect(win);
- return 0;
-}
-
QVGPaintEngine *QVGEGLWindowSurfacePrivate::paintEngine()
{
if (!engine)
@@ -514,39 +488,6 @@ EGLSurface QVGEGLWindowSurfaceVGImage::mainSurface() const
return qt_vg_shared_surface();
}
-QVGEGLWindowSurfaceQImage::QVGEGLWindowSurfaceQImage(QWindowSurface *win)
- : QVGEGLWindowSurfaceVGImage(win)
-{
-}
-
-QVGEGLWindowSurfaceQImage::~QVGEGLWindowSurfaceQImage()
-{
-}
-
-void QVGEGLWindowSurfaceQImage::endPaint
- (QWidget *widget, const QRegion& region, QImage *image)
-{
- QEglContext *context = ensureContext(widget);
- if (context) {
- if (backBufferSurface != EGL_NO_SURFACE) {
- if (isPaintingActive)
- vgFlush();
- context->makeCurrent(mainSurface());
- QRegion rgn = region.intersected
- (QRect(0, 0, image->width(), image->height()));
- if (rgn.numRects() == 1) {
- copySubImage(image, backBuffer, rgn.boundingRect());
- } else {
- QVector<QRect> rects = rgn.rects();
- for (int index = 0; index < rects.size(); ++index)
- copySubImage(image, backBuffer, rects[index]);
- }
- context->lazyDoneCurrent();
- }
- isPaintingActive = false;
- }
-}
-
#endif // QVG_VGIMAGE_BACKBUFFERS
QVGEGLWindowSurfaceDirect::QVGEGLWindowSurfaceDirect(QWindowSurface *win)