| Summary: | Remove 'image.isPDFDocumentImage' from ImageQualityController.cpp | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Images | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | sabouhallawa, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=121207 | ||
|
Description
Ahmad Saleem
2023-04-13 16:54:13 PDT
I think I was wrong. Looking at the history of ImageQualityController.cpp, I found the bug 121207 added the condition image.isPDFDocumentImage() in ImageQualityController::chooseInterpolationQuality(). I found this statement in the ChangeLog regarding this change: * rendering/ImageQualityController.cpp: (WebCore::ImageQualityController::shouldPaintAtLowQuality): PDFDocumentImage is also interested in/capable of low-quality painting now. I think this is correct since we usually cache the PDFDocumentImage in a CachedSubImage. And later we draw the ImageBuffer of the CachedSubImage to the GraphicsContext. To draw the ImageBuffer, we have to get a NativeImage from it and then call GraphicsContext::drawNativeImageInternal() which uses ImagePaintingOptions::interpolationQuality() to draw the image and decide whether to use the subImageCache or not. (In reply to Said Abou-Hallawa from comment #2) > I think I was wrong. > > Looking at the history of ImageQualityController.cpp, I found the bug 121207 > added the condition image.isPDFDocumentImage() in > ImageQualityController::chooseInterpolationQuality(). I found this statement > in the ChangeLog regarding this change: > > * rendering/ImageQualityController.cpp: > (WebCore::ImageQualityController::shouldPaintAtLowQuality): > PDFDocumentImage is also interested in/capable of low-quality painting > now. > > I think this is correct since we usually cache the PDFDocumentImage in a > CachedSubImage. And later we draw the ImageBuffer of the CachedSubImage to > the GraphicsContext. To draw the ImageBuffer, we have to get a NativeImage > from it and then call GraphicsContext::drawNativeImageInternal() which uses > ImagePaintingOptions::interpolationQuality() to draw the image and decide > whether to use the subImageCache or not. Closing my PR and this bug as well as RESOLVED INVALID. |