WebKit Bugzilla
Attachment 349673 Details for
Bug 189579
: Build error in ImageBufferCG when compiled with IOSurfacePool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
189579.patch (text/plain), 6.77 KB, created by
Frédéric Wang (:fredw)
on 2018-09-13 08:56:07 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-09-13 08:56:07 PDT
Size:
6.77 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f024f6b73f3..1fb918c1281 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,32 @@ >+2018-09-13 Frederic Wang <fwang@igalia.com> >+ >+ Build error in ImageBufferCG when compiled with IOSurfacePool >+ https://bugs.webkit.org/show_bug.cgi?id=189579 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ IOSurface.h might be included with different value of IOSURFACE_CANVAS_BACKING_STORE, causing >+ compilation errors when files in the same unified source do not agree on the definition. >+ This patch removes the conditional on IOSURFACE_CANVAS_BACKING_STORE from IOSurface to work >+ around that issue. We also ensure that all the remaining places involving >+ IOSURFACE_CANVAS_BACKING_STORE are C++ files that explicitly include ImageBufferData.h (and >+ hence properly defines IOSURFACE_CANVAS_BACKING_STORE) although most already include it >+ indirectly via ImageBuffer.h. >+ >+ No new tests, behavior unchanged. >+ >+ * html/HTMLCanvasElement.cpp: Add ImageBuffer include since the class is used in this file. >+ * html/ImageBitmap.cpp: >+ * html/canvas/CanvasRenderingContext2DBase.cpp: >+ * html/canvas/ImageBitmapRenderingContext.cpp: >+ * platform/graphics/ImageBuffer.cpp: >+ * platform/graphics/cg/ImageBufferCG.cpp: >+ * platform/graphics/cg/ImageBufferDataCG.cpp: >+ * platform/graphics/cocoa/IOSurface.h: Forward-declare ImageBuffer to ensure we can always >+ declare createFromImageBuffer in this header. >+ * platform/graphics/cocoa/IOSurface.mm: >+ (WebCore::IOSurface::createFromImageBuffer): >+ > 2018-09-11 Ryosuke Niwa <rniwa@webkit.org> > > imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html hits assertion >diff --git a/Source/WebCore/html/HTMLCanvasElement.cpp b/Source/WebCore/html/HTMLCanvasElement.cpp >index 4537bbbe45b..6d3e883d342 100644 >--- a/Source/WebCore/html/HTMLCanvasElement.cpp >+++ b/Source/WebCore/html/HTMLCanvasElement.cpp >@@ -42,6 +42,8 @@ > #include "HTMLNames.h" > #include "HTMLParserIdioms.h" > #include "ImageBitmapRenderingContext.h" >+#include "ImageBuffer.h" >+#include "ImageBufferData.h" // Define USE_IOSURFACE_CANVAS_BACKING_STORE. > #include "ImageData.h" > #include "InspectorInstrumentation.h" > #include "JSDOMConvertDictionary.h" >diff --git a/Source/WebCore/html/ImageBitmap.cpp b/Source/WebCore/html/ImageBitmap.cpp >index 7de346707ac..fbbed989b42 100644 >--- a/Source/WebCore/html/ImageBitmap.cpp >+++ b/Source/WebCore/html/ImageBitmap.cpp >@@ -38,6 +38,7 @@ > #include "HTMLVideoElement.h" > #include "ImageBitmapOptions.h" > #include "ImageBuffer.h" >+#include "ImageBufferData.h" // Define USE_IOSURFACE_CANVAS_BACKING_STORE. > #include "ImageData.h" > #include "IntRect.h" > #include "JSImageBitmap.h" >diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp b/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >index 6d71cbe287c..3317e8e5a36 100644 >--- a/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp >@@ -49,6 +49,7 @@ > #include "HTMLVideoElement.h" > #include "ImageBitmap.h" > #include "ImageBuffer.h" >+#include "ImageBufferData.h" // Define USE_IOSURFACE_CANVAS_BACKING_STORE. > #include "ImageData.h" > #include "Path2D.h" > #include "RenderElement.h" >diff --git a/Source/WebCore/html/canvas/ImageBitmapRenderingContext.cpp b/Source/WebCore/html/canvas/ImageBitmapRenderingContext.cpp >index 84899fabb13..4e86fb7ff73 100644 >--- a/Source/WebCore/html/canvas/ImageBitmapRenderingContext.cpp >+++ b/Source/WebCore/html/canvas/ImageBitmapRenderingContext.cpp >@@ -28,6 +28,7 @@ > > #include "ImageBitmap.h" > #include "ImageBuffer.h" >+#include "ImageBufferData.h" // Define USE_IOSURFACE_CANVAS_BACKING_STORE. > #include "InspectorInstrumentation.h" > > namespace WebCore { >diff --git a/Source/WebCore/platform/graphics/ImageBuffer.cpp b/Source/WebCore/platform/graphics/ImageBuffer.cpp >index 97ba1ea1b94..f3dc1cb9f2c 100644 >--- a/Source/WebCore/platform/graphics/ImageBuffer.cpp >+++ b/Source/WebCore/platform/graphics/ImageBuffer.cpp >@@ -30,6 +30,7 @@ > > #include "ColorUtilities.h" > #include "GraphicsContext.h" >+#include "ImageBufferData.h" // Define USE_IOSURFACE_CANVAS_BACKING_STORE. > #include "IntRect.h" > #include <wtf/MathExtras.h> > >diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp >index 4216ba0b16c..1ea5f3b5d9c 100644 >--- a/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp >+++ b/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp >@@ -27,6 +27,7 @@ > > #include "config.h" > #include "ImageBuffer.h" >+#include "ImageBufferData.h" > > #if USE(CG) > >diff --git a/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp b/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp >index d42aa3448b0..47dce07af64 100644 >--- a/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp >+++ b/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.cpp >@@ -24,7 +24,7 @@ > */ > > #include "config.h" >-#include "ImageBufferData.h" >+#include "ImageBufferData.h" // Define USE_IOSURFACE_CANVAS_BACKING_STORE. > > #if USE(CG) > >diff --git a/Source/WebCore/platform/graphics/cocoa/IOSurface.h b/Source/WebCore/platform/graphics/cocoa/IOSurface.h >index 3f68ecf96fa..8888f259dbe 100644 >--- a/Source/WebCore/platform/graphics/cocoa/IOSurface.h >+++ b/Source/WebCore/platform/graphics/cocoa/IOSurface.h >@@ -39,6 +39,7 @@ class TextStream; > namespace WebCore { > > class HostWindow; >+class ImageBuffer; > > class IOSurface final { > WTF_MAKE_FAST_ALLOCATED; >@@ -89,9 +90,7 @@ public: > static std::unique_ptr<IOSurface> createFromSurface(IOSurfaceRef, CGColorSpaceRef); > WEBCORE_EXPORT static std::unique_ptr<IOSurface> createFromImage(CGImageRef); > >-#if USE(IOSURFACE_CANVAS_BACKING_STORE) > static std::unique_ptr<IOSurface> createFromImageBuffer(std::unique_ptr<ImageBuffer>); >-#endif > > WEBCORE_EXPORT static void moveToPool(std::unique_ptr<IOSurface>&&); > >diff --git a/Source/WebCore/platform/graphics/cocoa/IOSurface.mm b/Source/WebCore/platform/graphics/cocoa/IOSurface.mm >index f821ee071fa..5a6e7abb0ce 100644 >--- a/Source/WebCore/platform/graphics/cocoa/IOSurface.mm >+++ b/Source/WebCore/platform/graphics/cocoa/IOSurface.mm >@@ -108,12 +108,10 @@ void IOSurface::moveToPool(std::unique_ptr<IOSurface>&& surface) > IOSurfacePool::sharedPool().addSurface(WTFMove(surface)); > } > >-#if USE(IOSURFACE_CANVAS_BACKING_STORE) > std::unique_ptr<IOSurface> IOSurface::createFromImageBuffer(std::unique_ptr<ImageBuffer> imageBuffer) > { > return WTFMove(imageBuffer->m_data.surface); > } >-#endif > > static NSDictionary *optionsForBiplanarSurface(IntSize size, unsigned pixelFormat, size_t firstPlaneBytesPerPixel, size_t secondPlaneBytesPerPixel) > {
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 189579
:
349660
| 349673 |
349757