-- Move the definition of NativeImagePtr to a separate header file. -- Remove the class ImageHandle and allow encoding and decoding NativeImagePtr directly. -- Remove the compilation directives around the DisplayList::DrawNativeImage item and the method drawNativeImage(). -- Move the drawNativeImage() methods to the sources of their callers. -- In the case of recording the drawing commands, make GraphicsContext::drawImage() process drawing the images such that primitives drawing commands are recorded. For example a BitmapImage will render a NativeImage eventually. And SVGImage will record its render tree.
Created attachment 411041 [details] Patch
Created attachment 411042 [details] Patch
Created attachment 411044 [details] Patch for review
Created attachment 411660 [details] Patch
Created attachment 411662 [details] Patch
Comment on attachment 411662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411662&action=review > Source/WebCore/platform/graphics/BitmapImage.cpp:218 > + // Subsampling may have given us an image that is smaller than size(). > + IntSize subsampledImageSize = nativeImageSize(image); > + if (options.orientation().usesWidthAsHeight()) > + subsampledImageSize = subsampledImageSize.transposedSize(); > + > + // srcRect is in the coordinates of the unsubsampled image, so we have to map it to the subsampled image. > + FloatRect adjustedSrcRect = srcRect; > + if (subsampledImageSize != srcSize) > + adjustedSrcRect = mapRect(srcRect, FloatRect({ }, srcSize), FloatRect({ }, subsampledImageSize)); What justifies this code being here and not inside GraphicsContext::drawNativeImage?
<rdar://problem/70415273>
Comment on attachment 411662 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=411662&action=review >> Source/WebCore/platform/graphics/BitmapImage.cpp:218 >> + adjustedSrcRect = mapRect(srcRect, FloatRect({ }, srcSize), FloatRect({ }, subsampledImageSize)); > > What justifies this code being here and not inside GraphicsContext::drawNativeImage? I will move this code to GraphicsContext::drawNativeImage() in bug 217596.
Committed r268669: <https://trac.webkit.org/changeset/268669> All reviewed patches have been landed. Closing bug and clearing flags on attachment 411662 [details].