Skip to content

Conversation

@shallawa
Copy link
Contributor

@shallawa shallawa commented Feb 7, 2023

e54cbab

Add an explicit method to getUserCTM() to GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=251839
rdar://105115245

Reviewed by NOBODY (OOPS!).

Make getCTM return the effective scale factor which is the multiplication of the
baseCTM and the userCTM. Remove the input argument IncludeDeviceScale since it is
confusing. Make another explicit method which returns the userCTM.

* Source/WebCore/html/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::drawPattern):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::getCTM const):
(WebCore::BifurcatedGraphicsContext::getUserCTM const):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::displayListForTextRun const):
* Source/WebCore/platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::drawPattern):
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::scaleFactor const):
(WebCore::GraphicsContext::scaleFactorForDrawing const):
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::getUserCTM const):
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::getCTM const):
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::applyStrokePattern):
(WebCore::GraphicsContextCG::applyFillPattern):
(WebCore::GraphicsContextCG::setCGShadow):
(WebCore::GraphicsContextCG::getCTM const):
(WebCore::GraphicsContextCG::getUserCTM const):
(WebCore::getUserToBaseCTM): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::getCTM const):
(WebCore::DisplayList::Recorder::getUserCTM const):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/mac/controls/ControlMac.mm:
(WebCore::ControlMac::drawCell):
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::getCTM const):
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
* Source/WebCore/rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::bufferForeground):
* Source/WebCore/rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):
* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm:
* Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):

e54cbab

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🛠 gtk
✅ 🧪 webkitperl ❌ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ❌ 🧪 mac-wk1 ✅ 🧪 api-gtk
✅ 🛠 tv ❌ 🧪 mac-wk2
✅ 🛠 tv-sim ❌ 🧪 mac-AS-debug-wk2
✅ 🛠 watch ✅ 🧪 mac-wk2-stress
✅ 🛠 watch-sim

@shallawa shallawa self-assigned this Feb 7, 2023
@shallawa shallawa added the Layout and Rendering For bugs with layout and rendering of Web pages. label Feb 7, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Feb 7, 2023
@shallawa shallawa removed the merging-blocked Applied to prevent a change from being merged label Feb 7, 2023
@shallawa shallawa force-pushed the eng/Add-an-explicit-method-to-getUserCTM-to-GraphicsContext branch from bf0396f to 12f8cd1 Compare February 7, 2023 09:00
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Feb 7, 2023
https://bugs.webkit.org/show_bug.cgi?id=251839
rdar://105115245

Reviewed by NOBODY (OOPS!).

Make getCTM return the effective scale factor which is the multiplication of the
baseCTM and the userCTM. Remove the input argument IncludeDeviceScale since it is
confusing. Make another explicit method which returns the userCTM.

* Source/WebCore/html/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::drawPattern):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::getCTM const):
(WebCore::BifurcatedGraphicsContext::getUserCTM const):
* Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::displayListForTextRun const):
* Source/WebCore/platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::drawPattern):
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::scaleFactor const):
(WebCore::GraphicsContext::scaleFactorForDrawing const):
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::getUserCTM const):
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::getCTM const):
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::applyStrokePattern):
(WebCore::GraphicsContextCG::applyFillPattern):
(WebCore::GraphicsContextCG::setCGShadow):
(WebCore::GraphicsContextCG::getCTM const):
(WebCore::GraphicsContextCG::getUserCTM const):
(WebCore::getUserToBaseCTM): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::getCTM const):
(WebCore::DisplayList::Recorder::getUserCTM const):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/mac/controls/ControlMac.mm:
(WebCore::ControlMac::drawCell):
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::getCTM const):
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
* Source/WebCore/rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::bufferForeground):
* Source/WebCore/rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):
* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm:
* Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:
(TestWebKitAPI::TEST):
@shallawa shallawa removed the merging-blocked Applied to prevent a change from being merged label Feb 9, 2023
@shallawa shallawa force-pushed the eng/Add-an-explicit-method-to-getUserCTM-to-GraphicsContext branch from 12f8cd1 to e54cbab Compare February 9, 2023 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Layout and Rendering For bugs with layout and rendering of Web pages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants