Diff
Modified: trunk/Source/WebCore/ChangeLog (134670 => 134671)
--- trunk/Source/WebCore/ChangeLog 2012-11-14 22:25:49 UTC (rev 134670)
+++ trunk/Source/WebCore/ChangeLog 2012-11-14 22:29:34 UTC (rev 134671)
@@ -1,3 +1,25 @@
+2012-11-14 Viatcheslav Ostapenko <v.ostape...@samsung.com>
+
+ [EFL][WK2] White flicker when scrolling big pages with dark background on slower hardware.
+ https://bugs.webkit.org/show_bug.cgi?id=102000
+
+ Reviewed by Noam Rosenthal.
+
+ Add helper functions to clear viewport before painting. Those functions
+ used by EFL Webkit2 port to set view background to match page background
+ in order to reduce visibility of flicker during scrolling/scaling/repainting
+ where page tiles are not ready.
+
+ * platform/graphics/texmap/TextureMapper.h:
+ * platform/graphics/texmap/TextureMapperGL.cpp:
+ (WebCore::TextureMapperGL::drawSolidColor):
+ (WebCore):
+ * platform/graphics/texmap/TextureMapperGL.h:
+ * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
+ (WebCore::TextureMapperImageBuffer::drawSolidColor):
+ (WebCore):
+ * platform/graphics/texmap/TextureMapperImageBuffer.h:
+
2012-11-14 Mark Lam <mark....@apple.com>
Fixed regressions due to adding JSEventListener::m_wrapper null checks.
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h (134670 => 134671)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h 2012-11-14 22:25:49 UTC (rev 134670)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h 2012-11-14 22:29:34 UTC (rev 134671)
@@ -130,6 +130,7 @@
virtual void drawBorder(const Color&, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) = 0;
virtual void drawRepaintCounter(int value, int pointSize, const FloatPoint&, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) = 0;
virtual void drawTexture(const BitmapTexture&, const FloatRect& target, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0f, const BitmapTexture* maskTexture = 0, unsigned exposedEdges = AllEdges) = 0;
+ virtual void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&) = 0;
// makes a surface the target for the following drawTexture calls.
virtual void bindSurface(BitmapTexture* surface) = 0;
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (134670 => 134671)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2012-11-14 22:25:49 UTC (rev 134670)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp 2012-11-14 22:29:34 UTC (rev 134671)
@@ -419,6 +419,18 @@
drawTexturedQuadWithProgram(program.get(), texture, flags, targetRect, modelViewMatrix, opacity, maskTexture);
}
+void TextureMapperGL::drawSolidColor(const FloatRect& rect, const TransformationMatrix& matrix, const Color& color)
+{
+ RefPtr<TextureMapperShaderProgram> program = data().sharedGLData().textureMapperShaderManager.getShaderProgram(TextureMapperShaderManager::SolidColor);
+ m_context3D->useProgram(program->programID());
+
+ float r, g, b, a;
+ color.getRGBA(r, g, b, a);
+ m_context3D->uniform4f(program->colorLocation(), r, g, b, a);
+
+ drawQuad(rect, matrix, program.get(), GraphicsContext3D::TRIANGLE_FAN, false);
+}
+
static TransformationMatrix viewportMatrix(GraphicsContext3D* context3D)
{
GC3Dint viewport[4];
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h (134670 => 134671)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h 2012-11-14 22:25:49 UTC (rev 134670)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h 2012-11-14 22:29:34 UTC (rev 134671)
@@ -52,6 +52,7 @@
virtual void drawRepaintCounter(int value, int pointSize, const FloatPoint&, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE;
virtual void drawTexture(const BitmapTexture&, const FloatRect&, const TransformationMatrix&, float opacity, const BitmapTexture* maskTexture, unsigned exposedEdges) OVERRIDE;
virtual void drawTexture(uint32_t texture, Flags, const IntSize& textureSize, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix, float opacity, const BitmapTexture* maskTexture, unsigned exposedEdges = AllEdges);
+ virtual void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&) OVERRIDE;
#if !USE(TEXMAP_OPENGL_ES_2)
virtual void drawTextureRectangleARB(uint32_t texture, Flags, const IntSize& textureSize, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix, float opacity, const BitmapTexture* maskTexture);
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp (134670 => 134671)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp 2012-11-14 22:25:49 UTC (rev 134670)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp 2012-11-14 22:29:34 UTC (rev 134671)
@@ -125,6 +125,23 @@
context->restore();
}
+void TextureMapperImageBuffer::drawSolidColor(const FloatRect& rect, const TransformationMatrix& matrix, const Color& color)
+{
+ GraphicsContext* context = currentContext();
+ if (!context)
+ return;
+
+ context->save();
+#if ENABLE(3D_RENDERING)
+ context->concat3DTransform(matrix);
+#else
+ context->concatCTM(matrix.toAffineTransform());
+#endif
+
+ context->fillRect(rect, color, ColorSpaceDeviceRGB);
+ context->restore();
+}
+
#if ENABLE(CSS_FILTERS)
PassRefPtr<BitmapTexture> BitmapTextureImageBuffer::applyFilters(TextureMapper*, const BitmapTexture& contentTexture, const FilterOperations& filters)
{
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h (134670 => 134671)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h 2012-11-14 22:25:49 UTC (rev 134670)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h 2012-11-14 22:29:34 UTC (rev 134671)
@@ -61,6 +61,7 @@
UNUSED_PARAM(modelViewMatrix);
};
virtual void drawTexture(const BitmapTexture&, const FloatRect& targetRect, const TransformationMatrix&, float opacity, const BitmapTexture* maskTexture, unsigned exposedEdges) OVERRIDE;
+ virtual void drawSolidColor(const FloatRect&, const TransformationMatrix&, const Color&) OVERRIDE;
virtual void beginClip(const TransformationMatrix&, const FloatRect&) OVERRIDE;
virtual void bindSurface(BitmapTexture* surface) OVERRIDE { m_currentSurface = surface;}
virtual void endClip() OVERRIDE { graphicsContext()->restore(); }