summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-25 14:13:51 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-11-25 14:13:51 +1000
commit5b5c098bda20cab7825207640cc69230c1864586 (patch)
treeade0f2de0b9da54f7899dc67ad7f1a18f6d3686f /src/openvg
parent410ed81027232e669bf6a28699fa833e56a27ef7 (diff)
Make QVGCompositionHelper::blitWindow() more generic
Previously, the composition helper would use the VG window surface private structure to get the VGImage to blit. This change passes the VGImage and size values in directly so that the composition helper can also be used to blit GL surfaces that have been converted into a VGImage via an EGLImage. Reviewed-by: Tom Cooksey
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qpaintengine_vg.cpp7
-rw-r--r--src/openvg/qvgcompositionhelper_p.h4
2 files changed, 4 insertions, 7 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index fda4b10400..ba97d4fe15 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3459,14 +3459,11 @@ void QVGCompositionHelper::endCompositing()
}
void QVGCompositionHelper::blitWindow
- (QVGEGLWindowSurfacePrivate *surface, const QRect& rect,
- const QPoint& topLeft, int opacity)
+ (VGImage image, const QSize& imageSize,
+ const QRect& rect, const QPoint& topLeft, int opacity)
{
- // Get the VGImage that is acting as a back buffer for the window.
- VGImage image = surface->surfaceImage();
if (image == VG_INVALID_HANDLE)
return;
- QSize imageSize = surface->surfaceSize();
// Determine which sub rectangle of the window to draw.
QRect sr = rect.translated(-topLeft);
diff --git a/src/openvg/qvgcompositionhelper_p.h b/src/openvg/qvgcompositionhelper_p.h
index 3afe31e5ee..ed24e73c93 100644
--- a/src/openvg/qvgcompositionhelper_p.h
+++ b/src/openvg/qvgcompositionhelper_p.h
@@ -71,8 +71,8 @@ public:
void startCompositing(const QSize& screenSize);
void endCompositing();
- void blitWindow(QVGEGLWindowSurfacePrivate *surface, const QRect& rect,
- const QPoint& topLeft, int opacity);
+ void blitWindow(VGImage image, const QSize& imageSize,
+ const QRect& rect, const QPoint& topLeft, int opacity);
void fillBackground(const QRegion& region, const QBrush& brush);
void drawCursorPixmap(const QPixmap& pixmap, const QPoint& offset);
void setScissor(const QRegion& region);