Changeset 70819 in webkit
- Timestamp:
- Oct 28, 2010 3:57:32 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r70816 r70819 1 2010-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 1 20 2010-10-28 David Hyatt <hyatt@apple.com> 2 21 -
trunk/WebCore/platform/graphics/GraphicsLayer.h
r70487 r70819 41 41 #include <wtf/PassOwnPtr.h> 42 42 43 #if USE(TEXTURE_MAPPER) 44 #include "texmap/TextureMapperPlatformLayer.h" 45 #endif 46 43 47 #if PLATFORM(MAC) 44 48 #ifdef __OBJC__ … … 68 72 class QGraphicsObject; 69 73 QT_END_NAMESPACE 74 namespace WebCore { 70 75 typedef QGraphicsObject PlatformLayer; 71 76 typedef QGraphicsObject* NativeLayer; 77 } 72 78 #endif 73 79 #elif PLATFORM(CHROMIUM) -
trunk/WebCore/platform/graphics/opengl/TextureMapperGL.cpp
r70455 r70819 30 30 #if defined(TEXMAP_OPENGL_ES_2) 31 31 #include <GLES2/gl2.h> 32 #elif PLATFORM(MAC)32 #elif OS(MAC_OS_X) 33 33 #include <gl.h> 34 34 #else … … 66 66 void glGetProgramInfoLog(GLuint program, GLsizei, GLsizei*, GLchar*); 67 67 68 #if ! PLATFORM(MAC)68 #if !OS(MAC_OS_X) 69 69 GLint glGetUniformLocation(GLuint, const GLchar*); 70 70 GLint glBindAttribLocation(GLuint, GLuint, const GLchar*); … … 460 460 if (!found) { 461 461 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); 463 463 endPaint(); 464 464 } -
trunk/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
r69374 r70819 684 684 return; 685 685 686 WTF::StopWatch stopWatch;687 686 IntRect dirtyRect = IntRect(0, 0, m_size.width(), m_size.height()); 688 687 if (!needsReset && !m_currentContent.needsDisplay) … … 702 701 } 703 702 m_texture->endPaint(); 704 {705 #if 0706 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 #endif712 }713 703 m_currentContent.needsDisplay = false; 714 704 … … 740 730 void TextureMapperNode::paintRecursive(TexmapPaintOptions options) 741 731 { 742 WTF::StopWatch stopWatch;743 744 732 bool isDirty = m_state.dirty; 745 733 m_state.dirty = false; -
trunk/WebCore/platform/qt/QWebPageClient.h
r70487 r70819 53 53 virtual bool inputMethodEnabled() const = 0; 54 54 #if USE(ACCELERATED_COMPOSITING) 55 virtual void setRootGraphicsLayer( PlatformLayer* layer) { }55 virtual void setRootGraphicsLayer(WebCore::PlatformLayer* layer) { } 56 56 57 57 // this gets called when the compositor wants us to sync the layers -
trunk/WebKit/qt/ChangeLog
r70778 r70819 1 2010-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 1 16 2010-10-28 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 17 -
trunk/WebKit/qt/WebCoreSupport/PageClientQt.cpp
r70487 r70819 98 98 }; 99 99 100 class PlatformLayerProxyQGraphicsObject : public Platf romLayerProxyQt {100 class PlatformLayerProxyQGraphicsObject : public PlatformLayerProxyQt { 101 101 public: 102 PlatformLayerProxyQGraphics Widget(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) 105 105 { 106 106 } … … 229 229 delete overlay; 230 230 #if USE(ACCELERATED_COMPOSITING) 231 #if USE(TEXTURE_MAPPER) 232 delete platformLayerProxy; 233 #else 231 234 if (!rootGraphicsLayer) 232 235 return; … … 234 237 rootGraphicsLayer.data()->setParentItem(0); 235 238 view->scene()->removeItem(rootGraphicsLayer.data()); 239 #endif 236 240 #endif 237 241 } … … 294 298 { 295 299 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); 297 301 return; 298 302 } -
trunk/WebKit/qt/WebCoreSupport/PageClientQt.h
r70487 r70819 48 48 namespace WebCore { 49 49 50 class PageClientQWidget : public QWebPageClient 51 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 52 , public virtual TextureMapperLayerClient 53 #endif 54 { 50 class PageClientQWidget : public QWebPageClient { 55 51 public: 56 52 PageClientQWidget(QWidget* newView, QWebPage* newPage) … … 144 140 145 141 146 class PageClientQGraphicsWidget : public QWebPageClient 147 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) 148 , public virtual TextureMapperLayerClient 149 #endif 150 { 142 class PageClientQGraphicsWidget : public QWebPageClient { 151 143 public: 152 144 PageClientQGraphicsWidget(QGraphicsWebView* newView, QWebPage* newPage)
Note: See TracChangeset
for help on using the changeset viewer.