Build error in ImageBufferCG when compiled with IOSurfacePool
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Sep 2018 18:24:10 +0000 (18:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Sep 2018 18:24:10 +0000 (18:24 +0000)
commitc89796856db3fef889acef4e8762cc96adc978de
treea72142ce0b8f4ec6f705f0247025496aef94087e
parent1a7b86182e155b0431c02b57af047e9aef88ccd7
Build error in ImageBufferCG when compiled with IOSurfacePool
https://bugs.webkit.org/show_bug.cgi?id=189579

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-17
Reviewed by Tim Horton.

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 moves the definition of IOSURFACE_CANVAS_BACKING_STORE from ImageBufferDataCG.h
to Platform.h so that IOSURFACE_CANVAS_BACKING_STORE is set to the same value in all files.
Finally some minors changes to explicitly declare/define ImageBuffer are performed in order
to prevent future issues with Unified build rotating.

Source/WebCore:

No new tests, behavior unchanged.

* html/HTMLCanvasElement.cpp: Explicitly include ImageBuffer.h since it's used in this file.
* platform/graphics/cg/ImageBufferDataCG.h: Move definition into Platform.h.
* platform/graphics/cocoa/IOSurface.h: Forward-declare ImageBuffer since it's used in this
header.

Source/WTF:

* wtf/Platform.h: Move definition from ImageBufferDataCG.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h
Source/WebCore/platform/graphics/cocoa/IOSurface.h