Changeset 249366 in webkit
- Timestamp:
- Sep 1, 2019 11:13:03 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249364 r249366 1 2019-08-30 Brent Fulgham <bfulgham@apple.com> 2 3 [WinCairo, FTW] Properly handle device scale factor 4 https://bugs.webkit.org/show_bug.cgi?id=201361 5 6 Reviewed by Don Olmstead. 7 8 Update the Direct2D ImageBuffer/ImageBufferData classes to correctly handle 9 the device scale factor. 10 11 * platform/graphics/win/ImageBufferDataDirect2D.cpp: 12 (WebCore::ImageBufferData::putData): 13 * platform/graphics/win/ImageBufferDirect2D.cpp: 14 (WebCore::ImageBuffer::putByteArray): 15 1 16 2019-08-31 Said Abou-Hallawa <sabouhallawa@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp
r249110 r249366 173 173 Checked<int> originx = sourceRect.x(); 174 174 Checked<int> destx = (Checked<int>(destPoint.x()) + sourceRect.x()); 175 destx *= resolutionScale;176 175 ASSERT(destx.unsafeGet() >= 0); 177 176 ASSERT(destx.unsafeGet() < size.width()); … … 180 179 181 180 Checked<int> endx = (Checked<int>(destPoint.x()) + sourceRect.maxX()); 182 endx *= resolutionScale;183 181 ASSERT(endx.unsafeGet() <= size.width()); 184 182 … … 188 186 Checked<int> originy = sourceRect.y(); 189 187 Checked<int> desty = (Checked<int>(destPoint.y()) + sourceRect.y()); 190 desty *= resolutionScale;191 188 ASSERT(desty.unsafeGet() >= 0); 192 189 ASSERT(desty.unsafeGet() < size.height()); … … 195 192 196 193 Checked<int> endy = (Checked<int>(destPoint.y()) + sourceRect.maxY()); 197 endy *= resolutionScale;198 194 ASSERT(endy.unsafeGet() <= size.height()); 199 195 -
trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.h
r249110 r249366 51 51 52 52 RefPtr<Uint8ClampedArray> getData(AlphaPremultiplication, const IntRect&, const IntSize&, bool accelerateRendering, float resolutionScale) const; 53 void putData(const Uint8ClampedArray& source, AlphaPremultiplication sourceFormat, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint, const IntSize&, bool accelerateRendering, float resolutionScale );53 void putData(const Uint8ClampedArray& source, AlphaPremultiplication sourceFormat, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint, const IntSize&, bool accelerateRendering, float resolutionScale = 1.0f); 54 54 55 55 COMPtr<ID2D1Bitmap> compatibleBitmap(ID2D1RenderTarget*); -
trunk/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp
r249335 r249366 325 325 IntRect scaledSourceRect = sourceRect; 326 326 IntSize scaledSourceSize = sourceSize; 327 IntPoint scaledDestPoint = destPoint; 328 327 329 if (coordinateSystem == LogicalCoordinateSystem) { 328 330 scaledSourceRect.scale(m_resolutionScale); 329 331 scaledSourceSize.scale(m_resolutionScale); 330 } 331 332 m_data.putData(source, bufferFormat, scaledSourceSize, scaledSourceRect, destPoint, internalSize(), context().isAcceleratedContext(), 1); 332 scaledDestPoint.scale(m_resolutionScale); 333 } 334 335 m_data.putData(source, bufferFormat, scaledSourceSize, scaledSourceRect, scaledDestPoint, internalSize(), context().isAcceleratedContext()); 333 336 } 334 337 -
trunk/Source/WebKit/ChangeLog
r249359 r249366 1 2019-08-30 Brent Fulgham <bfulgham@apple.com> 2 3 [WinCairo, FTW] Properly handle device scale factor 4 https://bugs.webkit.org/show_bug.cgi?id=201361 5 6 Reviewed by Don Olmstead. 7 8 Update the WebView and WebProcess to correctly handle 9 the device scale factor. 10 11 * UIProcess/win/WebView.cpp: 12 (WebKit::WebView::WebView): Tell the page the current device scale factor. 13 * WebProcess/win/WebProcessMainWin.cpp: 14 (WebKit::WebProcessMainWin): Tell the process to be aware of device scale. 15 1 16 2019-08-31 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebKit/UIProcess/win/WebView.cpp
r249335 r249366 46 46 #include <WebCore/Editor.h> 47 47 #include <WebCore/FloatRect.h> 48 #include <WebCore/GDIUtilities.h> 48 49 #include <WebCore/HWndDC.h> 49 50 #include <WebCore/IntRect.h> … … 247 248 WebProcessPool* processPool = pageConfiguration->processPool(); 248 249 m_page = processPool->createWebPage(*m_pageClient, WTFMove(pageConfiguration)); 250 m_page->setIntrinsicDeviceScaleFactor(WebCore::deviceScaleFactorForWindow(parentWindow)); 249 251 m_page->initializeWebPage(); 250 252 -
trunk/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp
r248444 r249366 47 47 HRESULT hr = ::CoInitializeEx(nullptr, COINIT_MULTITHREADED); 48 48 RELEASE_ASSERT(SUCCEEDED(hr)); 49 50 ::SetProcessDPIAware(); 51 49 52 return AuxiliaryProcessMain<WebProcess, WebProcessMain>(argc, argv); 50 53 } -
trunk/Tools/ChangeLog
r249358 r249366 1 2019-08-30 Brent Fulgham <bfulgham@apple.com> 2 3 [WinCairo, FTW] Properly handle device scale factor 4 https://bugs.webkit.org/show_bug.cgi?id=201361 5 6 Reviewed by Don Olmstead. 7 8 Reset zoom to 1.0; device scale is handled elsewhere. 9 10 * MiniBrowser/win/WebKitBrowserWindow.cpp: 11 (WebKitBrowserWindow::resetZoom): 12 1 13 2019-08-30 Zhifei Fang <zhifei_fang@apple.com> 2 14 -
trunk/Tools/MiniBrowser/win/WebKitBrowserWindow.cpp
r249245 r249366 282 282 { 283 283 auto page = WKViewGetPage(m_view.get()); 284 WKPageSetPageZoomFactor(page, WebCore::deviceScaleFactorForWindow(hwnd()));284 WKPageSetPageZoomFactor(page, 1.0); 285 285 } 286 286
Note: See TracChangeset
for help on using the changeset viewer.