-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Win] Add an alternative Skia backend support #36469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
EWS run on previous version of this PR (hash 12c1ba4) |
EWS run on previous version of this PR (hash f5109d6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is fine in terms of the build but have one large issue with it
We should not be hand rolling any serialization code and land #27902 . Can you check to see if it works for you?
Other thing is do we really need harfbuzz? If we can avoid adding it in that would be ideal.
EWS run on previous version of this PR (hash 92d7c1c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this SkImage always unaccelerated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, at the moment.
WebKit/Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp
Lines 221 to 223 in 1b0ca73
// Making an unconditionally unaccelerated buffer here is OK because this code | |
// isn't used by any platforms that respect the accelerated bit. | |
auto imageBuffer = ImageBuffer::create(targetRect.size(), RenderingPurpose::Unspecified, 1, DestinationColorSpace::SRGB(), ImageBufferPixelFormat::BGRA8); |
ImageBufferOptions::Accelerated
has to be specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we add this to WebCoreFont with a skia ifdef? I'm not sure we want a generic Skia file for serializations, I think it's better to have different files for different things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all skia types SkString
, SkFontStyle::Slant
, SkColorSpace
, SkData
can be moved to this Skia.serialization.in
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use serialization.in files instead of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need more documents to migrate. It took hours to me to find out the undocumented "wrapped by" keyword.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrapped by
is only for ObjC type. I can't use it for Skia types now. Needs to modify generate-serializers.py. Will try in a follow up patch.
EWS run on current version of this PR (hash fc99e13) |
https://bugs.webkit.org/show_bug.cgi?id=269117 Reviewed by Carlos Garcia Campos. Build out the bundled Skia. Harfbuzz is required. > build-webkit --cmakeargs="-DUSE_SKIA=1" There are still some problems. * custom fonts don't work. * pixel formats of video isn't correct * linked font doesn't work. * Not implemented yet: GraphicsContext::releaseWindowsContext, DragImageWin.cpp and ImageAdapterWin.cpp * Source/ThirdParty/skia/CMakeLists.txt: * Source/WebCore/PlatformWin.cmake: * Source/WebCore/platform/graphics/Color.h: * Source/WebCore/platform/graphics/FontCache.cpp: * Source/WebCore/platform/graphics/FontCache.h: * Source/WebCore/platform/graphics/FontCustomPlatformData.h: * Source/WebCore/platform/graphics/FontPlatformData.h: (WebCore::FontPlatformDataAttributes::FontPlatformDataAttributes): (WebCore::FontPlatformData::hfont const): * Source/WebCore/platform/graphics/skia/FontCacheSkia.cpp: (WebCore::FontCache::platformInit): (WebCore::FontCache::fontManager const): * Source/WebCore/platform/graphics/skia/FontPlatformDataSkia.cpp: (WebCore::FontPlatformData::create): (WebCore::FontPlatformData::attributes const): * Source/WebCore/platform/graphics/skia/ImageBufferSkiaBackend.h: * Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * Source/WebCore/platform/graphics/win/FontPlatformDataWin.cpp: (WebCore::FontPlatformData::FontPlatformData): * Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * Source/WebCore/platform/graphics/win/ImageAdapterWin.cpp: (WebCore::ImageAdapter::getHBITMAPOfSize): (WebCore::ImageAdapter::nativeImageOfHBITMAP): * Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): * Source/WebCore/platform/graphics/win/cairo/FontPlatformDataWinCairo.cpp: (WebCore::FontPlatformData::FontPlatformData): (WebCore::FontPlatformData::platformIsEqual const): (WebCore::FontPlatformData::familyName const): * Source/WebCore/platform/win/DragImageWin.cpp: (WebCore::createDragImageForLink): (WebCore::createDragImageFromImage): (WebCore::scaleDragImage): * Source/WebKit/PlatformWin.cmake: * Source/WebKit/Platform/Skia.cmake: * Source/WebKit/Shared/WebCoreArgumentCoders.h: * Source/WebKit/Shared/WebCoreFont.serialization.in: * Source/WebKit/Shared/skia/Skia.serialization.in: Added. * Source/WebKit/Shared/skia/WebCoreArgumentCodersSkia.cpp: (IPC::ArgumentCoder<SkString>::encode): (IPC::ArgumentCoder<SkString>::decode): (IPC::ArgumentCoder<SkFontStyle::Slant>::encode): (IPC::ArgumentCoder<SkFontStyle::Slant>::decode): * Source/WebKit/Shared/win/WebCoreArgumentCodersWin.cpp: * Source/WebKit/UIProcess/BackingStore.h: * Source/WebKit/UIProcess/skia/BackingStoreSkia.cpp: (WebKit::BackingStore::paint): * Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::paint): * Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.h: * Source/WebKit/UIProcess/win/WebView.cpp: (WebKit::WebView::paint): * Source/cmake/OptionsWin.cmake: * Tools/ImageDiff/PlatformWin.cmake: * Tools/TestWebKitAPI/Tests/WebCore/win/LinkedFonts.cpp: * Tools/WebKitTestRunner/PlatformWin.cmake: * Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp: (WTR::generateCairoSurfaceFromBitmap): (WTR::PlatformWebView::windowSnapshotImage): Canonical link: https://commits.webkit.org/286632@main
fc99e13
to
5bd5f37
Compare
Committed 286632@main (5bd5f37): https://commits.webkit.org/286632@main Reviewed commits have been landed. Closing PR #36469 and removing active labels. |
5bd5f37
fc99e13
🧪 mac-AS-debug-wk2🧪 mac-intel-wk2