[CoordGraphics] Move UpdateAtlas, AreaAllocator into the platform layer
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Dec 2017 07:04:44 +0000 (07:04 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Dec 2017 07:04:44 +0000 (07:04 +0000)
commit23e236dadb956a45b412759754ae4eb8da6565c6
treed357571583ef637021e485f72295336708f3417e
parent2dcb58ec9843ef6db0954f066232c232f24280c9
[CoordGraphics] Move UpdateAtlas, AreaAllocator into the platform layer
https://bugs.webkit.org/show_bug.cgi?id=180641

Reviewed by Michael Catanzaro.

Source/WebCore:

Move the UpdateAtlas and AreaAllocator classes and their source files
into the platform layer. This still means using the WebCore namespace,
but apart from that these two classes have no dependency on anything in
the WebKit layer, so they can be moved from there.

No new tests -- no change in functionality.

* platform/TextureMapper.cmake:
* platform/graphics/texmap/coordinated/AreaAllocator.cpp: Renamed from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp.
(WebCore::AreaAllocator::AreaAllocator):
(WebCore::AreaAllocator::~AreaAllocator):
(WebCore::AreaAllocator::expand):
(WebCore::AreaAllocator::expandBy):
(WebCore::AreaAllocator::release):
(WebCore::AreaAllocator::overhead const):
(WebCore::AreaAllocator::roundAllocation const):
(WebCore::GeneralAreaAllocator::GeneralAreaAllocator):
(WebCore::GeneralAreaAllocator::~GeneralAreaAllocator):
(WebCore::GeneralAreaAllocator::freeNode):
(WebCore::GeneralAreaAllocator::expand):
(WebCore::fitsWithin):
(WebCore::GeneralAreaAllocator::allocate):
(WebCore::GeneralAreaAllocator::allocateFromNode):
(WebCore::GeneralAreaAllocator::splitNode):
(WebCore::GeneralAreaAllocator::updateLargestFree):
(WebCore::GeneralAreaAllocator::release):
(WebCore::GeneralAreaAllocator::overhead const):
* platform/graphics/texmap/coordinated/AreaAllocator.h: Renamed from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h.
(WebCore::nextPowerOfTwo):
(WebCore::AreaAllocator::size const):
(WebCore::AreaAllocator::minimumAllocation const):
(WebCore::AreaAllocator::setMinimumAllocation):
(WebCore::AreaAllocator::margin const):
(WebCore::AreaAllocator::setMargin):
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp: Renamed from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp.
(WebCore::UpdateAtlas::UpdateAtlas):
(WebCore::UpdateAtlas::~UpdateAtlas):
(WebCore::UpdateAtlas::buildLayoutIfNeeded):
(WebCore::UpdateAtlas::didSwapBuffers):
(WebCore::UpdateAtlas::getCoordinatedBuffer):
* platform/graphics/texmap/coordinated/UpdateAtlas.h: Renamed from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h.
(WebCore::UpdateAtlas::size const):
(WebCore::UpdateAtlas::supportsAlpha const):
(WebCore::UpdateAtlas::addTimeInactive):
(WebCore::UpdateAtlas::isInactive const):
(WebCore::UpdateAtlas::isInUse const):

Source/WebKit:

Move the UpdateAtlas and AreaAllocator classes into the platform layer,
moving over build targets and adjust UpdateAtlas class references in
CompositingCoordinator.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* PlatformWin.cmake:
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/TextureMapper.cmake
Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.cpp [moved from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp with 99% similarity]
Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.h [moved from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h with 55% similarity]
Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.cpp [moved from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp with 91% similarity]
Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.h [moved from Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h with 85% similarity]
Source/WebKit/ChangeLog
Source/WebKit/PlatformGTK.cmake
Source/WebKit/PlatformWPE.cmake
Source/WebKit/PlatformWin.cmake
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h