Changeset 121710 in webkit
- Timestamp:
- Jul 2, 2012 3:44:32 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r121709 r121710 1 2012-07-02 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 [Qt] Get rid of GraphicsLayerQt 4 https://bugs.webkit.org/show_bug.cgi?id=78598 5 6 Reviewed by Luiz Agostini. 7 8 Remove GraphicsLayerQt.h/cpp, as well as references to the non-TextureMapper code paths 9 in GraphicsContext3DQt and MediaPlayerPrivateQt. 10 11 No new tests, removing unused code paths. 12 13 * Target.pri: 14 * platform/graphics/PlatformLayer.h: 15 * platform/graphics/qt/GraphicsContext3DQt.cpp: 16 (GraphicsContext3DPrivate): 17 (WebCore): 18 * platform/graphics/qt/GraphicsContextQt.cpp: 19 (WebCore): 20 * platform/graphics/qt/GraphicsLayerQt.cpp: Removed. 21 * platform/graphics/qt/GraphicsLayerQt.h: Removed. 22 * platform/graphics/qt/MediaPlayerPrivateQt.cpp: 23 (WebCore): 24 * platform/graphics/qt/MediaPlayerPrivateQt.h: 25 (MediaPlayerPrivateQt): 26 * plugins/qt/PluginViewQt.cpp: 27 (WebCore::PluginView::invalidateRect): 28 (WebCore::PluginView::platformStart): 29 1 30 2012-07-02 Behdad Esfahbod <behdad@behdad.org> 2 31 -
trunk/Source/WebCore/Target.pri
r121525 r121710 2314 2314 platform/graphics/SimpleFontData.h \ 2315 2315 platform/graphics/surfaces/GraphicsSurface.h \ 2316 platform/graphics/texmap/GraphicsLayerTextureMapper.h \ 2317 platform/graphics/texmap/LayerTransform.h \ 2318 platform/graphics/texmap/TextureMapper.h \ 2319 platform/graphics/texmap/TextureMapperAnimation.h \ 2320 platform/graphics/texmap/TextureMapperBackingStore.h \ 2321 platform/graphics/texmap/TextureMapperImageBuffer.h \ 2322 platform/graphics/texmap/TextureMapperLayer.h \ 2323 platform/graphics/texmap/TextureMapperPlatformLayer.h \ 2316 2324 platform/graphics/Tile.h \ 2317 2325 platform/graphics/TiledBackingStore.h \ … … 2924 2932 platform/graphics/qt/PatternQt.cpp \ 2925 2933 platform/graphics/qt/StillImageQt.cpp \ 2934 platform/graphics/texmap/GraphicsLayerTextureMapper.cpp \ 2935 platform/graphics/texmap/LayerTransform.cpp \ 2936 platform/graphics/texmap/TextureMapper.cpp \ 2937 platform/graphics/texmap/TextureMapperAnimation.cpp \ 2938 platform/graphics/texmap/TextureMapperBackingStore.cpp \ 2939 platform/graphics/texmap/TextureMapperImageBuffer.cpp \ 2940 platform/graphics/texmap/TextureMapperLayer.cpp \ 2926 2941 platform/network/MIMESniffing.cpp \ 2927 2942 platform/network/qt/CredentialStorageQt.cpp \ … … 4133 4148 } 4134 4149 4135 contains( CONFIG, texmap) {4150 contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1) { 4136 4151 HEADERS += \ 4137 platform/graphics/texmap/GraphicsLayerTextureMapper.h \ 4138 platform/graphics/texmap/LayerTransform.h \ 4139 platform/graphics/texmap/TextureMapper.h \ 4140 platform/graphics/texmap/TextureMapperAnimation.h \ 4141 platform/graphics/texmap/TextureMapperBackingStore.h \ 4142 platform/graphics/texmap/TextureMapperImageBuffer.h \ 4143 platform/graphics/texmap/TextureMapperLayer.h \ 4144 platform/graphics/texmap/TextureMapperPlatformLayer.h 4152 platform/graphics/texmap/TextureMapperGL.h \ 4153 platform/graphics/texmap/TextureMapperShaderManager.h 4145 4154 4146 4155 SOURCES += \ 4147 platform/graphics/texmap/LayerTransform.cpp \ 4148 platform/graphics/texmap/TextureMapper.cpp \ 4149 platform/graphics/texmap/TextureMapperAnimation.cpp \ 4150 platform/graphics/texmap/TextureMapperBackingStore.cpp \ 4151 platform/graphics/texmap/TextureMapperImageBuffer.cpp \ 4152 platform/graphics/texmap/TextureMapperLayer.cpp \ 4153 platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 4154 4155 contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1) { 4156 HEADERS += \ 4157 platform/graphics/texmap/TextureMapperGL.h \ 4158 platform/graphics/texmap/TextureMapperShaderManager.h 4159 4160 SOURCES += \ 4161 platform/graphics/texmap/TextureMapperGL.cpp \ 4162 platform/graphics/texmap/TextureMapperShaderManager.cpp 4163 4164 CONFIG += opengl-shims 4165 } 4166 } else { 4167 HEADERS += platform/graphics/qt/GraphicsLayerQt.h 4168 SOURCES += platform/graphics/qt/GraphicsLayerQt.cpp 4156 platform/graphics/texmap/TextureMapperGL.cpp \ 4157 platform/graphics/texmap/TextureMapperShaderManager.cpp 4158 4159 CONFIG += opengl-shims 4169 4160 } 4170 4161 -
trunk/Source/WebCore/platform/graphics/PlatformLayer.h
r121513 r121710 35 35 typedef struct _CACFLayer PlatformLayer; 36 36 #elif PLATFORM(QT) 37 #if USE(TEXTURE_MAPPER)38 37 namespace WebCore { 39 38 class TextureMapperPlatformLayer; 40 39 typedef TextureMapperPlatformLayer PlatformLayer; 41 40 }; 42 #else43 QT_BEGIN_NAMESPACE44 class QGraphicsObject;45 QT_END_NAMESPACE46 namespace WebCore {47 typedef QGraphicsObject PlatformLayer;48 }49 #endif50 41 #elif PLATFORM(CHROMIUM) 51 42 namespace WebCore { -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r121501 r121710 41 41 #include <wtf/text/CString.h> 42 42 43 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER ) && USE(TEXTURE_MAPPER_GL)43 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) 44 44 #include <texmap/TextureMapperGL.h> 45 45 #endif … … 58 58 59 59 class GraphicsContext3DPrivate 60 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)60 #if USE(ACCELERATED_COMPOSITING) 61 61 : public TextureMapperPlatformLayer 62 62 #endif … … 66 66 ~GraphicsContext3DPrivate(); 67 67 68 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)68 #if USE(ACCELERATED_COMPOSITING) 69 69 virtual void paintToTextureMapper(TextureMapper*, const FloatRect& target, const TransformationMatrix&, float opacity, BitmapTexture* mask); 70 70 #endif … … 154 154 } 155 155 156 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)156 #if USE(ACCELERATED_COMPOSITING) 157 157 void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity, BitmapTexture* mask) 158 158 { -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
r121618 r121710 1319 1319 } 1320 1320 1321 #if ENABLE(3D_RENDERING) && USE(TEXTURE_MAPPER)1321 #if ENABLE(3D_RENDERING) 1322 1322 TransformationMatrix GraphicsContext::get3DTransform() const 1323 1323 { -
trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp
r121053 r121710 53 53 #include <wtf/text/CString.h> 54 54 55 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)55 #if USE(ACCELERATED_COMPOSITING) 56 56 #include "texmap/TextureMapper.h" 57 57 #endif … … 614 614 } 615 615 616 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)616 #if USE(ACCELERATED_COMPOSITING) 617 617 void MediaPlayerPrivateQt::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& matrix, float opacity, BitmapTexture*) const 618 618 { -
trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h
r121053 r121710 32 32 QT_END_NAMESPACE 33 33 34 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)34 #if USE(ACCELERATED_COMPOSITING) 35 35 #include "TextureMapper.h" 36 36 #endif … … 39 39 40 40 class MediaPlayerPrivateQt : public QObject, public MediaPlayerPrivateInterface 41 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)41 #if USE(ACCELERATED_COMPOSITING) 42 42 , public TextureMapperPlatformLayer 43 43 #endif … … 102 102 103 103 #if USE(ACCELERATED_COMPOSITING) 104 #if USE(TEXTURE_MAPPER)105 104 // whether accelerated rendering is supported by the media engine for the current media. 106 105 virtual bool supportsAcceleratedRendering() const { return false; } … … 110 109 virtual PlatformLayer* platformLayer() const { return 0; } 111 110 virtual void paintToTextureMapper(TextureMapper*, const FloatRect& targetRect, const TransformationMatrix&, float opacity, BitmapTexture* mask) const; 112 #else113 virtual bool supportsAcceleratedRendering() const { return false; }114 virtual void acceleratedRenderingStateChanged() { }115 virtual PlatformLayer* platformLayer() const { return 0; }116 #endif117 111 #endif 118 112 -
trunk/Source/WebCore/plugins/qt/PluginViewQt.cpp
r121381 r121710 143 143 } 144 144 145 #if !HAVE(QT5) && USE(ACCELERATED_COMPOSITING)146 // Qt's GraphicsLayer (GraphicsLayerQt) requires layers to be QGraphicsWidgets147 class PluginGraphicsLayerQt : public QGraphicsWidget {148 public:149 PluginGraphicsLayerQt(PluginView* view) : m_view(view) { }150 ~PluginGraphicsLayerQt() { }151 152 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0)153 {154 Q_UNUSED(widget);155 m_view->paintUsingXPixmap(painter, option->exposedRect.toRect());156 }157 158 private:159 PluginView* m_view;160 };161 162 bool PluginView::shouldUseAcceleratedCompositing() const163 {164 return m_parentFrame->page()->chrome()->client()->allowsAcceleratedCompositing()165 && m_parentFrame->page()->settings()166 && m_parentFrame->page()->settings()->acceleratedCompositingEnabled();167 }168 #endif169 170 145 void PluginView::updatePluginWidget() 171 146 { … … 802 777 void PluginView::invalidateRect(const IntRect& rect) 803 778 { 804 #if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER)805 if (m_platformLayer) {806 m_platformLayer->update(QRectF(rect));807 return;808 }809 #endif810 811 779 #if !HAVE(QT5) // Windowed mode is not supported with Qt5 yet. 812 780 if (m_isWindowed) { … … 974 942 setPlatformWidget(0); 975 943 m_pluginDisplay = getPluginDisplay(); 976 977 #if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER)978 if (shouldUseAcceleratedCompositing()) {979 m_platformLayer = adoptPtr(new PluginGraphicsLayerQt(this));980 // Trigger layer computation in RenderLayerCompositor981 m_element->setNeedsStyleRecalc(SyntheticStyleChange);982 }983 #endif984 944 } 985 945 -
trunk/Source/WebKit/qt/Api/qgraphicswebview.cpp
r120704 r121710 297 297 } 298 298 #endif 299 #if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER)300 page()->mainFrame()->render(painter, d->overlay() ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());301 #else302 299 page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect()); 303 #endif304 300 painter->setRenderHints(oldHints); 305 301 } -
trunk/Source/WebKit/qt/Api/qwebframe.cpp
r121381 r121710 323 323 } 324 324 325 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)325 #if USE(ACCELERATED_COMPOSITING) 326 326 renderCompositedLayers(context, IntRect(clip.boundingRect())); 327 327 renderFrameExtras(context, QFlags<QWebFrame::RenderLayer>(QWebFrame::ScrollBarLayer) | QWebFrame::PanIconLayer, clip); … … 330 330 #endif 331 331 332 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)332 #if USE(ACCELERATED_COMPOSITING) 333 333 void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const IntRect& clip) 334 334 { … … 396 396 context->restore(); 397 397 } 398 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)398 #if USE(ACCELERATED_COMPOSITING) 399 399 renderCompositedLayers(context, IntRect(clip.boundingRect())); 400 400 #endif -
trunk/Source/WebKit/qt/Api/qwebframe_p.h
r120704 r121710 40 40 #include "ViewportArguments.h" 41 41 42 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)42 #if USE(ACCELERATED_COMPOSITING) 43 43 #include "texmap/TextureMapper.h" 44 44 #endif … … 85 85 , marginWidth(-1) 86 86 , marginHeight(-1) 87 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)87 #if USE(ACCELERATED_COMPOSITING) 88 88 , rootTextureMapperLayer(0) 89 89 #endif … … 105 105 #endif 106 106 107 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)107 #if USE(ACCELERATED_COMPOSITING) 108 108 void renderCompositedLayers(WebCore::GraphicsContext*, const WebCore::IntRect& clip); 109 109 #endif … … 125 125 int marginWidth; 126 126 int marginHeight; 127 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)127 #if USE(ACCELERATED_COMPOSITING) 128 128 WebCore::TextureMapperLayer* rootTextureMapperLayer; 129 129 OwnPtr<WebCore::TextureMapper> textureMapper; -
trunk/Source/WebKit/qt/Api/qwebsettings.cpp
r121241 r121710 157 157 settings->setAcceleratedCompositingFor3DTransformsEnabled(value); 158 158 settings->setAcceleratedCompositingForAnimationEnabled(value); 159 #if USE(TEXTURE_MAPPER)160 159 settings->setAcceleratedCompositingForVideoEnabled(false); 161 160 settings->setAcceleratedCompositingForPluginsEnabled(false); 162 #endif163 161 #endif 164 162 #if ENABLE(WEBGL) -
trunk/Source/WebKit/qt/ChangeLog
r121707 r121710 1 2012-07-02 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 [Qt] Get rid of GraphicsLayerQt 4 https://bugs.webkit.org/show_bug.cgi?id=78598 5 6 Reviewed by Luiz Agostini. 7 8 Removed all references to GraphicsLayerQt, including #ifdef code paths that only apply 9 when TEXTURE_MAPPER is disabled. 10 11 * Api/qgraphicswebview.cpp: 12 (QGraphicsWebView::paint): 13 * Api/qwebframe.cpp: 14 (QWebFramePrivate::renderFromTiledBackingStore): 15 (QWebFramePrivate::renderRelativeCoords): 16 * Api/qwebframe_p.h: 17 (QWebFramePrivate::QWebFramePrivate): 18 (QWebFramePrivate): 19 * Api/qwebsettings.cpp: 20 (QWebSettingsPrivate::apply): 21 * WebCoreSupport/PageClientQt.cpp: 22 (WebCore): 23 (WebCore::PageClientQGraphicsWidget::~PageClientQGraphicsWidget): 24 (WebCore::PageClientQGraphicsWidget::update): 25 (WebCore::PageClientQGraphicsWidget::syncLayers): 26 (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer): 27 * WebCoreSupport/PageClientQt.h: 28 (WebCore): 29 (WebCore::PageClientQWidget::PageClientQWidget): 30 (PageClientQWidget): 31 (PageClientQGraphicsWidget): 32 1 33 2012-07-02 Benjamin Poulain <bpoulain@apple.com> 2 34 -
trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp
r119098 r121710 65 65 #endif 66 66 67 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)67 #if USE(ACCELERATED_COMPOSITING) 68 68 #include "TextureMapper.h" 69 69 #include "texmap/TextureMapperLayer.h" … … 86 86 namespace WebCore { 87 87 88 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)88 #if USE(ACCELERATED_COMPOSITING) 89 89 TextureMapperLayerClientQt::TextureMapperLayerClientQt(QWebFrame* frame, GraphicsLayer* layer) 90 90 : m_frame(frame) … … 250 250 { 251 251 delete overlay; 252 #if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER)253 if (!rootGraphicsLayer)254 return;255 // we don't need to delete the root graphics layer. The lifecycle is managed in GraphicsLayerQt.cpp.256 rootGraphicsLayer.data()->setParentItem(0);257 view->scene()->removeItem(rootGraphicsLayer.data());258 #endif259 252 } 260 253 … … 268 261 view->update(dirtyRect); 269 262 270 createOrDeleteOverlay();271 263 if (overlay) 272 264 overlay->update(QRectF(dirtyRect)); 273 #if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER)274 syncLayers();275 #endif276 }277 278 void PageClientQGraphicsWidget::createOrDeleteOverlay()279 {280 // We don't use an overlay with TextureMapper. Instead, the overlay is drawn inside QWebFrame.281 #if !USE(TEXTURE_MAPPER)282 bool useOverlay = false;283 if (!viewResizesToContents) {284 #if USE(ACCELERATED_COMPOSITING)285 useOverlay = useOverlay || rootGraphicsLayer;286 #endif287 #if USE(TILED_BACKING_STORE)288 useOverlay = useOverlay || QWebFramePrivate::core(page->mainFrame())->tiledBackingStore();289 #endif290 }291 if (useOverlay == !!overlay)292 return;293 294 if (useOverlay) {295 overlay = new QGraphicsItemOverlay(view, page);296 overlay->setZValue(OverlayZValue);297 } else {298 // Changing the overlay might be done inside paint events.299 overlay->deleteLater();300 overlay = 0;301 }302 #endif // !USE(TEXTURE_MAPPER)303 265 } 304 266 … … 306 268 void PageClientQGraphicsWidget::syncLayers() 307 269 { 308 #if USE(TEXTURE_MAPPER)309 270 if (TextureMapperLayerClient) 310 271 TextureMapperLayerClient->syncRootLayer(); 311 #endif312 272 313 273 QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateIncludingSubframes(); 314 274 315 #if USE(TEXTURE_MAPPER)316 275 if (!TextureMapperLayerClient) 317 276 return; … … 320 279 syncTimer.startOneShot(1.0 / 60.0); 321 280 update(view->boundingRect().toAlignedRect()); 322 #endif 323 } 324 325 #if USE(TEXTURE_MAPPER) 281 } 282 326 283 void PageClientQGraphicsWidget::setRootGraphicsLayer(GraphicsLayer* layer) 327 284 { … … 340 297 TextureMapperLayerClient.clear(); 341 298 } 342 #else343 void PageClientQGraphicsWidget::setRootGraphicsLayer(GraphicsLayer* layer)344 {345 if (rootGraphicsLayer) {346 rootGraphicsLayer.data()->setParentItem(0);347 view->scene()->removeItem(rootGraphicsLayer.data());348 QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateIncludingSubframes();349 }350 351 rootGraphicsLayer = layer ? layer->platformLayer() : 0;352 353 if (rootGraphicsLayer) {354 rootGraphicsLayer.data()->setParentItem(view);355 rootGraphicsLayer.data()->setZValue(RootGraphicsLayerZValue);356 }357 createOrDeleteOverlay();358 }359 #endif360 299 361 300 void PageClientQGraphicsWidget::markForSync(bool scheduleSync) -
trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.h
r120704 r121710 44 44 namespace WebCore { 45 45 46 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)46 #if USE(ACCELERATED_COMPOSITING) 47 47 class TextureMapperLayerClientQt { 48 48 public: … … 64 64 : view(newView) 65 65 , page(newPage) 66 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)66 #if USE(ACCELERATED_COMPOSITING) 67 67 , syncTimer(this, &PageClientQWidget::syncLayers) 68 68 #endif … … 108 108 QWebPage* page; 109 109 110 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)110 #if USE(ACCELERATED_COMPOSITING) 111 111 virtual void setRootGraphicsLayer(GraphicsLayer*); 112 112 virtual void markForSync(bool scheduleSync); … … 114 114 #endif 115 115 116 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)116 #if USE(ACCELERATED_COMPOSITING) 117 117 virtual bool allowsAcceleratedCompositing() const { return true; } 118 118 #else … … 120 120 #endif 121 121 122 #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)122 #if USE(ACCELERATED_COMPOSITING) 123 123 Timer<PageClientQWidget> syncTimer; 124 124 OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient; … … 213 213 #endif 214 214 215 void createOrDeleteOverlay();216 217 215 #if USE(TILED_BACKING_STORE) 218 216 void updateTiledBackingStoreScale(); … … 237 235 238 236 #if USE(ACCELERATED_COMPOSITING) 239 #if USE(TEXTURE_MAPPER)240 237 OwnPtr<TextureMapperLayerClientQt> TextureMapperLayerClient; 241 #else242 QPointer<QGraphicsObject> rootGraphicsLayer;243 #endif244 238 // we have to flush quite often, so we use a meta-method instead of QTimer::singleShot for putting the event in the queue 245 239 Timer<PageClientQGraphicsWidget> syncTimer;
Note: See TracChangeset
for help on using the changeset viewer.