Changeset 287805 in webkit
- Timestamp:
- Jan 7, 2022, 7:18:59 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r287793 r287805 1 2022-01-07 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [GPU Process] Can't getImageData on canvas larger than 4096x4096 4 https://bugs.webkit.org/show_bug.cgi?id=234321 5 <rdar://problem/83575501> 6 7 Reviewed by Tim Horton. 8 9 * fast/canvas/large-getImageData-expected.txt: Added. 10 * fast/canvas/large-getImageData.html: Added. 11 1 12 2022-01-07 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r287803 r287805 1 2022-01-07 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [GPU Process] Can't getImageData on canvas larger than 4096x4096 4 https://bugs.webkit.org/show_bug.cgi?id=234321 5 <rdar://problem/83575501> 6 7 Reviewed by Tim Horton. 8 9 We already have a policy about how big canvases can be. Simply export that policy 10 so it can be consulted from the GPU process. 11 12 Test: fast/canvas/large-getImageData.html 13 14 * html/HTMLCanvasElement.cpp: 15 (WebCore::HTMLCanvasElement::maxActivePixelMemory): 16 (WebCore::maxActivePixelMemory): Deleted. 17 * html/HTMLCanvasElement.h: 18 1 19 2022-01-07 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
r287294 r287805 203 203 } 204 204 205 s tatic inline size_tmaxActivePixelMemory()205 size_t HTMLCanvasElement::maxActivePixelMemory() 206 206 { 207 207 if (maxActivePixelMemoryForTesting) -
trunk/Source/WebCore/html/HTMLCanvasElement.h
r287294 r287805 138 138 bool isControlledByOffscreen() const; 139 139 140 WEBCORE_EXPORT static size_t maxActivePixelMemory(); 141 140 142 private: 141 143 HTMLCanvasElement(const QualifiedName&, Document&); -
trunk/Source/WebKit/ChangeLog
r287803 r287805 1 2022-01-07 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [GPU Process] Can't getImageData on canvas larger than 4096x4096 4 https://bugs.webkit.org/show_bug.cgi?id=234321 5 <rdar://problem/83575501> 6 7 Reviewed by Tim Horton. 8 9 Consult the policy for how big a canvas can be, rather than hardcoding a number. 10 11 * GPUProcess/graphics/RemoteRenderingBackend.cpp: 12 (WebKit::RemoteRenderingBackend::updateSharedMemoryForGetPixelBufferHelper): 13 1 14 2022-01-07 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
r286838 r287805 41 41 #include "RemoteRenderingBackendProxyMessages.h" 42 42 #include "WebCoreArgumentCoders.h" 43 #include <WebCore/HTMLCanvasElement.h> 43 44 #include <wtf/CheckedArithmetic.h> 44 45 #include <wtf/StdLibExtras.h> … … 199 200 MESSAGE_CHECK_WITH_RETURN_VALUE(!m_getPixelBufferSharedMemory || byteCount > m_getPixelBufferSharedMemory->size(), std::nullopt, "The existing Shmem for getPixelBuffer() is already big enough to handle the request"); 200 201 201 if (byteCount > 64 * MB) {202 // Just a sanity check. A 4K image is 36MB.202 if (byteCount > HTMLCanvasElement::maxActivePixelMemory()) { 203 // Just a sanity check. 203 204 return std::nullopt; 204 205 }
Note:
See TracChangeset
for help on using the changeset viewer.