Changeset 270605 in webkit
- Timestamp:
- Dec 9, 2020, 3:01:08 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/GraphicsContext.cpp (modified) (1 diff)
-
WebCore/platform/graphics/GraphicsContextImpl.h (modified) (1 diff)
-
WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (modified) (1 diff)
-
WebCore/platform/graphics/displaylists/DisplayListRecorder.h (modified) (2 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r270598 r270605 1 2020-12-09 Said Abou-Hallawa <said@apple.com> 2 3 [GPU Process]: Recording an in-process ImageBuffer drawing has to convert it to a NativeImage first 4 https://bugs.webkit.org/show_bug.cgi?id=219705 5 6 Reviewed by Wenson Hsieh. 7 8 We will allow GraphicsContext::drawImageBuffer() to proceed with the 9 painting code path if the ImageBuffer is not a RemoteImageBuffer. In this 10 case ImageBuffer::draw() extracts a NativeImage from the ImageBuffer and 11 calls GraphicsContext::drawNativeImage() which will send the NativeImage 12 to GPUP. 13 14 * platform/graphics/GraphicsContext.cpp: 15 (WebCore::GraphicsContext::drawImageBuffer): 16 * platform/graphics/GraphicsContextImpl.h: 17 (WebCore::GraphicsContextImpl::canDrawImageBuffer const): 18 * platform/graphics/displaylists/DisplayListRecorder.cpp: 19 (WebCore::DisplayList::Recorder::canDrawImageBuffer const): 20 * platform/graphics/displaylists/DisplayListRecorder.h: 21 (WebCore::DisplayList::Recorder::Delegate::isCachedImageBuffer const): 22 1 23 2020-12-09 John Wilander <wilander@apple.com> 2 24 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
r269753 r270605 804 804 return; 805 805 806 if (m_impl ) {806 if (m_impl && m_impl->canDrawImageBuffer(image)) { 807 807 m_impl->drawImageBuffer(image, destination, source, options); 808 808 return; -
trunk/Source/WebCore/platform/graphics/GraphicsContextImpl.h
r269753 r270605 40 40 41 41 virtual bool hasPlatformContext() const = 0; 42 virtual bool canDrawImageBuffer(const ImageBuffer&) const { return true; } 42 43 virtual PlatformGraphicsContext* platformContext() const = 0; 43 44 -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
r269753 r270605 138 138 } 139 139 140 bool Recorder::canDrawImageBuffer(const ImageBuffer& imageBuffer) const 141 { 142 return !m_delegate || m_delegate->isCachedImageBuffer(imageBuffer); 143 } 144 140 145 void Recorder::clearShadow() 141 146 { -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
r270478 r270605 68 68 virtual void didAppendItemOfType(ItemType) { } 69 69 virtual void cacheNativeImage(NativeImage&) { } 70 virtual bool isCachedImageBuffer(const ImageBuffer&) const { return false; } 70 71 }; 71 72 … … 75 76 friend class DrawGlyphsRecorder; 76 77 bool hasPlatformContext() const override { return false; } 78 bool canDrawImageBuffer(const ImageBuffer&) const override; 77 79 PlatformGraphicsContext* platformContext() const override { return nullptr; } 78 80 -
trunk/Source/WebKit/ChangeLog
r270601 r270605 1 2020-12-09 Said Abou-Hallawa <said@apple.com> 2 3 [GPU Process]: Recording an in-process ImageBuffer drawing has to convert it to a NativeImage first 4 https://bugs.webkit.org/show_bug.cgi?id=219705 5 6 Reviewed by Wenson Hsieh. 7 8 Override the virtual method isCachedImageBuffer() which in this case 9 answers the question: is this a remote ImageBuffer or not? 10 11 * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: 12 1 13 2020-12-09 Per Arne Vollan <pvollan@apple.com> 2 14 -
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h
r270529 r270605 188 188 if (m_remoteRenderingBackendProxy) 189 189 m_remoteRenderingBackendProxy->remoteResourceCacheProxy().cacheNativeImage(image); 190 } 191 192 bool isCachedImageBuffer(const WebCore::ImageBuffer& imageBuffer) const override 193 { 194 if (!m_remoteRenderingBackendProxy) 195 return false; 196 auto cachedImageBuffer = m_remoteRenderingBackendProxy->remoteResourceCacheProxy().cachedImageBuffer(imageBuffer.renderingResourceIdentifier()); 197 ASSERT(!cachedImageBuffer || cachedImageBuffer == &imageBuffer); 198 return cachedImageBuffer; 190 199 } 191 200
Note:
See TracChangeset
for help on using the changeset viewer.