[Texmap] Layers and tiles appear to have missing pixels in their right/bottom borders
authornoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Feb 2012 01:15:15 +0000 (01:15 +0000)
committernoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Feb 2012 01:15:15 +0000 (01:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78961

The relativeSize member should point to one pixel before the edge, since it's used
by glVertexAttribPointer, which takes edge points and not sizes.

Reviewed by Kenneth Rohde Christiansen.

No new funcionality.

* platform/graphics/opengl/TextureMapperGL.cpp:
(WebCore::BitmapTextureGL::didReset):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108273 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp

index 9d19c89..100f4ba 100644 (file)
@@ -1,3 +1,18 @@
+2012-02-20  No'am Rosenthal  <noam.rosenthal@nokia.com>
+
+        [Texmap] Layers and tiles appear to have missing pixels in their right/bottom borders
+        https://bugs.webkit.org/show_bug.cgi?id=78961
+
+        The relativeSize member should point to one pixel before the edge, since it's used
+        by glVertexAttribPointer, which takes edge points and not sizes.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        No new funcionality.
+
+        * platform/graphics/opengl/TextureMapperGL.cpp:
+        (WebCore::BitmapTextureGL::didReset):
+
 2012-02-20  Kihong Kwon  <kihong.kwon@samsung.com>
 
         Add a new API for the Vibration API(W3C).
index f0a4a3b..390e4a8 100644 (file)
@@ -617,7 +617,9 @@ void BitmapTextureGL::didReset()
         GL_CMD(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE))
         GL_CMD(glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_textureSize.width(), m_textureSize.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, 0))
     }
-    m_relativeSize = FloatSize(float(contentSize().width()) / m_textureSize.width(), float(contentSize().height()) / m_textureSize.height());
+
+    // We decrease the size by one, since this is used as rectangle coordinates and not as size.
+    m_relativeSize = FloatSize(float(contentSize().width() - 1) / m_textureSize.width(), float(contentSize().height() - 1) / m_textureSize.height());
     m_surfaceNeedsReset = true;
 }