Changeset 108915 in webkit


Ignore:
Timestamp:
Feb 25, 2012 4:28:26 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r108900.
http://trac.webkit.org/changeset/108900
https://bugs.webkit.org/show_bug.cgi?id=79587

broke some API tests, will investigate and re-commit
(Requested by noamr on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-02-25

  • UIProcess/API/qt/qquickwebpage.cpp:

(computeEffectiveOpacity):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(PageProxyNode::changedStates):
(PageProxyNode::render):

  • UIProcess/API/qt/qquickwebpage_p_p.h:

(QQuickWebPagePrivate):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r108900 r108915  
     12012-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r108900.
     4        http://trac.webkit.org/changeset/108900
     5        https://bugs.webkit.org/show_bug.cgi?id=79587
     6
     7        broke some API tests, will investigate and re-commit
     8        (Requested by noamr on #webkit).
     9
     10        * UIProcess/API/qt/qquickwebpage.cpp:
     11        (computeEffectiveOpacity):
     12        (QQuickWebPagePrivate::paintToCurrentGLContext):
     13        (PageProxyNode::changedStates):
     14        (PageProxyNode::render):
     15        * UIProcess/API/qt/qquickwebpage_p_p.h:
     16        (QQuickWebPagePrivate):
     17
    1182012-02-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
    219
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp

    r108900 r108915  
    6464}
    6565
     66static float computeEffectiveOpacity(const QQuickItem* item)
     67{
     68    if (!item)
     69        return 1;
     70
     71    float opacity = item->opacity();
     72    if (opacity < 0.01)
     73        return 0;
     74
     75    return opacity * computeEffectiveOpacity(item->parentItem());
     76}
     77
    6678void QQuickWebPagePrivate::setDrawingAreaSize(const QSize& size)
    6779{
     
    7890}
    7991
    80 void QQuickWebPagePrivate::paintToCurrentGLContext(const QTransform& transform, float opacity)
     92void QQuickWebPagePrivate::paintToCurrentGLContext()
    8193{
    8294    if (!q->isVisible())
    8395        return;
    8496
     97    QTransform transform = q->itemTransform(0, 0);
     98    transform.scale(contentsScale, contentsScale);
     99
     100    float opacity = computeEffectiveOpacity(q);
    85101    QRectF clipRect = viewportItem->mapRectToScene(viewportItem->boundingRect());
    86102
     
    92108        return;
    93109
    94     drawingArea->paintToCurrentGLContext(QTransform(transform).scale(contentsScale, contentsScale), opacity, clipRect);
     110    drawingArea->paintToCurrentGLContext(transform, opacity, clipRect);
    95111}
    96112
     
    103119    virtual StateFlags changedStates()
    104120    {
    105         return StateFlags(StencilState) | ColorState | BlendState;
    106     }
    107 
    108     virtual void render(const RenderState&)
     121        return StateFlags(DepthState) | StencilState | ScissorState | ColorState | BlendState
     122               | CullState | ViewportState;
     123    }
     124
     125    virtual void render(const RenderState &)
    109126    {
    110127        if (m_pagePrivate)
    111             m_pagePrivate->paintToCurrentGLContext(matrix()->toTransform(), inheritedOpacity());
     128            m_pagePrivate->paintToCurrentGLContext();
    112129    }
    113130
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p_p.h

    r108900 r108915  
    4242    void updateSize();
    4343
    44     void paintToCurrentGLContext(const QTransform&, float opacity);
     44    void paintToCurrentGLContext();
    4545    void paint(QPainter*);
    4646    void resetPaintNode();
Note: See TracChangeset for help on using the changeset viewer.