Changeset 188537 in webkit
- Timestamp:
- Aug 17, 2015 1:22:35 PM (9 years ago)
- Location:
- trunk/Source/WebKit/win
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/win/ChangeLog
r188525 r188537 1 2015-08-17 Per Arne Vollan <peavo@outlook.com> 2 3 [WinCairo] Accelerated compositing does not respect device scale factor. 4 https://bugs.webkit.org/show_bug.cgi?id=148085 5 6 Reviewed by Brent Fulgham. 7 8 Scale root layer's transformation matrix with device scale factor. 9 10 * WebCoreSupport/AcceleratedCompositingContext.cpp: 11 (AcceleratedCompositingContext::initialize): 12 (AcceleratedCompositingContext::startedAnimation): 13 (AcceleratedCompositingContext::applyDeviceScaleFactor): 14 (AcceleratedCompositingContext::compositeLayersToContext): 15 (AcceleratedCompositingContext::resizeRootLayer): 16 (AcceleratedCompositingContext::flushAndRenderLayers): 17 (AcceleratedCompositingContext::paintContents): 18 (AcceleratedCompositingContext::deviceScaleFactor): 19 * WebCoreSupport/AcceleratedCompositingContext.h: 20 * WebView.cpp: 21 (WebView::repaint): 22 1 23 2015-08-17 Sungmann Cho <sungmann.cho@navercorp.com> 2 24 -
trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.cpp
r187109 r188537 83 83 m_rootLayer->setSize(pageSize); 84 84 85 applyDeviceScaleFactor(); 86 85 87 // The non-composited contents are a child of the root layer. 86 88 m_nonCompositedContentLayer = GraphicsLayer::create(nullptr, *this); … … 151 153 } 152 154 155 void AcceleratedCompositingContext::applyDeviceScaleFactor() 156 { 157 if (!m_rootLayer) 158 return; 159 160 const FloatSize& size = m_rootLayer->size(); 161 162 TransformationMatrix m; 163 m.scale(deviceScaleFactor()); 164 // Center view 165 double tx = (size.width() - size.width() / deviceScaleFactor()) / 2.0; 166 double ty = (size.height() - size.height() / deviceScaleFactor()) / 2.0; 167 m.translate(tx, ty); 168 m_rootLayer->setTransform(m); 169 } 170 153 171 void AcceleratedCompositingContext::compositeLayersToContext(CompositePurpose purpose) 154 172 { … … 222 240 223 241 m_rootLayer->setSize(newSize); 242 243 applyDeviceScaleFactor(); 224 244 225 245 // If the newSize exposes new areas of the non-composited content a setNeedsDisplay is needed … … 359 379 if (!frame.contentRenderer() || !frame.view()) 360 380 return; 381 361 382 frame.view()->updateLayoutAndStyleIfNeededRecursive(); 362 383 … … 390 411 } 391 412 413 float AcceleratedCompositingContext::deviceScaleFactor() const 414 { 415 return m_webView.deviceScaleFactor(); 416 } 417 392 418 #endif // USE(TEXTURE_MAPPER_GL) -
trunk/Source/WebKit/win/WebCoreSupport/AcceleratedCompositingContext.h
r183234 r188537 53 53 54 54 // GraphicsLayerClient 55 virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& rectToPaint); 55 void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& rectToPaint) override; 56 float deviceScaleFactor() const override; 56 57 57 58 void initialize(); … … 96 97 bool prepareForRendering(); 97 98 bool startedAnimation(WebCore::GraphicsLayer*); 99 void applyDeviceScaleFactor(); 98 100 }; 99 101 -
trunk/Source/WebKit/win/WebView.cpp
r188215 r188537 839 839 // The contentChanged, immediate, and repaintContentOnly parameters are all based on a non- 840 840 // compositing painting/scrolling model. 841 addToDirtyRegion( windowRect);841 addToDirtyRegion(logicalWindowRect); 842 842 return; 843 843 }
Note: See TracChangeset
for help on using the changeset viewer.