Changeset 70819 in webkit


Ignore:
Timestamp:
Oct 28, 2010 3:57:32 PM (13 years ago)
Author:
noam.rosenthal@nokia.com
Message:

2010-10-28 Noam Rosenthal <noam.rosenthal@nokia.com>

Reviewed by Ariya Hidayat.

[Texmap] [Qt] Texture mapper initial implementation
https://bugs.webkit.org/show_bug.cgi?id=47070

Build fix, some wrong changes slipped into the previous patch.
No new tests: build fix.

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/opengl/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::setContentsToImage):
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: (WebCore::TextureMapperNode::uploadTextureFromContent): (WebCore::TextureMapperNode::paintRecursive):
  • platform/qt/QWebPageClient.h: (QWebPageClient::setRootGraphicsLayer):

2010-10-28 Noam Rosenthal <noam.rosenthal@nokia.com>

Reviewed by Ariya Hidayat.

[Texmap] [Qt] Texture mapper initial implementation
https://bugs.webkit.org/show_bug.cgi?id=47070

Build fix,

  • WebCoreSupport/PageClientQt.cpp: (WebCore::PlatformLayerProxyQGraphicsObject::PlatformLayerProxyQGraphicsObject): (WebCore::PageClientQGraphicsWidget::~PageClientQGraphicsWidget): (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer):
  • WebCoreSupport/PageClientQt.h:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70816 r70819  
     12010-10-28  Noam Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        Reviewed by Ariya Hidayat.
     4
     5        [Texmap] [Qt] Texture mapper initial implementation
     6        https://bugs.webkit.org/show_bug.cgi?id=47070
     7
     8        Build fix, some wrong changes slipped into the previous patch.
     9        No new tests: build fix.
     10
     11        * platform/graphics/GraphicsLayer.h:
     12        * platform/graphics/opengl/TextureMapperGL.cpp:
     13        (WebCore::BitmapTextureGL::setContentsToImage):
     14        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
     15        (WebCore::TextureMapperNode::uploadTextureFromContent):
     16        (WebCore::TextureMapperNode::paintRecursive):
     17        * platform/qt/QWebPageClient.h:
     18        (QWebPageClient::setRootGraphicsLayer):
     19
    1202010-10-28  David Hyatt  <hyatt@apple.com>
    221
  • trunk/WebCore/platform/graphics/GraphicsLayer.h

    r70487 r70819  
    4141#include <wtf/PassOwnPtr.h>
    4242
     43#if USE(TEXTURE_MAPPER)
     44#include "texmap/TextureMapperPlatformLayer.h"
     45#endif
     46
    4347#if PLATFORM(MAC)
    4448#ifdef __OBJC__
     
    6872class QGraphicsObject;
    6973QT_END_NAMESPACE
     74namespace WebCore {
    7075typedef QGraphicsObject PlatformLayer;
    7176typedef QGraphicsObject* NativeLayer;
     77}
    7278#endif
    7379#elif PLATFORM(CHROMIUM)
  • trunk/WebCore/platform/graphics/opengl/TextureMapperGL.cpp

    r70455 r70819  
    3030#if defined(TEXMAP_OPENGL_ES_2)
    3131#include <GLES2/gl2.h>
    32 #elif PLATFORM(MAC)
     32#elif OS(MAC_OS_X)
    3333#include <gl.h>
    3434#else
     
    6666    void glGetProgramInfoLog(GLuint program, GLsizei, GLsizei*, GLchar*);
    6767
    68 #if !PLATFORM(MAC)
     68#if !OS(MAC_OS_X)
    6969    GLint glGetUniformLocation(GLuint, const GLchar*);
    7070    GLint glBindAttribLocation(GLuint, GLuint, const GLchar*);
     
    460460        if (!found) {
    461461            GraphicsContext context(beginPaint(IntRect(0, 0, m_textureSize.width(), m_textureSize.height())));
    462             context.drawImage(image, DeviceColorSpace, IntPoint(0, 0), CompositeCopy);
     462            context.drawImage(image, ColorSpaceDeviceRGB, IntPoint(0, 0), CompositeCopy);
    463463            endPaint();
    464464        }
  • trunk/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp

    r69374 r70819  
    684684        return;
    685685
    686     WTF::StopWatch stopWatch;
    687686    IntRect dirtyRect = IntRect(0, 0, m_size.width(), m_size.height());
    688687    if (!needsReset && !m_currentContent.needsDisplay)
     
    702701    }
    703702    m_texture->endPaint();
    704     {
    705 #if 0
    706         LOG("[TextureMapper] Re-render(%d) layer(%p) %d::%d::%d (%dx%d) [%dms]\n", ++renderCount, this,
    707                needsReset, m_currentContent.needsDisplay, !m_currentContent.needsDisplayRect.isEmpty(),
    708                dirtyRect.width(), dirtyRect.height(), int(stopWatch.elapsed() * 1000));
    709         static int renderCount = 0;
    710         m_texture->save(String().format("/tmp/layer_%d.png", renderCount));
    711 #endif
    712     }
    713703    m_currentContent.needsDisplay = false;
    714704
     
    740730void TextureMapperNode::paintRecursive(TexmapPaintOptions options)
    741731{
    742     WTF::StopWatch stopWatch;
    743 
    744732    bool isDirty = m_state.dirty;
    745733    m_state.dirty = false;
  • trunk/WebCore/platform/qt/QWebPageClient.h

    r70487 r70819  
    5353    virtual bool inputMethodEnabled() const = 0;
    5454#if USE(ACCELERATED_COMPOSITING)
    55     virtual void setRootGraphicsLayer(PlatformLayer* layer) { }
     55    virtual void setRootGraphicsLayer(WebCore::PlatformLayer* layer) { }
    5656
    5757    // this gets called when the compositor wants us to sync the layers
  • trunk/WebKit/qt/ChangeLog

    r70778 r70819  
     12010-10-28  Noam Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        Reviewed by Ariya Hidayat.
     4
     5        [Texmap] [Qt] Texture mapper initial implementation
     6        https://bugs.webkit.org/show_bug.cgi?id=47070
     7
     8        Build fix,
     9
     10        * WebCoreSupport/PageClientQt.cpp:
     11        (WebCore::PlatformLayerProxyQGraphicsObject::PlatformLayerProxyQGraphicsObject):
     12        (WebCore::PageClientQGraphicsWidget::~PageClientQGraphicsWidget):
     13        (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer):
     14        * WebCoreSupport/PageClientQt.h:
     15
    1162010-10-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
    217
  • trunk/WebKit/qt/WebCoreSupport/PageClientQt.cpp

    r70487 r70819  
    9898};
    9999
    100 class PlatformLayerProxyQGraphicsObject : public PlatfromLayerProxyQt {
     100class PlatformLayerProxyQGraphicsObject : public PlatformLayerProxyQt {
    101101public:
    102     PlatformLayerProxyQGraphicsWidget(QWebFrame* frame, TextureMapperContentLayer* layer, QGraphicsObject* object)
    103         : QObject(object)
    104         , m_graphicsItem(graphicsObject)
     102    PlatformLayerProxyQGraphicsObject(QWebFrame* frame, TextureMapperContentLayer* layer, QGraphicsObject* object)
     103        : PlatformLayerProxyQt(frame, layer, object)
     104        , m_graphicsItem(object)
    105105    {
    106106    }
     
    229229    delete overlay;
    230230#if USE(ACCELERATED_COMPOSITING)
     231#if USE(TEXTURE_MAPPER)
     232    delete platformLayerProxy;
     233#else
    231234    if (!rootGraphicsLayer)
    232235        return;
     
    234237    rootGraphicsLayer.data()->setParentItem(0);
    235238    view->scene()->removeItem(rootGraphicsLayer.data());
     239#endif
    236240#endif
    237241}
     
    294298{
    295299    if (layer) {
    296         platformLayerProxy = new PlatformLayerProxyQGraphicsObject(page->mainFrame(), static_cast<TextureMapperContentLayer*>(layer), 0, view);
     300        platformLayerProxy = new PlatformLayerProxyQGraphicsObject(page->mainFrame(), static_cast<TextureMapperContentLayer*>(layer), view);
    297301        return;
    298302    }
  • trunk/WebKit/qt/WebCoreSupport/PageClientQt.h

    r70487 r70819  
    4848namespace WebCore {
    4949
    50 class PageClientQWidget : public QWebPageClient
    51 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    52         , public virtual TextureMapperLayerClient
    53 #endif
    54 {
     50class PageClientQWidget : public QWebPageClient {
    5551public:
    5652    PageClientQWidget(QWidget* newView, QWebPage* newPage)
     
    144140
    145141
    146 class PageClientQGraphicsWidget : public QWebPageClient
    147 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
    148         , public virtual TextureMapperLayerClient
    149 #endif
    150 {
     142class PageClientQGraphicsWidget : public QWebPageClient {
    151143public:
    152144    PageClientQGraphicsWidget(QGraphicsWebView* newView, QWebPage* newPage)
Note: See TracChangeset for help on using the changeset viewer.