WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-217166-20201001110237.patch (text/plain), 21.96 KB, created by
Said Abou-Hallawa
on 2020-10-01 11:02:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2020-10-01 11:02:38 PDT
Size:
21.96 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 267816) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2020-10-01 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ [GPU Process] Allow drawing a border and a badge for the 2D canvas if it's drawn through GPU process >+ https://bugs.webkit.org/show_bug.cgi?id=217166 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ GraphicsContextExtras.cpp is introduced to be the place where other complex >+ graphical commands can be added later. >+ >+ * Headers.cmake: >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * platform/graphics/GraphicsContextExtras.cpp: Added. >+ (WebCore::drawBorderAndBadge): >+ * platform/graphics/GraphicsContextExtras.h: Added. >+ * platform/graphics/displaylists/DisplayListRecorder.cpp: >+ > 2020-09-30 Sam Weinig <weinig@apple.com> > > [WebIDL] Make Exposed mandatory for IDL interfaces >Index: Source/WebCore/Headers.cmake >=================================================================== >--- Source/WebCore/Headers.cmake (revision 267816) >+++ Source/WebCore/Headers.cmake (working copy) >@@ -1143,6 +1143,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS > platform/graphics/GlyphPage.h > platform/graphics/Gradient.h > platform/graphics/GraphicsContext.h >+ platform/graphics/GraphicsContextExtras.h > platform/graphics/GraphicsContextGL.h > platform/graphics/GraphicsContextGLAttributes.h > platform/graphics/GraphicsContextImpl.h >Index: Source/WebCore/Sources.txt >=================================================================== >--- Source/WebCore/Sources.txt (revision 267816) >+++ Source/WebCore/Sources.txt (working copy) >@@ -1884,6 +1884,7 @@ platform/graphics/GeometryUtilities.cpp > platform/graphics/Gradient.cpp > platform/graphics/GradientImage.cpp > platform/graphics/GraphicsContext.cpp >+platform/graphics/GraphicsContextExtras.cpp > platform/graphics/GraphicsContextGL.cpp > platform/graphics/GraphicsContextImpl.cpp > platform/graphics/GraphicsLayer.cpp >Index: Source/WebCore/WebCore.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebCore/WebCore.xcodeproj/project.pbxproj (revision 267816) >+++ Source/WebCore/WebCore.xcodeproj/project.pbxproj (working copy) >@@ -1747,6 +1747,7 @@ > 550640AF2407582D00AAE045 /* PlatformImageBufferBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 550640AD240756DA00AAE045 /* PlatformImageBufferBackend.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 550640B02407587E00AAE045 /* ImageBufferCGBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 72BAC3AD23E1E545008D741C /* ImageBufferCGBackend.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 553997182525BB8500C583B0 /* GraphicsContextExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 553997162525B5CB00C583B0 /* GraphicsContextExtras.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 5546757B1FD212A9003B10B0 /* ImageSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 554675781FD1FC1A003B10B0 /* ImageSource.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 5550CB421E955E3C00111AA0 /* ImageTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 5550CB411E955E3C00111AA0 /* ImageTypes.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 555130011E7CCCCB00A69E38 /* DecodingOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 555130001E7CCCCA00A69E38 /* DecodingOptions.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -8888,6 +8889,8 @@ > 550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; > 550F664522CA89BD000A3417 /* SVGSharedPrimitiveProperty.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGSharedPrimitiveProperty.h; sourceTree = "<group>"; }; > 55137B2C20379E550001004B /* SVGMarkerTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMarkerTypes.h; sourceTree = "<group>"; }; >+ 553997152525B5CB00C583B0 /* GraphicsContextExtras.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextExtras.cpp; sourceTree = "<group>"; }; >+ 553997162525B5CB00C583B0 /* GraphicsContextExtras.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextExtras.h; sourceTree = "<group>"; }; > 554675771FD1FC1A003B10B0 /* ImageSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSource.cpp; sourceTree = "<group>"; }; > 554675781FD1FC1A003B10B0 /* ImageSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageSource.h; sourceTree = "<group>"; }; > 5550CB411E955E3C00111AA0 /* ImageTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageTypes.h; sourceTree = "<group>"; }; >@@ -17542,6 +17545,8 @@ > isa = PBXGroup; > children = ( > 6FE7DDDD20EC6E8B008B5B4E /* text */, >+ 6FE198132178397B00446F08 /* InlineContentBreaker.cpp */, >+ 6FE198152178397C00446F08 /* InlineContentBreaker.h */, > 6F7CA3C9208C2B2E002F29AB /* InlineFormattingContext.cpp */, > 6F7CA3C8208C2B2E002F29AB /* InlineFormattingContext.h */, > 6F35EFAF2187CBD50044E0F4 /* InlineFormattingContextGeometry.cpp */, >@@ -17554,8 +17559,6 @@ > 6F0CD694229ED32700C5994E /* InlineLine.h */, > 6F69A79924D6FAB800E6B85D /* InlineLineBox.cpp */, > 6FB2400323DFF12700796458 /* InlineLineBox.h */, >- 6FE198132178397B00446F08 /* InlineContentBreaker.cpp */, >- 6FE198152178397C00446F08 /* InlineContentBreaker.h */, > 6F25B200220A85AB0000011B /* InlineLineBuilder.cpp */, > 6F26EB46234004A5006906E2 /* InlineLineBuilder.h */, > 6F91420F25152137004E4FEA /* InlineLineGeometry.h */, >@@ -26046,6 +26049,8 @@ > 2D2FC0571460CD6F00263633 /* GradientImage.h */, > B2A015920AF6CD53006BCE0E /* GraphicsContext.cpp */, > B2A015930AF6CD53006BCE0E /* GraphicsContext.h */, >+ 553997152525B5CB00C583B0 /* GraphicsContextExtras.cpp */, >+ 553997162525B5CB00C583B0 /* GraphicsContextExtras.h */, > 313DE86D23A96966008FC47B /* GraphicsContextGL.cpp */, > 313DE86F23A96967008FC47B /* GraphicsContextGL.h */, > 7C330A011DF8FAC600D3395C /* GraphicsContextGLAttributes.h */, >@@ -31470,6 +31475,7 @@ > 2D481F04146B5C6B00AA7834 /* GradientImage.h in Headers */, > B2A015A90AF6CD53006BCE0E /* GraphicsContext.h in Headers */, > 934907E4125BBBC8007F23A0 /* GraphicsContextCG.h in Headers */, >+ 553997182525BB8500C583B0 /* GraphicsContextExtras.h in Headers */, > 313DE87023A96973008FC47B /* GraphicsContextGL.h in Headers */, > 7C330A021DF8FAC600D3395C /* GraphicsContextGLAttributes.h in Headers */, > 49C7B9FC1042D3650009D447 /* GraphicsContextGLOpenGL.h in Headers */, >@@ -31772,6 +31778,7 @@ > CD063F831E23FA8900812BE3 /* InitDataRegistry.h in Headers */, > A8CFF5E50A155A05000A4234 /* InlineBox.h in Headers */, > E30592641E27A3AD00D57C98 /* InlineClassicScript.h in Headers */, >+ 6FE198172178397C00446F08 /* InlineContentBreaker.h in Headers */, > B57CB52E182A3EFC0079A647 /* InlineElementBox.h in Headers */, > A8CFF5E30A155A05000A4234 /* InlineFlowBox.h in Headers */, > 6F7CA3CA208C2B2E002F29AB /* InlineFormattingContext.h in Headers */, >@@ -31780,7 +31787,6 @@ > BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */, > 6F0CD695229ED32700C5994E /* InlineLine.h in Headers */, > 6FB2400523DFF12800796458 /* InlineLineBox.h in Headers */, >- 6FE198172178397C00446F08 /* InlineContentBreaker.h in Headers */, > 6F26EB48234004A5006906E2 /* InlineLineBuilder.h in Headers */, > 6F91421125152138004E4FEA /* InlineLineGeometry.h in Headers */, > 6FC3F9472516756700A49BEA /* InlineLineRun.h in Headers */, >Index: Source/WebCore/platform/graphics/GraphicsContextExtras.cpp >=================================================================== >--- Source/WebCore/platform/graphics/GraphicsContextExtras.cpp (nonexistent) >+++ Source/WebCore/platform/graphics/GraphicsContextExtras.cpp (working copy) >@@ -0,0 +1,71 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "GraphicsContextExtras.h" >+ >+#include "Color.h" >+#include "FloatRect.h" >+#include "FontCascade.h" >+#include "GraphicsContext.h" >+#include "TextRun.h" >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+void drawBorderAndBadge(GraphicsContext& context, const FloatRect& containerRect, const FloatPoint& badgePosition, const Color& color, const String& text) >+{ >+ GraphicsContextStateSaver stateSaver(context); >+ >+ context.setShouldAntialias(false); >+ context.setStrokeColor(color); >+ context.strokeRect(containerRect, 0.5); >+ >+ const unsigned fontSize = 10; >+ FontCascadeDescription fontDescription; >+ fontDescription.setOneFamily("Arial"); >+ fontDescription.setSpecifiedSize(fontSize); >+ fontDescription.setComputedSize(fontSize); >+ >+ FontCascade cascade(WTFMove(fontDescription)); >+ cascade.update(nullptr); >+ >+ TextRun textRun(text); >+ float textWidth = cascade.width(textRun); >+ >+ FloatRect badgeRect(badgePosition, FloatSize(textWidth + 2, fontSize + 2)); >+ if (badgePosition.x() == containerRect.maxX()) >+ badgeRect.setX(badgePosition.x() - badgeRect.width()); >+ >+ if (badgePosition.y() == containerRect.maxY()) >+ badgeRect.setY(badgePosition.y() - badgeRect.height()); >+ >+ context.fillRect(badgeRect, color); >+ >+ context.setFillColor(Color::white); >+ cascade.drawText(context, textRun, FloatPoint(badgeRect.x() + 1, badgeRect.y() + 1 + fontSize)); >+} >+ >+} // namespace WebCore >Index: Source/WebCore/platform/graphics/GraphicsContextExtras.h >=================================================================== >--- Source/WebCore/platform/graphics/GraphicsContextExtras.h (nonexistent) >+++ Source/WebCore/platform/graphics/GraphicsContextExtras.h (working copy) >@@ -0,0 +1,37 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "FloatRect.h" >+ >+namespace WebCore { >+ >+class Color; >+class GraphicsContext; >+ >+WEBCORE_EXPORT void drawBorderAndBadge(GraphicsContext&, const FloatRect& containerRect, const FloatPoint& badgePosition, const Color&, const String& text); >+ >+} // namespace WebCore >Index: Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp >=================================================================== >--- Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (revision 267816) >+++ Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (working copy) >@@ -27,6 +27,7 @@ > #include "DisplayListRecorder.h" > > #include "DisplayList.h" >+#include "DisplayListDrawingContext.h" > #include "DisplayListItems.h" > #include "GraphicsContext.h" > #include "Logging.h" >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 267824) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,28 @@ >+2020-10-01 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ [GPU Process] Allow drawing a border and a badge for the 2D canvas if it's drawn through GPU process >+ https://bugs.webkit.org/show_bug.cgi?id=217166 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ WebPage will pass itself to RemoteRenderingBackend when it is created. >+ RemoteRenderingBackend can read the core page settings through the WebPage. >+ >+ RemoteImageBuffer::flushDrawingContext() will record the border and badge >+ to the ImageBuffer DisplayList before sending it to the GPU process. >+ >+ * WebProcess/GPU/graphics/RemoteImageBuffer.h: >+ * WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h: >+ (WebKit::RemoteImageBufferMessageHandler::remoteRenderingBackend const): >+ * WebProcess/GPU/graphics/RemoteRenderingBackend.cpp: >+ (WebKit::RemoteRenderingBackend::create): >+ (WebKit::RemoteRenderingBackend::RemoteRenderingBackend): >+ (WebKit::RemoteRenderingBackend::shouldDrawBorderAndBadge const): >+ (WebKit::RemoteRenderingBackend::drawBorderAndBadge): >+ * WebProcess/GPU/graphics/RemoteRenderingBackend.h: >+ * WebProcess/WebCoreSupport/WebChromeClient.cpp: >+ (WebKit::WebChromeClient::ensureRemoteRenderingBackend const): >+ > 2020-09-30 Peng Liu <peng.liu6@apple.com> > > [Media in GPU Process] Enable IPC message handlers of RemoteMediaSessionHelper >Index: Source/WebKit/WebProcess/GPU/graphics/RemoteImageBuffer.h >=================================================================== >--- Source/WebKit/WebProcess/GPU/graphics/RemoteImageBuffer.h (revision 267816) >+++ Source/WebKit/WebProcess/GPU/graphics/RemoteImageBuffer.h (working copy) >@@ -28,6 +28,7 @@ > #if ENABLE(GPU_PROCESS) > > #include "RemoteImageBufferMessageHandler.h" >+#include <WebCore/Color.h> > #include <WebCore/DisplayListImageBuffer.h> > #include <WebCore/DisplayListItems.h> > #include <WebCore/DisplayListRecorder.h> >@@ -41,6 +42,7 @@ class RemoteImageBuffer : public WebCore > using BaseDisplayListImageBuffer = WebCore::DisplayList::ImageBuffer<BackendType>; > using BaseDisplayListImageBuffer::m_backend; > using BaseDisplayListImageBuffer::m_drawingContext; >+ using BaseDisplayListImageBuffer::context; > > public: > static std::unique_ptr<RemoteImageBuffer> create(const WebCore::FloatSize& size, WebCore::RenderingMode renderingMode, float resolutionScale, WebCore::ColorSpace colorSpace, RemoteRenderingBackend& remoteRenderingBackend) >@@ -103,6 +105,9 @@ protected: > > void flushDrawingContext() override > { >+ if (auto remoteRenderingBackend = RemoteImageBufferMessageHandler::remoteRenderingBackend()) >+ remoteRenderingBackend->drawBorderAndBadge(context(), WebCore::FloatRect({ }, m_backend->logicalSize()), WebCore::Color::darkGreen, "GPU"_s); >+ > auto& displayList = m_drawingContext.displayList(); > if (displayList.itemCount()) > RemoteImageBufferMessageHandler::flushDrawingContextAndWaitCommit(displayList); >Index: Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h >=================================================================== >--- Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h (revision 267816) >+++ Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferMessageHandler.h (working copy) >@@ -58,6 +58,8 @@ public: > protected: > RemoteImageBufferMessageHandler(const WebCore::FloatSize&, WebCore::RenderingMode, float resolutionScale, WebCore::ColorSpace, RemoteRenderingBackend&); > >+ RemoteRenderingBackend* remoteRenderingBackend() const { return m_remoteRenderingBackend.get(); } >+ > virtual bool isBackendCreated() const = 0; > bool isPendingFlush() const { return m_sentFlushIdentifier != m_receivedFlushIdentifier; } > >Index: Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.cpp >=================================================================== >--- Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.cpp (revision 267816) >+++ Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.cpp (working copy) >@@ -34,17 +34,19 @@ > #include "RemoteRenderingBackendMessages.h" > #include "RemoteRenderingBackendProxyMessages.h" > #include "WebProcess.h" >+#include <WebCore/GraphicsContextExtras.h> > > namespace WebKit { > > using namespace WebCore; > >-std::unique_ptr<RemoteRenderingBackend> RemoteRenderingBackend::create() >+std::unique_ptr<RemoteRenderingBackend> RemoteRenderingBackend::create(WebPage& page) > { >- return std::unique_ptr<RemoteRenderingBackend>(new RemoteRenderingBackend()); >+ return std::unique_ptr<RemoteRenderingBackend>(new RemoteRenderingBackend(page)); > } > >-RemoteRenderingBackend::RemoteRenderingBackend() >+RemoteRenderingBackend::RemoteRenderingBackend(WebPage& page) >+ : m_page(page) > { > // Register itself as a MessageReceiver in the GPUProcessConnection. > IPC::MessageReceiverMap& messageReceiverMap = WebProcess::singleton().ensureGPUProcessConnection().messageReceiverMap(); >@@ -86,6 +88,20 @@ bool RemoteRenderingBackend::waitForComm > return connection->waitForAndDispatchImmediately<Messages::RemoteRenderingBackend::CommitImageBufferFlushContext>(m_renderingBackendIdentifier, 1_s, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives); > } > >+bool RemoteRenderingBackend::shouldDrawBorderAndBadge() const >+{ >+ return m_page.corePage()->settings().showDebugBorders(); >+} >+ >+void RemoteRenderingBackend::drawBorderAndBadge(GraphicsContext& context, const FloatRect& containerRect, const Color& color, const String& text) >+{ >+ if (!shouldDrawBorderAndBadge()) >+ return; >+ FloatRect borderRect = containerRect; >+ borderRect.inflate(-1); >+ WebCore::drawBorderAndBadge(context, borderRect, borderRect.maxXMinYCorner(), color, text); >+} >+ > std::unique_ptr<ImageBuffer> RemoteRenderingBackend::createImageBuffer(const FloatSize& size, ShouldAccelerate shouldAccelerate, float resolutionScale, ColorSpace colorSpace) > { > if (shouldAccelerate == ShouldAccelerate::Yes) { >Index: Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.h >=================================================================== >--- Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.h (revision 267816) >+++ Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackend.h (working copy) >@@ -43,12 +43,14 @@ > > namespace WebKit { > >+class WebPage; >+ > class RemoteRenderingBackend > : public IPC::MessageSender > , private IPC::MessageReceiver > , public CanMakeWeakPtr<RemoteRenderingBackend> { > public: >- static std::unique_ptr<RemoteRenderingBackend> create(); >+ static std::unique_ptr<RemoteRenderingBackend> create(WebPage&); > > ~RemoteRenderingBackend(); > >@@ -67,14 +69,19 @@ public: > bool waitForCreateImageBufferBackend(); > bool waitForCommitImageBufferFlushContext(); > >+ bool shouldDrawBorderAndBadge() const; >+ void drawBorderAndBadge(WebCore::GraphicsContext&, const WebCore::FloatRect& containerRect, const WebCore::Color&, const String& text); >+ > private: >- RemoteRenderingBackend(); >+ RemoteRenderingBackend(WebPage&); > > // Messages to be received. > void createImageBufferBackend(const WebCore::FloatSize& logicalSize, const WebCore::IntSize& backendSize, float resolutionScale, WebCore::ColorSpace, ImageBufferBackendHandle, ImageBufferIdentifier); > void commitImageBufferFlushContext(ImageBufferFlushIdentifier, ImageBufferIdentifier); > > using ImageBufferMessageHandlerMap = HashMap<ImageBufferIdentifier, RemoteImageBufferMessageHandler*>; >+ >+ WebPage& m_page; > ImageBufferMessageHandlerMap m_imageBufferMessageHandlerMap; > RenderingBackendIdentifier m_renderingBackendIdentifier { RenderingBackendIdentifier::generate() }; > }; >Index: Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (revision 267816) >+++ Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (working copy) >@@ -877,7 +877,7 @@ RefPtr<DisplayRefreshMonitor> WebChromeC > RemoteRenderingBackend& WebChromeClient::ensureRemoteRenderingBackend() const > { > if (!m_remoteRenderingBackend) >- m_remoteRenderingBackend = RemoteRenderingBackend::create(); >+ m_remoteRenderingBackend = RemoteRenderingBackend::create(m_page); > return *m_remoteRenderingBackend; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 217166
:
410204
|
410206
|
410243
|
410244
|
410256
|
411131
|
411135
|
411140
|
411142
|
411145
|
411146
|
411147
|
411148
|
413248
|
413249
|
413338
|
413987