Bug 103261

Summary: REGRESSION(134887) [Qt][EFL][WK2] Repaint counter not working
Product: WebKit Reporter: Kenneth Rohde Christiansen <kenneth>
Component: WebKit2Assignee: Kenneth Rohde Christiansen <kenneth>
Status: RESOLVED FIXED    
Severity: Normal CC: jesus, laszlo.gombos, lucas.de.marchi, noam, ostap73, tmpsantos, zeno
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 103105    
Attachments:
Description Flags
Patch none

Description Kenneth Rohde Christiansen 2012-11-26 08:32:52 PST
when running with [QT_]WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS=1 a repaint counter is shown.

This shown 1, then next time 10, then next time 100, etc... This is because it cannot reuse texture between 1 and 10 and 100 and 1000, etc.

The following fixes it, but something must be wrong with the texture pool, or elsewhere.

--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
@@ -376,7 +376,8 @@ void TextureMapperGL::drawRepaintCounter(int value, int pointSize, const FloatPo
     IntRect sourceRect(IntPoint::zero(), size);
     IntRect targetRect(roundedIntPoint(targetPoint), size);
 
-    RefPtr<BitmapTexture> texture = acquireTextureFromPool(size);
+    RefPtr<BitmapTexture> texture = createTexture();
+    texture->reset(size);
Comment 1 Kenneth Rohde Christiansen 2012-11-26 10:03:00 PST
wrong bug :/
Comment 2 Noam Rosenthal 2012-11-27 01:47:43 PST
MY guess is that it's not about reusing texture 2-9, but rather that it thinks it only works once the required texture changes size, which is what naturally happens when the counter goes from 9 to 10.
Comment 3 Kenneth Rohde Christiansen 2012-11-27 02:24:51 PST
Created attachment 176209 [details]
Patch
Comment 4 Kenneth Rohde Christiansen 2012-11-27 02:28:53 PST
Landed in 135839, reviewed on irc.
Comment 5 Simon Hausmann 2012-11-29 00:16:00 PST
Comment on attachment 176209 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=176209&action=review

> Source/WebCore/ChangeLog:12
> +        This method obviosly needs to bind the texture.

"obviosly" -> "obviously" ;-)
Comment 6 Simon Hausmann 2012-11-29 00:17:08 PST
Comment on attachment 176209 [details]
Patch

Ooops, clearing review, to make it disappear from the review queue.