Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2010-03-01 Jakob Petsovits <jpetsovits@rim.com>
Reviewed by Dirk Schulze. [OpenVG] Implement support for paths https://bugs.webkit.org/show_bug.cgi?id=34366 Adds an implementation of the Path class - *almost* complete, but not quite because OpenVG does not provide access to the points in a VGPath unless one keeps track of all the points by themselves, which we decided not to do. Also hooked up to PainterOpenVG and GraphicsContext. Further introduced is SharedResourceOpenVG, which is intended as base class for paths and other OpenVG resources (images, fonts) that WebKit creates as long-lived objects. We are at a slight disadvantage here as WebKit doesn't have the concept of resources belonging to a specific (hardware graphics) context, which is the reason why EGLDisplayOpenVG had to provide a current display singleton; this class is what actually requires that functionality. Path::addArcTo() uses code by Yong Li <yoli@rim.com>. * platform/graphics/Path.cpp: * platform/graphics/Path.h: * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::drawPath): (WebCore::GraphicsContext::beginPath): (WebCore::GraphicsContext::addPath): * platform/graphics/openvg/PainterOpenVG.cpp: (WebCore::PainterOpenVG::PainterOpenVG): (WebCore::PainterOpenVG::~PainterOpenVG): (WebCore::PainterOpenVG::transformPath): (WebCore::PainterOpenVG::beginPath): (WebCore::PainterOpenVG::addPath): (WebCore::PainterOpenVG::currentPath): (WebCore::PainterOpenVG::drawPath): * platform/graphics/openvg/PainterOpenVG.h: * platform/graphics/openvg/PathOpenVG.cpp: Added. (WebCore::PlatformPathOpenVG::PlatformPathOpenVG): (WebCore::PlatformPathOpenVG::operator=): (WebCore::PlatformPathOpenVG::~PlatformPathOpenVG): (WebCore::PlatformPathOpenVG::clear): (WebCore::PlatformPathOpenVG::createPath): (WebCore::Path::Path): (WebCore::Path::~Path): (WebCore::Path::operator=): (WebCore::Path::contains): (WebCore::Path::strokeContains): (WebCore::Path::translate): (WebCore::Path::boundingRect): (WebCore::Path::strokeBoundingRect): (WebCore::Path::moveTo): (WebCore::Path::addLineTo): (WebCore::Path::addQuadCurveTo): (WebCore::Path::addBezierCurveTo): (WebCore::Path::addArcTo): (WebCore::Path::closeSubpath): (WebCore::Path::addArc): (WebCore::Path::addRect): (WebCore::Path::addEllipse): (WebCore::Path::clear): (WebCore::Path::isEmpty): (WebCore::Path::hasCurrentPoint): (WebCore::Path::debugString): (WebCore::Path::apply): (WebCore::Path::transform): (WebCore::Path::length): (WebCore::Path::pointAtLength): (WebCore::Path::normalAngleAtLength): * platform/graphics/openvg/PlatformPathOpenVG.h: Added. (WebCore::PlatformPathOpenVG::vgPath): * platform/graphics/openvg/SharedResourceOpenVG.cpp: Added. (WebCore::SharedResourceOpenVG::makeSharedContextCurrent): (WebCore::SharedResourceOpenVG::makeCompatibleContextCurrent): * platform/graphics/openvg/SharedResourceOpenVG.h: Added. Canonical link: https://commits.webkit.org/46672@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55371 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Jakob Petsovits
committed
Mar 1, 2010
1 parent
2b5b12c
commit 66ff92c86f26a22623cc3a8c36b0c7c8e958a1fe
Showing
10 changed files
with
812 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.