From a3107ab7b4fc5af9983e30647ee7b6a19df46a59 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Fri, 18 Feb 2011 15:54:32 -0800 Subject: Fix some of the performance issues when using the flash plugin embedded. What happened was that MediaLayer was always telling us to repaint the screen; we could repaint the same frame a dozen of times unecessarily. This in itself was wasteful but should have been ok, but the stream of commands plus the compositing caused the GPU commands used by flash to stall until they were executed... The compounded impact drasticaly lowered the performances. This is not a full fix as those conditions (us repainting the screen a lot) happens anyway when zooming or scrolling; but this should improve performances in the general case. Change-Id: I3391c2c5a5198a73863ace53bc10f623cdc00921 --- WebCore/platform/graphics/android/MediaLayer.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'WebCore/platform/graphics/android/MediaLayer.cpp') diff --git a/WebCore/platform/graphics/android/MediaLayer.cpp b/WebCore/platform/graphics/android/MediaLayer.cpp index ad4fc76..d8bbefc 100644 --- a/WebCore/platform/graphics/android/MediaLayer.cpp +++ b/WebCore/platform/graphics/android/MediaLayer.cpp @@ -78,8 +78,6 @@ bool MediaLayer::drawGL(SkMatrix& matrix) // draw any video content if present m_videoTexture->drawVideo(drawTransform()); - bool needsInval = true; - // draw the primary content if (m_bufferedTexture) { TextureInfo* textureInfo = m_bufferedTexture->consumerLock(); @@ -103,14 +101,11 @@ bool MediaLayer::drawGL(SkMatrix& matrix) textureInfo->m_textureId, 1.0f, forceBlending); } - - if (!rect.isEmpty()) - needsInval = false; } m_bufferedTexture->consumerRelease(); } - return drawChildrenGL(matrix) || needsInval; + return drawChildrenGL(matrix); } ANativeWindow* MediaLayer::acquireNativeWindowForVideo() -- cgit v1.1