Title: [123588] trunk/Source/WebCore
- Revision
- 123588
- Author
- zeno.albis...@nokia.com
- Date
- 2012-07-25 01:35:59 -0700 (Wed, 25 Jul 2012)
Log Message
[Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
https://bugs.webkit.org/show_bug.cgi?id=92159
Disable CopyToTexture feature for GraphicsSurface on Mac.
While this is actually working, it is currently used for Tiles
that are single buffered, and therefore requires a call to glFlush.
This call blocks the GPU for about 40ms which would make smooth animations impossible.
Reviewed by Noam Rosenthal.
* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
(WebCore::GraphicsSurface::platformCreate):
(WebCore::GraphicsSurface::platformImport):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (123587 => 123588)
--- trunk/Source/WebCore/ChangeLog 2012-07-25 08:30:00 UTC (rev 123587)
+++ trunk/Source/WebCore/ChangeLog 2012-07-25 08:35:59 UTC (rev 123588)
@@ -1,3 +1,19 @@
+2012-07-25 Zeno Albisser <z...@webkit.org>
+
+ [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
+ https://bugs.webkit.org/show_bug.cgi?id=92159
+
+ Disable CopyToTexture feature for GraphicsSurface on Mac.
+ While this is actually working, it is currently used for Tiles
+ that are single buffered, and therefore requires a call to glFlush.
+ This call blocks the GPU for about 40ms which would make smooth animations impossible.
+
+ Reviewed by Noam Rosenthal.
+
+ * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
+ (WebCore::GraphicsSurface::platformCreate):
+ (WebCore::GraphicsSurface::platformImport):
+
2012-07-25 Kenichi Ishibashi <ba...@chromium.org>
[Chromium] Fix up includes in HarfBuzzNGFace.h
Modified: trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp (123587 => 123588)
--- trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp 2012-07-25 08:30:00 UTC (rev 123587)
+++ trunk/Source/WebCore/platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp 2012-07-25 08:35:59 UTC (rev 123588)
@@ -122,6 +122,12 @@
PassRefPtr<GraphicsSurface> GraphicsSurface::platformCreate(const IntSize& size, Flags flags)
{
+ // We currently disable support for CopyToTexture on Mac, because this is used for single buffered Tiles.
+ // The single buffered nature of this requires a call to glFlush, as described in platformCopyToTexture.
+ // This call blocks the GPU for about 40ms, which makes smooth animations impossible.
+ if (flags & SupportsCopyToTexture)
+ return PassRefPtr<GraphicsSurface>();
+
unsigned pixelFormat = 'BGRA';
unsigned bytesPerElement = 4;
int width = size.width();
@@ -165,6 +171,12 @@
PassRefPtr<GraphicsSurface> GraphicsSurface::platformImport(const IntSize& size, Flags flags, uint32_t token)
{
+ // We currently disable support for CopyToTexture on Mac, because this is used for single buffered Tiles.
+ // The single buffered nature of this requires a call to glFlush, as described in platformCopyToTexture.
+ // This call blocks the GPU for about 40ms, which makes smooth animations impossible.
+ if (flags & SupportsCopyToTexture)
+ return PassRefPtr<GraphicsSurface>();
+
RefPtr<GraphicsSurface> surface = adoptRef(new GraphicsSurface(size, flags));
surface->m_platformSurface = IOSurfaceLookup(token);
if (!surface->m_platformSurface)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes