[Chromium] Introduce caches for HarfBuzzShaper
https://bugs.webkit.org/show_bug.cgi?id=97993

Reviewed by Tony Chang.

- Implement canRenderCombiningCharacterSequence() for ports which use
HarfBuzzShaper. This function caches the result and will improve the
performance of HarfBuzzShaper::collectHarfBuzzRuns.
- Add a HashMap to HarfBuzzNGFace. It is used as a cache that holds
glyph indexes of codepoints. It reduces the number of
SkPaint::textToGlyphs() calls.

This patch makes the intl2 page cycler 4.4% faster on my machine.

No new tests. No changes in behavior.

* platform/graphics/SimpleFontData.h:
(SimpleFontData): Enabled canRenderCombiningCharacterSequence() if USE(HARFBUZZ_NG) is enabled.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore):
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence): Added.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
(WebCore):
(FaceCacheEntry): Added.
(WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
Lookup the cache entry in harfBuzzFaceCache. Create the entry if there is no entry in the cache.
Increment the ref count of the entry and set cache entry values to member variables.
(WebCore::HarfBuzzNGFace::~HarfBuzzNGFace):
Decrement the ref count of the cache entry. Remove the entry if no one refers the cache.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
(HarfBuzzNGFace):
* platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
(HarfBuzzFontData): Added. Used as |userData| of harfbuzz callback functions.
(WebCore):
(WebCore::SkiaGetGlyphWidthAndExtents):
(WebCore::harfbuzzGetGlyph):
Look up the glyphChache first. If the cache entry doesn't exist, call
SkPaint::textToGlyphs() to get glyph index and store it to the cache.
(WebCore::harfbuzzGetGlyphHorizontalAdvance):
(WebCore::harfbuzzGetGlyphExtents):
(WebCore::destroyHarfBuzzFontData): Added.
(WebCore::HarfBuzzNGFace::createFont):
Create HarfBuzzFontData and pass it to harfbuzz.
* platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult):
Don't initialize m_glyphToCharacterIndexes here.
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
Use SimpleFontData::canRenderCombiningCharacterSequence() instead of
fontDataForCombiningCharacterSequence().
(WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
Set glyphToCharacterIndexes of the current HarfBuzzRun.
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore):
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence): Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/12407920> Need to keep track of messages posted to injected bundle before creating a page
        https://bugs.webkit.org/show_bug.cgi?id=98210

        Reviewed by Anders Carlsson.

        Restore the pending message functionality, but only for shared process mode, and
        under a different name.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::setProcessModel):
        (WebKit::WebContext::createNewWebProcess):
        (WebKit::WebContext::postMessageToInjectedBundle):
        * UIProcess/WebContext.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test rebaselines now that the Chromium Lion bot has been upgraded to 10.7.5.
All the differences are anti-aliasing in gradients.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Define watch list "webkitperl", "SVNScripts", and "XSS" to watch for changes
to Tools/Scripts/{VCSUtils.pm, webkitdirs.pm, webkitperl}, Tools/Scripts/svn-*
scripts, and files whose name contains the word "XSS", respectively. Subscribe
myself to these lists.

* Scripts/webkitpy/common/config/watchlist:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose some GPU Information
https://bugs.webkit.org/show_bug.cgi?id=97813

Reviewed by Sam Weinig and Ken Russell and Tim Horton.

Currently there are a few places in the WebGL code (and elsewhere, like CSS filters)
where we do some feature detection by examining the GPU vendor and its capabilities.
This patch puts this detection into our shared Extensions3D object.

* platform/graphics/Extensions3D.h: Adds the new methods for detecting vendor and features.
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D): No longer needs function to detect multisampling on ATI.
* platform/graphics/chromium/Extensions3DChromium.h: Stub implementations of all
the new methods. Chromium does its detection elsewhere.
(WebCore::Extensions3DChromium::isNVIDIA):
(WebCore::Extensions3DChromium::isAMD):
(WebCore::Extensions3DChromium::isIntel):
(WebCore::Extensions3DChromium::vendor):
(Extensions3DChromium):
(WebCore::Extensions3DChromium::maySupportMultisampling):
(WebCore::Extensions3DChromium::requiresBuiltInFunctionEmulation):
* platform/graphics/filters/FECustomFilter.cpp:
(WebCore::FECustomFilter::createMultisampleBuffer): Add test for system multisampling to
custom filter code.
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::create): Add test for system multisampling to drawing buffer's
creation code.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): Detects all the features
as the object is created.
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Can now simply ask
itself if it needs to turn on built-in function translation.
* platform/graphics/opengl/Extensions3DOpenGLCommon.h:
(Extensions3DOpenGLCommon):
(WebCore::Extensions3DOpenGLCommon::isNVIDIA):
(WebCore::Extensions3DOpenGLCommon::isAMD):
(WebCore::Extensions3DOpenGLCommon::isIntel):
(WebCore::Extensions3DOpenGLCommon::vendor):
(WebCore::Extensions3DOpenGLCommon::maySupportMultisampling):
(WebCore::Extensions3DOpenGLCommon::requiresBuiltInFunctionEmulation):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::validateAttributes): Ask the extension object instead of
testing directly.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::validateDepthStencil): Ask the extension object instead
of testing directly.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make TiledBacking slightly less aware of scrolling
https://bugs.webkit.org/show_bug.cgi?id=98216

Reviewed by Anders Carlsson.

TiledBacking shouldn't really care about there being scrollbars;
recast this in terms of "tile coverage", described by a bitfield
that has flags for coverage optimized for horizontal and vertical
scrolling. This allows for additional tile coverage behaviors later.

* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileCache.h:
* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::TileCache): Initialize m_isInWindow to false to
be more conservative. It gets explicitly set by the only caller now, so this is
not a behavior change.
(WebCore::TileCache::setIsInWindow):
(WebCore::TileCache::setTileCoverage):
(WebCore::TileCache::tileCoverageRect):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore: == Rolled over to ChangeLog-2012-10-02 ==

Source/WebCore: == Rolled over to ChangeLog-2012-10-02 ==

Source/WebKit/chromium: == Rolled over to ChangeLog-2012-10-02 ==

Source/WebKit/mac: == Rolled over to ChangeLog-2012-10-02 ==

Source/WebKit2: == Rolled over to ChangeLog-2012-10-02 ==

Tools: == Rolled over to ChangeLog-2012-10-02 ==

LayoutTests: == Rolled over to ChangeLog-2012-10-02 ==

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add htons/htonl definitions and implementations
https://bugs.webkit.org/show_bug.cgi?id=98054

Reviewed by Darin Adler.

Source/WebCore:

Update users of htons and friends to use new wtf/ByteOrder.h header.

No new tests - just refactoring.

* platform/graphics/WOFFFileFormat.cpp:
* platform/graphics/chromium/VDMXParser.cpp:

Source/WTF:

For parsing or serializing binary data, byte order matters. The canonical htons/htonl/
ntohs/ntohl functions are not present everywhere, so implementations are proliferating in
parsers. Expose a new WTF header (wtf/ByteOrder.h) that includes the standard
implementations on UNIX-like OSs and provides basic inlined implementations on Windows.

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/ByteOrder.h: Added.
(WTF::wswap32): Inline functions so arguments are only evaluated once.
(WTF::bswap32):
(WTF::bswap16):
(ntohs): Inline functions on OS(WINDOWS) to match macros on OS(UNIX)
(htons):
(ntohl):
(htonl):
* wtf/CMakeLists.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Snow Leopard build.

* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130239 268f45cc-cd09-0410-ab3c-d52691b4dbfc