Changeset 150817 in webkit


Ignore:
Timestamp:
May 28, 2013 11:40:51 AM (11 years ago)
Author:
anilsson@rim.com
Message:

[BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
https://bugs.webkit.org/show_bug.cgi?id=116604

Reviewed by Carlos Garcia Campos.

Source/WebCore:

PR 273550, 99638

Remove the "get" prefix from getters in the WebKit- and compositing-
thread layer classes, as well as LayerRendererSurface. Clarify which
geometry-related getters return normalized device coordinates by adding
a comment.

Also remove dead code related to LayerData::m_holePunchClipRect, which
was part of an eventually disabled fix for video clipping in iframes,
PR 99638. Since we now use AC layers for iframes, the bug is no longer
reproducible, and the dead code will never need to be enabled again.

No change in behavior, no new tests.

  • platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:

(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):

  • platform/graphics/blackberry/LayerCompositingThread.cpp:

(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore::LayerCompositingThread::transformedHolePunchRect):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):

  • platform/graphics/blackberry/LayerCompositingThread.h:

(WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
(LayerCompositingThread):
(WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
(WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
(WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix

  • platform/graphics/blackberry/LayerData.h:

(LayerData): Removed unused data member "m_holePunchClipRect"

  • platform/graphics/blackberry/LayerFilterRenderer.cpp:

(WebCore::LayerFilterRenderer::applyActions):

  • platform/graphics/blackberry/LayerRenderer.cpp:

(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::drawDebugBorder):
(WebCore::LayerRenderer::drawHolePunchRect):
(WebCore::LayerRenderer::prepareFrameRecursive):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::collect3DPreservingLayers):
(WebCore::LayerRenderer::compositeLayersRecursive):

  • platform/graphics/blackberry/LayerRendererSurface.cpp:

(WebCore::LayerRendererSurface::boundingBox):

  • platform/graphics/blackberry/LayerRendererSurface.h:

(WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter

  • platform/graphics/blackberry/LayerWebKitThread.h:

(WebCore::LayerWebKitThread::sublayers): Removed "get" prefix

  • platform/graphics/blackberry/VideoLayerWebKitThread.cpp:

(WebCore::VideoLayerWebKitThread::setHolePunchRect):
(WebCore::VideoLayerWebKitThread::boundsChanged):

Source/WebKit/blackberry:

Adapt to the removal of "get" prefix from getters in the WebKit- and
compositing-thread layer classes.

  • Api/WebOverlay.cpp:

(BlackBerry::WebKit::WebOverlayPrivateCompositingThread::pixelViewportRect):

  • Api/WebPageCompositor.cpp:

(BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays):
(BlackBerry::WebKit::WebPageCompositorPrivate::removeOverlay):
(BlackBerry::WebKit::WebPageCompositorPrivate::findFixedElementRect):

Location:
trunk/Source
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150810 r150817  
     12013-05-28  Arvid Nilsson  <anilsson@rim.com>
     2
     3        [BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
     4        https://bugs.webkit.org/show_bug.cgi?id=116604
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        PR 273550, 99638
     9
     10        Remove the "get" prefix from getters in the WebKit- and compositing-
     11        thread layer classes, as well as LayerRendererSurface. Clarify which
     12        geometry-related getters return normalized device coordinates by adding
     13        a comment.
     14
     15        Also remove dead code related to LayerData::m_holePunchClipRect, which
     16        was part of an eventually disabled fix for video clipping in iframes,
     17        PR 99638. Since we now use AC layers for iframes, the bug is no longer
     18        reproducible, and the dead code will never need to be enabled again.
     19
     20        No change in behavior, no new tests.
     21
     22        * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
     23        (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
     24        * platform/graphics/blackberry/LayerCompositingThread.cpp:
     25        (WebCore::LayerCompositingThread::setDrawTransform):
     26        (WebCore::LayerCompositingThread::transformedHolePunchRect):
     27        (WebCore::LayerCompositingThread::drawTextures):
     28        (WebCore::LayerCompositingThread::drawSurface):
     29        * platform/graphics/blackberry/LayerCompositingThread.h:
     30        (WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
     31        (LayerCompositingThread):
     32        (WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
     33        (WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
     34        (WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
     35        * platform/graphics/blackberry/LayerData.h:
     36        (LayerData): Removed unused data member "m_holePunchClipRect"
     37        * platform/graphics/blackberry/LayerFilterRenderer.cpp:
     38        (WebCore::LayerFilterRenderer::applyActions):
     39        * platform/graphics/blackberry/LayerRenderer.cpp:
     40        (WebCore::LayerRenderer::compositeLayers):
     41        (WebCore::LayerRenderer::drawDebugBorder):
     42        (WebCore::LayerRenderer::drawHolePunchRect):
     43        (WebCore::LayerRenderer::prepareFrameRecursive):
     44        (WebCore::LayerRenderer::updateLayersRecursive):
     45        (WebCore::collect3DPreservingLayers):
     46        (WebCore::LayerRenderer::compositeLayersRecursive):
     47        * platform/graphics/blackberry/LayerRendererSurface.cpp:
     48        (WebCore::LayerRendererSurface::boundingBox):
     49        * platform/graphics/blackberry/LayerRendererSurface.h:
     50        (WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
     51        * platform/graphics/blackberry/LayerWebKitThread.h:
     52        (WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
     53        * platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
     54        (WebCore::VideoLayerWebKitThread::setHolePunchRect):
     55        (WebCore::VideoLayerWebKitThread::boundsChanged):
     56
    1572013-05-28  Jer Noble  <jer.noble@apple.com>
    258
  • trunk/Source/WebCore/platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp

    r150809 r150817  
    5757    glUseProgram(program.m_program);
    5858    glUniform1f(program.opacityLocation(), layer->drawOpacity());
    59     glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &layer->getTransformedBounds());
     59    glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &layer->transformedBounds());
    6060    glVertexAttribPointer(program.texCoordLocation(), 2, GL_FLOAT, GL_FALSE, 0, upsideDown);
    6161    glBindTexture(GL_TEXTURE_2D, m_textureAccessor->textureID());
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerCompositingThread.cpp

    r150809 r150817  
    5454#include <wtf/Assertions.h>
    5555
    56 #define DEBUG_VIDEO_CLIPPING 0
    57 
    5856using BlackBerry::Platform::Graphics::GLES2Program;
    5957
     
    140138
    141139    m_transformedBounds = matrix.mapQuad(boundsRect);
    142     m_drawRect = m_transformedBounds.boundingBox();
    143 }
    144 
    145 static FloatQuad getTransformedRect(const IntSize& bounds, const IntRect& rect, const TransformationMatrix& drawTransform)
    146 {
    147     FloatPoint origin(bounds.width() / 2.0f, bounds.height() / 2.0f);
    148     FloatRect layerRect(rect);
    149     layerRect.moveBy(-origin);
    150     return drawTransform.mapQuad(layerRect);
    151 }
    152 
    153 
    154 FloatQuad LayerCompositingThread::getTransformedHolePunchRect() const
    155 {
    156     // FIXME: the following line disables clipping a video in an iframe i.e. the fix associated with PR 99638.
    157     // Some revised test case (e.g. video-iframe.html) show that the original fix works correctly when scrolling
    158     // the contents of the frame, but fails to clip correctly if the page (main frame) is scrolled.
    159     static bool enableVideoClipping = false;
    160 
    161     if (!mediaPlayer() || !enableVideoClipping) {
    162         // m_holePunchClipRect is valid only when there's a media player.
    163         return getTransformedRect(m_bounds, m_holePunchRect, m_drawTransform);
    164     }
    165 
    166     // The hole punch rectangle may need to be clipped,
    167     // e.g. if the <video> is on a layer that's included and clipped by an <iframe>.
    168 
    169     // In order to clip we need to determine the current position of this layer, which
    170     // is encoded in the m_drawTransform value, which was used to initialize m_drawRect.
    171     IntRect drawRect = m_layerRenderer->toDocumentViewportCoordinates(m_drawRect);
    172 
    173     // Assert that in this case, where the hole punch rectangle equals the size of the layer,
    174     // the drawRect has the same size as the hole punch.
    175     // ASSERT(drawRect.size() == m_holePunchRect.size());
    176     // Don't assert it programtically though because there may be off-by-one error due to rounding when there's zooming.
    177 
    178     // The difference between drawRect and m_holePunchRect is that drawRect has an accurate position
    179     // in WebKit document coordinates, whereas the m_holePunchRect location is (0,0) i.e. it's relative to this layer.
    180 
    181     // Clip the drawRect.
    182     // Both drawRect and m_holePunchClipRect already have correct locations, in WebKit document coordinates.
    183     IntPoint location = drawRect.location();
    184     drawRect.intersect(m_holePunchClipRect);
    185 
    186     // Shift the clipped drawRect to have the same kind of located-at-zero position as the original holePunchRect.
    187     drawRect.move(-location.x(), -location.y());
    188 
    189 #if DEBUG_VIDEO_CLIPPING
    190     IntRect drawRectInWebKitDocumentCoordination = m_layerRenderer->toWebKitDocumentCoordinates(m_drawRect);
    191     BBLOG(BlackBerry::Platform::LogLevelInfo, "LayerCompositingThread::getTransformedHolePunchRect() - drawRect=(x=%d,y=%d,width=%d,height=%d) clipRect=(x=%d,y=%d,width=%d,height=%d) clippedRect=(x=%d,y=%d,width=%d,height=%d).",
    192         drawRectInWebKitDocumentCoordination.x(), drawRectInWebKitDocumentCoordination.y(), drawRectInWebKitDocumentCoordination.width(), drawRectInWebKitDocumentCoordination.height(),
    193         m_holePunchClipRect.x(), m_holePunchClipRect.y(), m_holePunchClipRect.width(), m_holePunchClipRect.height(),
    194         drawRect.x(), drawRect.y(), drawRect.width(), drawRect.height());
    195 #endif
    196 
    197     return getTransformedRect(m_bounds, drawRect, m_drawTransform);
     140    m_boundingBox = m_transformedBounds.boundingBox();
     141}
     142
     143FloatQuad LayerCompositingThread::transformedHolePunchRect() const
     144{
     145    FloatRect holePunchRect(m_holePunchRect);
     146    holePunchRect.moveBy(-origin());
     147    return m_drawTransform.mapQuad(holePunchRect);
    198148}
    199149
     
    240190                paintRect = IntRect(roundedIntPoint(p), m_bounds);
    241191            } else
    242                 paintRect = m_layerRenderer->toWindowCoordinates(m_drawRect);
     192                paintRect = m_layerRenderer->toWindowCoordinates(m_boundingBox);
    243193
    244194            m_mediaPlayer->paint(0, paintRect);
     
    286236        glBindTexture(GL_TEXTURE_2D, surfaceTexID);
    287237
    288         FloatQuad surfaceQuad = getTransformedRect(m_bounds, IntRect(IntPoint::zero(), m_bounds), drawTransform);
     238        FloatQuad surfaceQuad = drawTransform.mapQuad(FloatRect(-origin(), bounds()));
    289239        glUniform1f(program.opacityLocation(), layerRendererSurface()->drawOpacity());
    290240        glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &surfaceQuad);
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerCompositingThread.h

    r150809 r150817  
    154154    const LayerCompositingThread* rootLayer() const;
    155155    void setSublayers(const Vector<RefPtr<LayerCompositingThread> >&);
    156     const Vector<RefPtr<LayerCompositingThread> >& getSublayers() const { return m_sublayers; }
     156    const Vector<RefPtr<LayerCompositingThread> >& sublayers() const { return m_sublayers; }
    157157    void setSuperlayer(LayerCompositingThread* superlayer) { m_superlayer = superlayer; }
    158158    LayerCompositingThread* superlayer() const { return m_superlayer; }
     
    181181    LayerCompositingThread* replicaLayer() const { return m_replicaLayer.get(); }
    182182
    183     FloatRect getDrawRect() const { return m_drawRect; }
    184     const FloatQuad& getTransformedBounds() const { return m_transformedBounds; }
    185     FloatQuad getTransformedHolePunchRect() const;
     183    // These use normalized device coordinates
     184    FloatRect boundingBox() const { return m_boundingBox; }
     185    const FloatQuad& transformedBounds() const { return m_transformedBounds; }
     186    FloatQuad transformedHolePunchRect() const;
    186187
    187188    void deleteTextures();
     
    251252    FloatQuad m_transformedBounds;
    252253    // The bounding rectangle of the transformed layer
    253     FloatRect m_drawRect;
     254    FloatRect m_boundingBox;
    254255
    255256    OwnPtr<LayerRendererSurface> m_layerRendererSurface;
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerData.h

    r144465 r150817  
    225225#if ENABLE(VIDEO)
    226226    MediaPlayer* m_mediaPlayer;
    227     IntRect m_holePunchClipRect;
    228227#endif
    229228    IntRect m_holePunchRect;
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerFilterRenderer.cpp

    r150809 r150817  
    710710    LayerRendererSurface* surface = layer->layerRendererSurface();
    711711
    712     glVertexAttribPointer(m_positionLocation, 2, GL_FLOAT, GL_FALSE, 0, &layer->getTransformedBounds());
     712    glVertexAttribPointer(m_positionLocation, 2, GL_FLOAT, GL_FALSE, 0, &layer->transformedBounds());
    713713    glEnableVertexAttribArray(m_positionLocation);
    714714    glVertexAttribPointer(m_texCoordLocation, 2, GL_FLOAT, GL_FALSE, 0, texcoords);
     
    765765        actions[i]->restoreState();
    766766
    767         glVertexAttribPointer(m_positionLocation, 2, GL_FLOAT, GL_FALSE, 0, &layer->getTransformedBounds() );
     767        glVertexAttribPointer(m_positionLocation, 2, GL_FLOAT, GL_FALSE, 0, &layer->transformedBounds());
    768768        glEnableVertexAttribArray(m_positionLocation);
    769769        glVertexAttribPointer(m_texCoordLocation, 2, GL_FLOAT, GL_FALSE, 0, texcoords);
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerRenderer.cpp

    r150809 r150817  
    310310
    311311    Vector<RefPtr<LayerCompositingThread> > surfaceLayers;
    312     const Vector<RefPtr<LayerCompositingThread> >& sublayers = rootLayer->getSublayers();
     312    const Vector<RefPtr<LayerCompositingThread> >& sublayers = rootLayer->sublayers();
    313313    for (size_t i = 0; i < sublayers.size(); i++) {
    314314        float opacity = 1;
     
    608608        transformedBounds = layer->layerRendererSurface()->transformedBounds();
    609609    else
    610         transformedBounds = layer->getTransformedBounds();
     610        transformedBounds = layer->transformedBounds();
    611611
    612612    const GLES2Program& program = useProgram(ColorProgram);
     
    626626    glEnable(GL_BLEND);
    627627    glBlendFunc(GL_ONE, GL_ZERO);
    628     FloatQuad hole = layer->getTransformedHolePunchRect();
     628    FloatQuad hole = layer->transformedHolePunchRect();
    629629    glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &hole);
    630630    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
     
    653653    }
    654654
    655     const Vector<RefPtr<LayerCompositingThread> >& sublayers = layer->getSublayers();
     655    const Vector<RefPtr<LayerCompositingThread> >& sublayers = layer->sublayers();
    656656    for (size_t i = 0; i < sublayers.size(); i++)
    657657        prepareFrameRecursive(sublayers[i].get(), animationTime, isContextCurrent);
     
    796796        }
    797797
    798         IntRect drawRect = enclosingIntRect(FloatRect(FloatPoint(), bounds));
    799         surface->setContentRect(drawRect);
    800 
    801         TransformationMatrix projectionMatrix = orthoMatrix(drawRect.x(), drawRect.maxX(), drawRect.y(), drawRect.maxY(), -1000, 1000);
     798        IntRect contentRect = enclosingIntRect(FloatRect(FloatPoint::zero(), bounds));
     799        surface->setContentRect(contentRect);
     800
     801        TransformationMatrix projectionMatrix = orthoMatrix(contentRect.x(), contentRect.maxX(), contentRect.y(), contentRect.maxY(), -1000, 1000);
    802802        // The origin of the new surface is the upper left corner of the layer.
    803803        TransformationMatrix drawTransform;
     
    812812
    813813#if ENABLE(VIDEO)
    814     bool layerVisible = clipRect.intersects(layer->getDrawRect()) || layer->mediaPlayer();
     814    bool layerVisible = clipRect.intersects(layer->boundingBox()) || layer->mediaPlayer();
    815815#else
    816     bool layerVisible = clipRect.intersects(layer->getDrawRect());
     816    bool layerVisible = clipRect.intersects(layer->boundingBox());
    817817#endif
    818818
    819819    if (layer->needsTexture() && layerVisible) {
    820         IntRect dirtyRect = toWindowCoordinates(intersection(layer->getDrawRect(), clipRect));
     820        IntRect dirtyRect = toWindowCoordinates(intersection(layer->boundingBox(), clipRect));
    821821        m_lastRenderingResults.addDirtyRect(dirtyRect);
    822822    }
    823823
    824824    if (layer->masksToBounds())
    825         clipRect.intersect(layer->getDrawRect());
     825        clipRect.intersect(layer->boundingBox());
    826826
    827827    // Flatten to 2D if the layer doesn't preserve 3D.
     
    846846    localMatrix.translate3d(-bounds.width() * 0.5, -bounds.height() * 0.5, 0);
    847847
    848     const Vector<RefPtr<LayerCompositingThread> >& sublayers = layer->getSublayers();
     848    const Vector<RefPtr<LayerCompositingThread> >& sublayers = layer->sublayers();
    849849    for (size_t i = 0; i < sublayers.size(); i++)
    850850        updateLayersRecursive(sublayers[i].get(), localMatrix, surfaceLayers, opacity, clipRect);
     
    865865    for (size_t i = 0; i < layers.size(); ++i) {
    866866        LayerCompositingThread* layer = layers[i];
    867         if (!layer->preserves3D() || !layer->getSublayers().size())
     867        if (!layer->preserves3D() || !layer->sublayers().size())
    868868            continue;
    869869
    870         Vector<LayerCompositingThread*> sublayers = rawPtrVectorFromRefPtrVector(layer->getSublayers());
     870        Vector<LayerCompositingThread*> sublayers = rawPtrVectorFromRefPtrVector(layer->sublayers());
    871871        collect3DPreservingLayers(sublayers);
    872872        layers.insert(i+1, sublayers);
     
    879879    FloatRect rect;
    880880    if (layerAlreadyOnSurface(layer))
    881         rect = layer->layerRendererSurface()->drawRect();
     881        rect = layer->layerRendererSurface()->boundingBox();
    882882    else
    883         rect = layer->getDrawRect();
     883        rect = layer->boundingBox();
    884884
    885885#if ENABLE(VIDEO)
     
    966966        const GLES2Program& program = useProgram(ColorProgram);
    967967        glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
    968         glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &layer->getTransformedBounds());
     968        glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &layer->transformedBounds());
    969969        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
    970970        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
     
    972972
    973973    if (layer->masksToBounds())
    974         clipRect.intersect(layer->getDrawRect());
     974        clipRect.intersect(layer->boundingBox());
    975975
    976976    // Here, we need to sort the whole subtree of layers with preserve-3d. It
    977977    // affects all children, and the children of any children with preserve-3d,
    978978    // and so on.
    979     Vector<LayerCompositingThread*> sublayers = rawPtrVectorFromRefPtrVector(layer->getSublayers());
     979    Vector<LayerCompositingThread*> sublayers = rawPtrVectorFromRefPtrVector(layer->sublayers());
    980980
    981981    bool preserves3D = layer->preserves3D();
     
    10091009        const GLES2Program& program = useProgram(ColorProgram);
    10101010        glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
    1011         glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &layer->getTransformedBounds());
     1011        glVertexAttribPointer(program.positionLocation(), 2, GL_FLOAT, GL_FALSE, 0, &layer->transformedBounds());
    10121012        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
    10131013        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.cpp

    r150809 r150817  
    4646}
    4747
    48 FloatRect LayerRendererSurface::drawRect() const
     48FloatRect LayerRendererSurface::boundingBox() const
    4949{
    5050    FloatRect rect = transformedBounds().boundingBox();
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerRendererSurface.h

    r150809 r150817  
    5353    const TransformationMatrix& replicaDrawTransform() const { return m_replicaDrawTransform; }
    5454
    55     FloatRect drawRect() const;
     55    // These use normalized device coordinates
     56    FloatRect boundingBox() const;
    5657    FloatQuad transformedBounds() const;
    5758
  • trunk/Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h

    r147418 r150817  
    116116    void setSublayers(const Vector<RefPtr<LayerWebKitThread> >&);
    117117
    118     const Vector<RefPtr<LayerWebKitThread> >& getSublayers() const { return m_sublayers; }
     118    const Vector<RefPtr<LayerWebKitThread> >& sublayers() const { return m_sublayers; }
    119119
    120120    void setSublayerTransform(const TransformationMatrix& transform) { m_sublayerTransform = transform; setNeedsCommit(); }
  • trunk/Source/WebCore/platform/graphics/blackberry/VideoLayerWebKitThread.cpp

    r131335 r150817  
    2727
    2828#include <BlackBerryPlatformLog.h>
    29 
    30 #define DEBUG_VIDEO_CLIPPING 0
    3129
    3230namespace WebCore {
     
    6563{
    6664    m_holePunchRect = rect;
    67 #if DEBUG_VIDEO_CLIPPING
    68     BBLOG(BlackBerry::Platform::LogLevelInfo, "VideoLayerWebKitThread m_holePunchRect=(x=%d,y=%d,width=%d,height=%d).", m_holePunchRect.x(), m_holePunchRect.y(), m_holePunchRect.width(), m_holePunchRect.height());
    69 #endif
    7065    setNeedsCommit();
    7166}
     
    8883    // until the LayerCompositingThread::setDrawTransform method is called from the LayerRenderer.
    8984    setHolePunchRect(IntRect(IntPoint::zero(), m_bounds));
    90 
    91     // Also set a clipping rectangle for this hole punch rectangle.
    92     if (FrameView* frameView = mediaPlayer()->frameView())
    93         m_holePunchClipRect = frameView->windowClipRect();
    94     else
    95         m_holePunchClipRect = holePunchRect();
    96 
    97 #if DEBUG_VIDEO_CLIPPING
    98     BBLOG(BlackBerry::Platform::LogLevelInfo, "VideoLayerWebKitThread m_holePunchClipRect=(x=%d,y=%d,width=%d,height=%d).", m_holePunchClipRect.x(), m_holePunchClipRect.y(), m_holePunchClipRect.width(), m_holePunchClipRect.height());
    99 #endif
    10085}
    10186
  • trunk/Source/WebKit/blackberry/Api/WebOverlay.cpp

    r148676 r150817  
    634634{
    635635    if (LayerRenderer* renderer = m_layerCompositingThread->layerRenderer())
    636         return renderer->toPixelViewportCoordinates(m_layerCompositingThread->getDrawRect());
     636        return renderer->toPixelViewportCoordinates(m_layerCompositingThread->boundingBox());
    637637
    638638    return Platform::IntRect();
  • trunk/Source/WebKit/blackberry/Api/WebPageCompositor.cpp

    r150625 r150817  
    8383        return;
    8484
    85     const Vector<RefPtr<LayerCompositingThread> >& overlays = overlayRoot->getSublayers();
     85    const Vector<RefPtr<LayerCompositingThread> >& overlays = overlayRoot->sublayers();
    8686    for (size_t i = 0; i < overlays.size(); ++i) {
    8787        LayerCompositingThread* overlay = overlays[i].get();
     
    276276    layer->removeFromSuperlayer();
    277277
    278     if (m_compositingThreadOverlayLayer && m_compositingThreadOverlayLayer->getSublayers().isEmpty())
     278    if (m_compositingThreadOverlayLayer && m_compositingThreadOverlayLayer->sublayers().isEmpty())
    279279        m_compositingThreadOverlayLayer.clear();
    280280}
     
    283283{
    284284    if ((layer->hasFixedContainer() || layer->isFixedPosition() || layer->hasFixedAncestorInDOMTree()) && layer->layerRenderer()) {
    285         IntRect fixedRect = layer->layerRenderer()->toPixelViewportCoordinates(layer->getDrawRect());
     285        IntRect fixedRect = layer->layerRenderer()->toPixelViewportCoordinates(layer->boundingBox());
    286286        // FIXME: It's possible that the rects don't intersect now, but will be connected by a fixed rect found later.
    287287        // We need to handle it as well.
     
    292292    }
    293293
    294     const Vector<RefPtr<LayerCompositingThread> >& sublayers = layer->getSublayers();
     294    const Vector<RefPtr<LayerCompositingThread> >& sublayers = layer->sublayers();
    295295    for (size_t i = 0; i < sublayers.size(); i++)
    296296        findFixedElementRect(sublayers[i].get(), fixedElementRect);
  • trunk/Source/WebKit/blackberry/ChangeLog

    r150796 r150817  
     12013-05-28  Arvid Nilsson  <anilsson@rim.com>
     2
     3        [BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
     4        https://bugs.webkit.org/show_bug.cgi?id=116604
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Adapt to the removal of "get" prefix from getters in the WebKit- and
     9        compositing-thread layer classes.
     10
     11        * Api/WebOverlay.cpp:
     12        (BlackBerry::WebKit::WebOverlayPrivateCompositingThread::pixelViewportRect):
     13        * Api/WebPageCompositor.cpp:
     14        (BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays):
     15        (BlackBerry::WebKit::WebPageCompositorPrivate::removeOverlay):
     16        (BlackBerry::WebKit::WebPageCompositorPrivate::findFixedElementRect):
     17
    1182013-05-28  Andreas Kling  <akling@apple.com>
    219
Note: See TracChangeset for help on using the changeset viewer.