Bug 231385

Summary: BifurcatedGraphicsContext doesn't bifurcate draw{Tiled}Image
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, hi, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Tim Horton 2021-10-07 12:49:15 PDT
BifurcatedGraphicsContext doesn't bifurcate drawTiledImage
Comment 1 Tim Horton 2021-10-07 12:52:00 PDT
Created attachment 440529 [details]
Patch
Comment 2 Tim Horton 2021-10-07 12:52:03 PDT
<rdar://problem/83922633>
Comment 3 Tim Horton 2021-10-07 12:54:44 PDT
Actually, wait... drawImage() has the same problem.
Comment 4 Tim Horton 2021-10-07 13:14:19 PDT
Created attachment 440531 [details]
Patch
Comment 5 Devin Rousso 2021-10-07 13:43:37 PDT
Comment on attachment 440531 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=440531&action=review

r=me

> Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:102
> +    ImageDrawResult drawImage(Image&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = { ImageOrientation::FromImage }) final;

Aside: it's kinda odd that the other `drawImage` are also `virtual` even though they just call into one of the other `drawImage`
Comment 6 Devin Rousso 2021-10-07 13:46:43 PDT
Comment on attachment 440531 [details]
Patch

btw do we also need to do `drawImageBuffer` (and maybe somehow `drawConsumingImageBuffer`)?
Comment 7 Tim Horton 2021-10-07 13:51:42 PDT
(In reply to Devin Rousso from comment #5)
> Comment on attachment 440531 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=440531&action=review
> 
> r=me
> 
> > Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:102
> > +    ImageDrawResult drawImage(Image&, const FloatRect& destination, const FloatRect& source, const ImagePaintingOptions& = { ImageOrientation::FromImage }) final;
> 
> Aside: it's kinda odd that the other `drawImage` are also `virtual` even
> though they just call into one of the other `drawImage`

I agree! Need to check if that is just an oversight (of mine, from June) or if something (DisplayList?) actually cares.(In reply to Devin Rousso from comment #6)
> Comment on attachment 440531 [details]
> Patch
> 
> btw do we also need to do `drawImageBuffer` (and maybe somehow
> `drawConsumingImageBuffer`)?

These *do* eventually just turn into drawNativeImage, so they should be OK. Can't get a GeneratedImage-backed ImageBuffer. Agree that it looks funny though.
Comment 8 EWS 2021-10-07 15:18:57 PDT
Committed r283747 (242669@main): <https://commits.webkit.org/242669@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440531 [details].