Changeset 148200 in webkit
- Timestamp:
- Apr 11, 2013 7:28:00 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148199 r148200 1 2013-04-11 Arvid Nilsson <anilsson@rim.com> 2 3 [BlackBerry] Accelerated compositing debug rectangle incorrectly drawn for layers with surfaces 4 https://bugs.webkit.org/show_bug.cgi?id=114275 5 6 Reviewed by Carlos Garcia Campos. 7 8 The drawDebugBorder method was updated to mirror the logic in 9 compositeLayersRecursive, i.e. if we're compositing a surface to the 10 screen, use the transformed bounds stored in the surface. The bounds 11 stored in the layer should only be used when drawing the layer to the 12 surface. 13 14 Speaking of which, also update the code to skip border drawing when 15 drawing a layer to a surface. Drawing the borders inside the surface 16 would only result in messing up the surface contents, especially when 17 CSS filters like blur were the reason for having a surface in the first 18 place - the border would be blurred and hard to discern. 19 20 Only manually testable, the debug border is disabled during layout 21 tests. 22 23 PR 323746 24 25 * platform/graphics/blackberry/LayerRenderer.cpp: 26 (WebCore::LayerRenderer::drawDebugBorder): 27 * platform/graphics/blackberry/LayerRendererSurface.cpp: 28 (WebCore::LayerRendererSurface::drawRect): 29 (WebCore::LayerRendererSurface::transformedBounds): Added. 30 (WebCore): 31 * platform/graphics/blackberry/LayerRendererSurface.h: 32 (LayerRendererSurface): 33 1 34 2013-04-11 Arvid Nilsson <anilsson@rim.com> 2 35 -
trunk/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp
r148192 r148200 596 596 glDisable(GL_BLEND); 597 597 598 // If we're rendering to a surface, don't include debug border inside the surface. 599 if (m_currentLayerRendererSurface) 600 return; 601 602 FloatQuad transformedBounds; 603 if (layerAlreadyOnSurface(layer)) 604 transformedBounds = layer->layerRendererSurface()->transformedBounds(); 605 else 606 transformedBounds = layer->getTransformedBounds(); 607 598 608 const GLES2Program& program = useProgram(ColorProgram); 599 glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, & layer->getTransformedBounds());609 glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &transformedBounds); 600 610 glUniform4f(m_colorColorLocation, borderColor.red() / 255.0, borderColor.green() / 255.0, borderColor.blue() / 255.0, 1); 601 611 -
trunk/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.cpp
r144465 r148200 51 51 float by = m_size.height() / 2.0; 52 52 53 FloatQuad transformedBounds; 54 transformedBounds.setP1(m_drawTransform.mapPoint(FloatPoint(-bx, -by))); 55 transformedBounds.setP2(m_drawTransform.mapPoint(FloatPoint(-bx, by))); 56 transformedBounds.setP3(m_drawTransform.mapPoint(FloatPoint(bx, by))); 57 transformedBounds.setP4(m_drawTransform.mapPoint(FloatPoint(bx, -by))); 58 59 FloatRect rect = transformedBounds.boundingBox(); 53 FloatRect rect = transformedBounds().boundingBox(); 60 54 61 55 if (m_ownerLayer->replicaLayer()) { … … 69 63 70 64 return rect; 65 } 66 67 FloatQuad LayerRendererSurface::transformedBounds() const 68 { 69 float bx = m_size.width() / 2.0; 70 float by = m_size.height() / 2.0; 71 72 FloatQuad bounds; 73 bounds.setP1(m_drawTransform.mapPoint(FloatPoint(-bx, -by))); 74 bounds.setP2(m_drawTransform.mapPoint(FloatPoint(-bx, by))); 75 bounds.setP3(m_drawTransform.mapPoint(FloatPoint(bx, by))); 76 bounds.setP4(m_drawTransform.mapPoint(FloatPoint(bx, -by))); 77 78 return bounds; 71 79 } 72 80 -
trunk/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h
r148129 r148200 52 52 53 53 FloatRect drawRect() const; 54 FloatQuad transformedBounds() const; 54 55 55 56 bool ensureTexture();
Note: See TracChangeset
for help on using the changeset viewer.