Changeset 144612 in webkit


Ignore:
Timestamp:
Mar 4, 2013 3:09:59 AM (11 years ago)
Author:
anilsson@rim.com
Message:

[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):

Location:
trunk/Source/WebCore
Files:
16 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r144610 r144612  
     12013-03-04  Arvid Nilsson  <anilsson@rim.com>
     2
     3        [BlackBerry] New files for BlackBerry::Platform::Graphics::GraphicsContext integration
     4        https://bugs.webkit.org/show_bug.cgi?id=111153
     5
     6        Reviewed by Rob Buis.
     7
     8        BlackBerry PR 293208
     9
     10        This patch contains contributions from many members of the BlackBerry
     11        WebKit team:
     12
     13        Rob Buis
     14        Robin Cao
     15        Eli Fidler
     16        Mike Lattanzio
     17        Yong Li
     18        Maxim Mogilnitsky
     19        Joshua Netterfield
     20        Arvid Nilsson
     21        Jakob Petsovits
     22        Konrad Piascik
     23        Jeff Rogers
     24        Artem Simonov
     25        Filip Spacek
     26        George Staikos
     27
     28        Covered by existing tests.
     29
     30        * platform/graphics/blackberry/FontBlackBerry.cpp: Added.
     31        (FSFixedToFloat):
     32        (FloatToFSFixed):
     33        (WebCore):
     34        (WebCore::Font::drawComplexText):
     35        (WebCore::Font::floatWidthForComplexText):
     36        (WebCore::Font::offsetForPositionForComplexText):
     37        (WebCore::Font::selectionRectForComplexText):
     38        (WebCore::Font::drawGlyphs):
     39        (WebCore::Font::canReturnFallbackFontsForComplexText):
     40        (WebCore::Font::drawEmphasisMarksForComplexText):
     41        (WebCore::Font::canExpandAroundIdeographsInComplexText):
     42        * platform/graphics/blackberry/FontCacheBlackBerry.cpp: Added.
     43        (WebCore):
     44        (WebCore::FontCache::platformInit):
     45        (WebCore::FontCache::getFontDataForCharacters):
     46        (WebCore::FontCache::getSimilarFontPlatformData):
     47        (WebCore::FontCache::getLastResortFallbackFont):
     48        (WebCore::FontCache::getTraitsInFamily):
     49        (WebCore::getFamilyNameStringFromFontDescriptionAndFamily):
     50        (WebCore::fontWeightToFontconfigWeight):
     51        (WebCore::FontCache::createFontPlatformData):
     52        * platform/graphics/blackberry/FontCustomPlatformData.h: Added.
     53        (WebCore):
     54        (FontCustomPlatformData):
     55        * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp: Added.
     56        (WebCore):
     57        (WebCore::FontCustomPlatformData::FontCustomPlatformData):
     58        (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
     59        (WebCore::FontCustomPlatformData::fontPlatformData):
     60        (WebCore::FontCustomPlatformData::supportsFormat):
     61        (WebCore::createFontCustomPlatformData):
     62        * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp: Added.
     63        (WebCore):
     64        (WebCore::FontPlatformData::FontPlatformData):
     65        (WebCore::FontPlatformData::~FontPlatformData):
     66        (WebCore::FontPlatformData::name):
     67        (WebCore::FontPlatformData::applyState):
     68        (WebCore::FontPlatformData::platformDataInit):
     69        (WebCore::FontPlatformData::platformDataAssign):
     70        (WebCore::FontPlatformData::platformIsEqual):
     71        (WebCore::FontPlatformData::description):
     72        (WebCore::FontPlatformData::harfbuzzFace):
     73        (WebCore::FontPlatformData::scaledFont):
     74        (WebCore::FontPlatformData::setFakeBold):
     75        (WebCore::FontPlatformData::setFakeItalic):
     76        (WebCore::FontPlatformData::platformFontHandle):
     77        (WebCore::FontPlatformData::isFixedPitch):
     78        * platform/graphics/blackberry/GlyphPageTreeNodeBlackBerry.cpp: Added.
     79        (WebCore):
     80        (WorldTypeScopedPtr):
     81        (WebCore::WorldTypeScopedPtr::WorldTypeScopedPtr):
     82        (WebCore::WorldTypeScopedPtr::~WorldTypeScopedPtr):
     83        (WebCore::WorldTypeScopedPtr::get):
     84        (WebCore::GlyphPage::fill):
     85        * platform/graphics/blackberry/GradientBlackBerry.cpp: Added.
     86        (WebCore):
     87        (WebCore::totalStopsNeeded):
     88        (WebCore::fillStops):
     89        (WebCore::Gradient::platformGradient):
     90        (WebCore::Gradient::platformDestroy):
     91        (WebCore::Gradient::fill):
     92        (WebCore::Gradient::setPlatformGradientSpaceTransform):
     93        * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp: Added.
     94        (WebCore):
     95        (GraphicsContextPlatformPrivate):
     96        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
     97        (WebCore::GraphicsContext::platformInit):
     98        (WebCore::GraphicsContext::platformDestroy):
     99        (WebCore::GraphicsContext::platformContext):
     100        (WebCore::GraphicsContext::savePlatformState):
     101        (WebCore::GraphicsContext::restorePlatformState):
     102        (WebCore::GraphicsContext::setIsAcceleratedContext):
     103        (WebCore::GraphicsContext::isAcceleratedContext):
     104        (WebCore::GraphicsContext::getCTM):
     105        (WebCore::GraphicsContext::concatCTM):
     106        (WebCore::GraphicsContext::setCTM):
     107        (WebCore::GraphicsContext::scale):
     108        (WebCore::GraphicsContext::rotate):
     109        (WebCore::GraphicsContext::translate):
     110        (WebCore::GraphicsContext::drawEllipse):
     111        (WebCore::GraphicsContext::strokeArc):
     112        (WebCore::GraphicsContext::drawConvexPolygon):
     113        (WebCore::GraphicsContext::drawRect):
     114        (WebCore::GraphicsContext::fillRect):
     115        (WebCore::GraphicsContext::clearRect):
     116        (WebCore::GraphicsContext::strokeRect):
     117        (WebCore::GraphicsContext::fillRoundedRect):
     118        (WebCore::GraphicsContext::roundToDevicePixels):
     119        (WebCore::GraphicsContext::setPlatformShadow):
     120        (WebCore::GraphicsContext::clearPlatformShadow):
     121        (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
     122        (WebCore::GraphicsContext::endPlatformTransparencyLayer):
     123        (WebCore::GraphicsContext::supportsTransparencyLayers):
     124        (WebCore::GraphicsContext::setLineCap):
     125        (WebCore::GraphicsContext::setLineDash):
     126        (WebCore::GraphicsContext::setLineJoin):
     127        (WebCore::GraphicsContext::setMiterLimit):
     128        (WebCore::GraphicsContext::setAlpha):
     129        (WebCore::GraphicsContext::clip):
     130        (WebCore::GraphicsContext::clipOut):
     131        (WebCore::GraphicsContext::clipConvexPolygon):
     132        (WebCore::GraphicsContext::addRoundedRectClip):
     133        (WebCore::GraphicsContext::clipOutRoundedRect):
     134        (WebCore::GraphicsContext::clipBounds):
     135        (WebCore::GraphicsContext::addInnerRoundedRectClip):
     136        (WebCore::GraphicsContext::setURLForRect):
     137        (WebCore::GraphicsContext::setPlatformTextDrawingMode):
     138        (WebCore::GraphicsContext::setPlatformStrokeColor):
     139        (WebCore::GraphicsContext::setPlatformStrokeStyle):
     140        (WebCore::GraphicsContext::setPlatformStrokeThickness):
     141        (WebCore::GraphicsContext::setPlatformFillColor):
     142        (WebCore::GraphicsContext::setPlatformCompositeOperation):
     143        (WebCore::GraphicsContext::setPlatformShouldAntialias):
     144        (WebCore::GraphicsContext::setImageInterpolationQuality):
     145        (WebCore::GraphicsContext::imageInterpolationQuality):
     146        * platform/graphics/blackberry/ITypeUtils.h: Added.
     147        (floatToITypeFixed):
     148        (intToITypeFixed):
     149        (iTypeFixedToFloat):
     150        * platform/graphics/blackberry/ImageBufferBlackBerry.cpp: Added.
     151        (WebCore):
     152        (WebCore::makeBufferCurrent):
     153        (WebCore::getImageDataInternal):
     154        (WebCore::ImageBufferData::getImageData):
     155        (WebCore::flushAndDraw):
     156        (WebCore::ImageBufferData::draw):
     157        (WebCore::ImageBuffer::ImageBuffer):
     158        (WebCore::ImageBuffer::~ImageBuffer):
     159        (WebCore::ImageBuffer::context):
     160        (WebCore::ImageBuffer::platformLayer):
     161        (WebCore::ImageBuffer::copyImage):
     162        (WebCore::ImageBuffer::clip):
     163        (WebCore::ImageBuffer::draw):
     164        (WebCore::ImageBuffer::drawPattern):
     165        (WebCore::ImageBuffer::platformTransformColorSpace):
     166        (WebCore::ImageBuffer::getUnmultipliedImageData):
     167        (WebCore::ImageBuffer::getPremultipliedImageData):
     168        (WebCore::ImageBuffer::putByteArray):
     169        (WebCore::ImageBuffer::toDataURL):
     170        * platform/graphics/blackberry/ImageBufferDataBlackBerry.h: Added.
     171        (WebCore):
     172        (ImageBufferData):
     173        * platform/graphics/blackberry/PathBlackBerry.cpp: Added.
     174        (WebCore):
     175        (WebCore::scratchContext):
     176        (WebCore::Path::Path):
     177        (WebCore::Path::~Path):
     178        (WebCore::Path::operator=):
     179        (WebCore::Path::currentPoint):
     180        (WebCore::Path::contains):
     181        (WebCore::Path::strokeContains):
     182        (WebCore::Path::translate):
     183        (WebCore::Path::boundingRect):
     184        (WebCore::Path::strokeBoundingRect):
     185        (WebCore::Path::moveTo):
     186        (WebCore::Path::addLineTo):
     187        (WebCore::Path::addQuadCurveTo):
     188        (WebCore::Path::addBezierCurveTo):
     189        (WebCore::Path::addArcTo):
     190        (WebCore::Path::closeSubpath):
     191        (WebCore::Path::addArc):
     192        (WebCore::Path::addRect):
     193        (WebCore::Path::addEllipse):
     194        (WebCore::Path::platformAddPathForRoundedRect):
     195        (WebCore::Path::clear):
     196        (WebCore::Path::isEmpty):
     197        (WebCore::Path::hasCurrentPoint):
     198        (WebCore::Path::apply):
     199        (WebCore::Path::transform):
     200        (WebCore::GraphicsContext::fillPath):
     201        (WebCore::GraphicsContext::strokePath):
     202        (WebCore::GraphicsContext::drawFocusRing):
     203        (WebCore::GraphicsContext::drawLine):
     204        (WebCore::GraphicsContext::drawLineForDocumentMarker):
     205        (WebCore::GraphicsContext::drawLineForText):
     206        (WebCore::GraphicsContext::clip):
     207        (WebCore::GraphicsContext::clipPath):
     208        (WebCore::GraphicsContext::canvasClip):
     209        (WebCore::GraphicsContext::clipOut):
     210        * platform/graphics/blackberry/PatternBlackBerry.cpp: Added.
     211        (WebCore):
     212        (WebCore::Pattern::platformDestroy):
     213        (WebCore::Pattern::platformPattern):
     214        (WebCore::Pattern::setPlatformPatternSpaceTransform):
     215        * platform/graphics/blackberry/PlatformSupport.cpp: Added.
     216        (WebCore):
     217        (WebCore::PlatformSupport::getFontFamilyForCharacters):
     218        * platform/graphics/blackberry/PlatformSupport.h: Added.
     219        (WebCore):
     220        (PlatformSupport):
     221        (FontFamily):
     222        * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp: Added.
     223        (WebCore):
     224        (WebCore::FSFixedToFloat):
     225        (WebCore::SimpleFontData::platformInit):
     226        (WebCore::SimpleFontData::platformCharWidthInit):
     227        (WebCore::SimpleFontData::platformDestroy):
     228        (WebCore::SimpleFontData::createScaledFontData):
     229        (WebCore::SimpleFontData::smallCapsFontData):
     230        (WebCore::SimpleFontData::emphasisMarkFontData):
     231        (WebCore::SimpleFontData::containsCharacters):
     232        (WebCore::SimpleFontData::determinePitch):
     233        (WebCore::SimpleFontData::platformBoundsForGlyph):
     234        (WebCore::SimpleFontData::platformWidthForGlyph):
     235        (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
     236
    12372013-03-04  Adam Bergkvist  <adam.bergkvist@ericsson.com>
    2238
Note: See TracChangeset for help on using the changeset viewer.