[BlackBerry] New files for BlackBerry::Platform::Graphics::GraphicsContext integration
authoranilsson@rim.com <anilsson@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2013 11:09:59 +0000 (11:09 +0000)
committeranilsson@rim.com <anilsson@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Mar 2013 11:09:59 +0000 (11:09 +0000)
commitd0f52c7101e483dd8a8ee62228365f6c160d4cd3
treedabbe8400c496105f9dd2a3952abdbb90b7a73cb
parentee53bf1d6fb01d8a3e913cfd81bd05f4368ece74
[BlackBerry] New files for BlackBerry::Platform::Graphics::GraphicsContext integration
https://bugs.webkit.org/show_bug.cgi?id=111153

Reviewed by Rob Buis.

BlackBerry PR 293208

This patch contains contributions from many members of the BlackBerry
WebKit team:

Rob Buis
Robin Cao
Eli Fidler
Mike Lattanzio
Yong Li
Maxim Mogilnitsky
Joshua Netterfield
Arvid Nilsson
Jakob Petsovits
Konrad Piascik
Jeff Rogers
Artem Simonov
Filip Spacek
George Staikos

Covered by existing tests.

* platform/graphics/blackberry/FontBlackBerry.cpp: Added.
(FSFixedToFloat):
(FloatToFSFixed):
(WebCore):
(WebCore::Font::drawComplexText):
(WebCore::Font::floatWidthForComplexText):
(WebCore::Font::offsetForPositionForComplexText):
(WebCore::Font::selectionRectForComplexText):
(WebCore::Font::drawGlyphs):
(WebCore::Font::canReturnFallbackFontsForComplexText):
(WebCore::Font::drawEmphasisMarksForComplexText):
(WebCore::Font::canExpandAroundIdeographsInComplexText):
* platform/graphics/blackberry/FontCacheBlackBerry.cpp: Added.
(WebCore):
(WebCore::FontCache::platformInit):
(WebCore::FontCache::getFontDataForCharacters):
(WebCore::FontCache::getSimilarFontPlatformData):
(WebCore::FontCache::getLastResortFallbackFont):
(WebCore::FontCache::getTraitsInFamily):
(WebCore::getFamilyNameStringFromFontDescriptionAndFamily):
(WebCore::fontWeightToFontconfigWeight):
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/blackberry/FontCustomPlatformData.h: Added.
(WebCore):
(FontCustomPlatformData):
* platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp: Added.
(WebCore):
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::FontCustomPlatformData::fontPlatformData):
(WebCore::FontCustomPlatformData::supportsFormat):
(WebCore::createFontCustomPlatformData):
* platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp: Added.
(WebCore):
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::~FontPlatformData):
(WebCore::FontPlatformData::name):
(WebCore::FontPlatformData::applyState):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::platformDataAssign):
(WebCore::FontPlatformData::platformIsEqual):
(WebCore::FontPlatformData::description):
(WebCore::FontPlatformData::harfbuzzFace):
(WebCore::FontPlatformData::scaledFont):
(WebCore::FontPlatformData::setFakeBold):
(WebCore::FontPlatformData::setFakeItalic):
(WebCore::FontPlatformData::platformFontHandle):
(WebCore::FontPlatformData::isFixedPitch):
* platform/graphics/blackberry/GlyphPageTreeNodeBlackBerry.cpp: Added.
(WebCore):
(WorldTypeScopedPtr):
(WebCore::WorldTypeScopedPtr::WorldTypeScopedPtr):
(WebCore::WorldTypeScopedPtr::~WorldTypeScopedPtr):
(WebCore::WorldTypeScopedPtr::get):
(WebCore::GlyphPage::fill):
* platform/graphics/blackberry/GradientBlackBerry.cpp: Added.
(WebCore):
(WebCore::totalStopsNeeded):
(WebCore::fillStops):
(WebCore::Gradient::platformGradient):
(WebCore::Gradient::platformDestroy):
(WebCore::Gradient::fill):
(WebCore::Gradient::setPlatformGradientSpaceTransform):
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp: Added.
(WebCore):
(GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::platformDestroy):
(WebCore::GraphicsContext::platformContext):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::setIsAcceleratedContext):
(WebCore::GraphicsContext::isAcceleratedContext):
(WebCore::GraphicsContext::getCTM):
(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::scale):
(WebCore::GraphicsContext::rotate):
(WebCore::GraphicsContext::translate):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::strokeArc):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::strokeRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::roundToDevicePixels):
(WebCore::GraphicsContext::setPlatformShadow):
(WebCore::GraphicsContext::clearPlatformShadow):
(WebCore::GraphicsContext::beginPlatformTransparencyLayer):
(WebCore::GraphicsContext::endPlatformTransparencyLayer):
(WebCore::GraphicsContext::supportsTransparencyLayers):
(WebCore::GraphicsContext::setLineCap):
(WebCore::GraphicsContext::setLineDash):
(WebCore::GraphicsContext::setLineJoin):
(WebCore::GraphicsContext::setMiterLimit):
(WebCore::GraphicsContext::setAlpha):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipOut):
(WebCore::GraphicsContext::clipConvexPolygon):
(WebCore::GraphicsContext::addRoundedRectClip):
(WebCore::GraphicsContext::clipOutRoundedRect):
(WebCore::GraphicsContext::clipBounds):
(WebCore::GraphicsContext::addInnerRoundedRectClip):
(WebCore::GraphicsContext::setURLForRect):
(WebCore::GraphicsContext::setPlatformTextDrawingMode):
(WebCore::GraphicsContext::setPlatformStrokeColor):
(WebCore::GraphicsContext::setPlatformStrokeStyle):
(WebCore::GraphicsContext::setPlatformStrokeThickness):
(WebCore::GraphicsContext::setPlatformFillColor):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
(WebCore::GraphicsContext::setPlatformShouldAntialias):
(WebCore::GraphicsContext::setImageInterpolationQuality):
(WebCore::GraphicsContext::imageInterpolationQuality):
* platform/graphics/blackberry/ITypeUtils.h: Added.
(floatToITypeFixed):
(intToITypeFixed):
(iTypeFixedToFloat):
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp: Added.
(WebCore):
(WebCore::makeBufferCurrent):
(WebCore::getImageDataInternal):
(WebCore::ImageBufferData::getImageData):
(WebCore::flushAndDraw):
(WebCore::ImageBufferData::draw):
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::~ImageBuffer):
(WebCore::ImageBuffer::context):
(WebCore::ImageBuffer::platformLayer):
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::clip):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
(WebCore::ImageBuffer::putByteArray):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/blackberry/ImageBufferDataBlackBerry.h: Added.
(WebCore):
(ImageBufferData):
* platform/graphics/blackberry/PathBlackBerry.cpp: Added.
(WebCore):
(WebCore::scratchContext):
(WebCore::Path::Path):
(WebCore::Path::~Path):
(WebCore::Path::operator=):
(WebCore::Path::currentPoint):
(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::platformAddPathForRoundedRect):
(WebCore::Path::clear):
(WebCore::Path::isEmpty):
(WebCore::Path::hasCurrentPoint):
(WebCore::Path::apply):
(WebCore::Path::transform):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::drawFocusRing):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawLineForDocumentMarker):
(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::clipPath):
(WebCore::GraphicsContext::canvasClip):
(WebCore::GraphicsContext::clipOut):
* platform/graphics/blackberry/PatternBlackBerry.cpp: Added.
(WebCore):
(WebCore::Pattern::platformDestroy):
(WebCore::Pattern::platformPattern):
(WebCore::Pattern::setPlatformPatternSpaceTransform):
* platform/graphics/blackberry/PlatformSupport.cpp: Added.
(WebCore):
(WebCore::PlatformSupport::getFontFamilyForCharacters):
* platform/graphics/blackberry/PlatformSupport.h: Added.
(WebCore):
(PlatformSupport):
(FontFamily):
* platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp: Added.
(WebCore):
(WebCore::FSFixedToFloat):
(WebCore::SimpleFontData::platformInit):
(WebCore::SimpleFontData::platformCharWidthInit):
(WebCore::SimpleFontData::platformDestroy):
(WebCore::SimpleFontData::createScaledFontData):
(WebCore::SimpleFontData::smallCapsFontData):
(WebCore::SimpleFontData::emphasisMarkFontData):
(WebCore::SimpleFontData::containsCharacters):
(WebCore::SimpleFontData::determinePitch):
(WebCore::SimpleFontData::platformBoundsForGlyph):
(WebCore::SimpleFontData::platformWidthForGlyph):
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/blackberry/FontBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/FontCacheBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/FontCustomPlatformData.h [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/GlyphPageTreeNodeBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/GradientBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/GraphicsContextBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/ITypeUtils.h [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/ImageBufferBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/ImageBufferDataBlackBerry.h [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/PathBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/PatternBlackBerry.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/PlatformSupport.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/PlatformSupport.h [new file with mode: 0644]
Source/WebCore/platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp [new file with mode: 0644]