[Cairo] Move state change operations from GraphicsContextCairo to CairoOperations
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Nov 2017 13:41:41 +0000 (13:41 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Nov 2017 13:41:41 +0000 (13:41 +0000)
commit5bef3ff653cf99d07f18f33996f535c98127979e
tree0df9f6510056c70693c4498f3ea3c4e235582262
parent4ce2858fefa678dc534a38681d82be92d632dc68
[Cairo] Move state change operations from GraphicsContextCairo to CairoOperations
https://bugs.webkit.org/show_bug.cgi?id=179610

Reviewed by Carlos Garcia Campos.

Move operations that perform Cairo state changes to the CairoOperations
file. This enforces only using the PlatformContextCairo object to
achieve the state change, leveraging the cairo_t and ShadowBlur objects
that are owned by PlatformContextCairo.

Along with state modification operations, various state query operations
are also placed under the Cairo::State namespace, again limited to the
PlatformContextCairo object.

No new tests -- no change in behavior.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::State::setStrokeThickness):
(WebCore::Cairo::State::setGlobalAlpha):
(WebCore::Cairo::State::setCompositeOperation):
(WebCore::Cairo::State::setShouldAntialias):
(WebCore::Cairo::State::setImageInterpolationQuality):
(WebCore::Cairo::State::setCTM):
(WebCore::Cairo::State::getCTM):
(WebCore::Cairo::State::setShadowValues):
(WebCore::Cairo::State::clearShadow):
(WebCore::Cairo::State::getClipBounds):
(WebCore::Cairo::State::roundToDevicePixels):
(WebCore::Cairo::State::isAcceleratedContext):
* platform/graphics/cairo/CairoOperations.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::getCTM const):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::clipBounds const):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::setPlatformStrokeThickness):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::GraphicsContext::clearPlatformShadow):
(WebCore::GraphicsContext::setPlatformAlpha):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
(WebCore::GraphicsContext::isAcceleratedContext const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
Source/WebCore/platform/graphics/cairo/CairoOperations.h
Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp