Changeset 65020 in webkit
- Timestamp:
- Aug 9, 2010 5:25:18 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r65019 r65020 1 2010-08-09 Nat Duca <nduca@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 [chromium] Blue line visible at the right hand side of the window with accelerated compositor 6 https://bugs.webkit.org/show_bug.cgi?id=43748 7 8 Correct the ortho projection matrix for the root layer, which was 9 too large by 0.5px in both width and height. For even view sizes, 10 this would cause the viewport to appear 1 pixel too small. 11 12 Fixing this requires removal of several 0.5 correction factors 13 that were previously added to compensate for the too-large viewport. 14 15 Finally, compute the translation for the root layer quad using 16 floating point rather than integer arithmetic. This avoids us losing 17 a key half-pixel of translation when the width of the window is odd. 18 19 To test, size window to even/odd dimensions. No blue line should be visible. 20 21 * platform/graphics/chromium/LayerRendererChromium.cpp: 22 (WebCore::LayerRendererChromium::drawLayers): 23 1 24 2010-08-09 Ryosuke Niwa <rniwa@webkit.org> 2 25 -
trunk/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
r64870 r65020 334 334 m_rootLayerTextureHeight = visibleRect.height(); 335 335 336 m_projectionMatrix = orthoMatrix(0, visibleRectWidth + 0.5, visibleRectHeight + 0.5, 0, -1000, 1000);336 m_projectionMatrix = orthoMatrix(0, visibleRectWidth, visibleRectHeight, 0, -1000, 1000); 337 337 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_rootLayerTextureWidth, m_rootLayerTextureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); 338 338 … … 392 392 #endif 393 393 394 scrolledLayerMatrix.translate3d((int)floorf(0.5 * visibleRect.width() + 0.5) - scrollDelta.x(),395 (int)floorf(0.5 * visibleRect.height() + 0.5) + scaleFactor * scrollDelta.y(), 0);394 scrolledLayerMatrix.translate3d((int)floorf(0.5 * visibleRect.width()) - scrollDelta.x(), 395 (int)floorf(0.5 * visibleRect.height()) + scaleFactor * scrollDelta.y(), 0); 396 396 scrolledLayerMatrix.scale3d(1, -1, 1); 397 397 … … 458 458 checkGLError(); 459 459 TransformationMatrix layerMatrix; 460 layerMatrix.translate3d(visibleRect.width() / 2, visibleRect.height() / 2, 0);460 layerMatrix.translate3d(visibleRect.width() * 0.5f, visibleRect.height() * 0.5f, 0); 461 461 drawTexturedQuad(layerMatrix, visibleRect.width(), visibleRect.height(), 1); 462 462 checkGLError();
Note: See TracChangeset
for help on using the changeset viewer.