WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
227912
Back to front buffer copies in scaled image buffers should not hit the sub image code path
https://bugs.webkit.org/show_bug.cgi?id=227912
Summary
Back to front buffer copies in scaled image buffers should not hit the sub im...
Simon Fraser (smfr)
Reported
2021-07-13 11:20:54 PDT
Because of integral sizing of image buffers with fractional scales, we end up hitting the sub image code path here: * frame #0: 0x00000001efff61ca WebCore`WebCore::GraphicsContextCG::drawNativeImage(this=0x0000000239dde1a8, nativeImage=0x0000000232bab0c0, imageSize={ width = 1259.0, height = 142.0 }, destRect={ x = 0.0, y = 0.0, width = 392.0, height = 44.0 }, srcRect={ x = 0.0, y = 0.0, width = 1258.32007, height = 141.240005 }, options=0x00007ffee5548f80) at GraphicsContextCG.cpp:309:5 frame #1: 0x00000001f000c3c6 WebCore`WebCore::ImageBufferCGBackend::draw(this=0x000000023c3142a0, destContext=0x0000000239dde1a8, destRect={ x = 0.0, y = 0.0, width = 392.0, height = 44.0 }, srcRect={ x = 0.0, y = 0.0, width = 392.0, height = 44.0 }, options=0x00007ffee5548f80) at ImageBufferCGBackend.cpp:141:21 frame #2: 0x00000001c8b688e2 WebKit`WebCore::ConcreteImageBuffer<WebKit::ImageBufferShareableMappedIOSurfaceBackend>::draw(this=0x0000000231eba550, destContext=0x0000000239dde1a8, destRect={ x = 0.0, y = 0.0, width = 392.0, height = 44.0 }, srcRect={ x = 0.0, y = 0.0, width = 392.0, height = 44.0 }, options=0x00007ffee5548f80) at ConcreteImageBuffer.h:144:22 frame #3: 0x00000001efef9541 WebCore`WebCore::GraphicsContext::drawImageBuffer(this=0x0000000239dde1a8, image=0x0000000231eba550, destination={ x = 0.0, y = 0.0, width = 392.0, height = 44.0 }, source={ x = 0.0, y = 0.0, width = 392.0, height = 44.0 }, options=0x00007ffee5548f80) at GraphicsContext.cpp:579:11 frame #4: 0x00000001c8e4d22b WebKit`WebKit::RemoteLayerBackingStore::display(this=0x0000000220d39ea0) at RemoteLayerBackingStore.mm:302:17 frame #5: 0x00000001c9fe27ed WebKit`WebKit::PlatformCALayerRemote::recursiveBuildTransaction(this=0x0000000232b61240, context=0x0000000220da32f0, transaction=0x00007ffee55499f8) at PlatformCALayerRemote.cpp:181:102 This is a waste of cycles; we never want to hit the sub image cache for these copies, and we know we can just splat the whole buffer over.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-07-20 11:21:18 PDT
<
rdar://problem/80848640
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug