Changeset 178146 in webkit
- Timestamp:
- Jan 8, 2015 4:54:39 PM (9 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r178139 r178146 1 2015-01-08 Alexey Proskuryakov <ap@apple.com> 2 3 [Mac WK2] Test snapshots are 1600x1200 on Retina devices 4 https://bugs.webkit.org/show_bug.cgi?id=139884 5 6 Reviewed by Tim Horton. 7 8 * WebKitTestRunner/mac/PlatformWebViewMac.mm: (WTR::PlatformWebView::windowSnapshotImage): 9 Tell CGWindowListCreateImage to use the correct resolution. I don't really understand 10 what the "nominal resolution" is, but this appears to work in practice. 11 1 12 2015-01-08 Brent Fulgham <bfulgham@apple.com> 2 13 -
trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
r169505 r178146 231 231 { 232 232 [m_view display]; 233 RetainPtr<CGImageRef> windowSnapshotImage = adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [m_window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque)); 233 CGWindowImageOption options = kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque; 234 235 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 236 if ([m_window backingScaleFactor] == 1) 237 options |= kCGWindowImageNominalResolution; 238 #endif 239 240 RetainPtr<CGImageRef> windowSnapshotImage = adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [m_window windowNumber], options)); 234 241 235 242 // windowSnapshotImage will be in GenericRGB, as we've set the main display's color space to GenericRGB.
Note: See TracChangeset
for help on using the changeset viewer.