summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-03-29 09:09:39 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-29 09:09:39 (GMT)
commita73af692412630e9a25ae1ddb403413f3d8a1de6 (patch)
tree21ba754816f65e1f6077060483ad6dc60a43154c /src/openvg
parent269b61dd08b7e37445f40e3a1d0854bcf85f445b (diff)
downloadQt-a73af692412630e9a25ae1ddb403413f3d8a1de6.zip
Qt-a73af692412630e9a25ae1ddb403413f3d8a1de6.tar.gz
Qt-a73af692412630e9a25ae1ddb403413f3d8a1de6.tar.bz2
Added WindowSurfaceFeature enum to QWindowSurface.
Now that we've added hasPreservedContents() it's cleaner to convert the various features to feature flags, which is also more extensible in case more flags are needed in the future. Reviewed-by: Bjørn Erik Nilsen
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qwindowsurface_vg.cpp7
-rw-r--r--src/openvg/qwindowsurface_vg_p.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp
index 6f99de4..eedfea5 100644
--- a/src/openvg/qwindowsurface_vg.cpp
+++ b/src/openvg/qwindowsurface_vg.cpp
@@ -119,9 +119,12 @@ QPaintEngine *QVGWindowSurface::paintEngine() const
return d_ptr->paintEngine();
}
-bool QVGWindowSurface::hasStaticContentsSupport() const
+QWindowSurface::WindowSurfaceFeatures QVGWindowSurface::features() const
{
- d_ptr->supportsStaticContents();
+ WindowSurfaceFeatures features = PartialUpdates | PreservedContents;
+ if (d_ptr->supportsStaticContents())
+ features |= StaticContents;
+ return features;
}
int QVGWindowSurface::metric(PaintDeviceMetric met) const
diff --git a/src/openvg/qwindowsurface_vg_p.h b/src/openvg/qwindowsurface_vg_p.h
index 2d6b4f9..d63d077 100644
--- a/src/openvg/qwindowsurface_vg_p.h
+++ b/src/openvg/qwindowsurface_vg_p.h
@@ -78,7 +78,7 @@ public:
QPaintEngine *paintEngine() const;
- bool hasStaticContentsSupport() const;
+ WindowSurfaceFeatures features() const;
protected:
int metric(PaintDeviceMetric metric) const;