ConvolverNode setBuffer() should not ASSERT on null buffer
https://bugs.webkit.org/show_bug.cgi?id=85653

Patch by Raymond Toy <rtoy@google.com> on 2012-05-07
Reviewed by Chris Rogers.

Source/WebCore:

Test: webaudio/convolver-setBuffer-null.html

* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::setBuffer):  Don't ASSERT on null buffer.

LayoutTests:

* webaudio/convolver-setBuffer-null-expected.txt: Added.
* webaudio/convolver-setBuffer-null.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Allow for asymmetric tile sizes on composited tiled layers
https://bugs.webkit.org/show_bug.cgi?id=85687

Reviewed by James Robinson.

Source/WebCore:

Update TiledLayerChromium/CCLayerTilingData/TilingData to allow for a
the width and height of tile sizes to differ. Modify TilingData to use
IntSize everywhere for these width/height pairs.

Also, remove some unused functions from TilingData.

Test: TilingDataTest.*

* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::TiledLayerChromium):
(WebCore::TiledLayerChromium::updateTileSizeAndTilingOption):
* platform/graphics/chromium/cc/CCLayerTilingData.cpp:
(WebCore::CCLayerTilingData::CCLayerTilingData):
(WebCore::CCLayerTilingData::setTileSize):
(WebCore):
(WebCore::CCLayerTilingData::tileSize):
(WebCore::CCLayerTilingData::operator=):
(WebCore::CCLayerTilingData::tileRect):
(WebCore::CCLayerTilingData::setBounds):
(WebCore::CCLayerTilingData::bounds):
* platform/graphics/chromium/cc/CCLayerTilingData.h:
(CCLayerTilingData):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::Texture):
(WebCore::Texture::create):
(WebCore::Texture::load):
(WebCore::Texture::updateSubRect):
* platform/graphics/gpu/TilingData.cpp:
(WebCore::TilingData::TilingData):
(WebCore::TilingData::setTotalSize):
(WebCore::TilingData::setMaxTextureSize):
(WebCore::TilingData::tileXIndexFromSrcCoord):
(WebCore::TilingData::tileYIndexFromSrcCoord):
(WebCore::TilingData::tileBounds):
(WebCore::TilingData::tileSizeX):
(WebCore::TilingData::tileSizeY):
(WebCore::TilingData::recomputeNumTiles):
* platform/graphics/gpu/TilingData.h:
(TilingData):
(WebCore::TilingData::totalSize):
(WebCore::TilingData::maxTextureSize):
(WebCore::TilingData::TilingData):

Source/WebKit/chromium:

Update tests for new constructor and function args. Add a few more
tests that use non-square tile sizes.

* tests/TilingDataTest.cpp:
(WebCore::TestTiling::TestTiling):
(WebCore::TEST):
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Suppress switch-without-cases warning
https://bugs.webkit.org/show_bug.cgi?id=85830

Warnings like
...\webkit\CSSGrammar.cpp(2075) : warning C4065: switch statement contains 'default' but no 'case' labels
are generated. These are bogus, so just suppress them in the build
settings.

Patch by Scott Graham <scottmg@chromium.org> on 2012-05-07
Reviewed by Dirk Pranke

No new tests, no intended functionlity change. Just changing compiler
settings.

* WebCore.gyp/WebCore.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LLInt doesn't check for Ropes when performing a character switch
https://bugs.webkit.org/show_bug.cgi?id=85837

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Make LLint check if the scrutinee of a char switch is a rope, and if
so fall back to a slow case.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(LLInt):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

LayoutTests:

Add a few tests to force the use of ropes on switch statements.

* fast/js/script-tests/switch-behaviour.js:
* fast/js/switch-behaviour-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Ensure synchronization in threaded unit tests by checking the sourceFrameNumber() to count commits
https://bugs.webkit.org/show_bug.cgi?id=85390

Reviewed by Adrienne Walker.

* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTestScrollMultipleRedraw::beginCommitOnCCThread):
(WTF::CCLayerTreeHostTestAtomicCommit::commitCompleteOnCCThread):
(WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::commitCompleteOnCCThread):
(WTF::CCLayerTreeHostTestScrollChildLayer::beginCommitOnCCThread):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix release build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CG] Separate image encoding from dataURL construction
https://bugs.webkit.org/show_bug.cgi?id=85782

Reviewed by Kenneth Russell.

Remove the implicit assumption that a dataURL is the only desired output format
of the image encoding phase.

No new tests. No behavioral change. Covered by canvas 2d and 3d tests:
    canvas/philip/tests/*toDataURL*.html
    fast/canvas/webgl/premultiplyalpha-test.html

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::CGImageEncodeToData): Image encoding helper: encode the image using the
uti-defined encoder (PNG/JPEG/etc) and output to the given CFMutableDataRef data.
(WebCore):
(WebCore::CGImageToDataURL): Refactor to use CGImageEncodeToData().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cairo] Implement ImageBuffer::copyImage for BackingStoreCopy == DontCopyBackingStore
https://bugs.webkit.org/show_bug.cgi?id=85728

Reviewed by Alejandro G. Castro.

No new tests. This should not change functionality, only increase performance.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::copyImage): Add an implementation that knows how to avoid copying the backing store.
(WebCore::ImageBuffer::draw): Use the copyImage constructor now that it knows how to
avoid copying the backing store.
(WebCore::ImageBuffer::drawPattern): Ditto.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::updateBackingStore): Use DontCopyBackingStore for Cairo
as well.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkitdirs.pm: Make determineNumberOfCPUs work on FreeBSD.
https://bugs.webkit.org/show_bug.cgi?id=81481

Patch by Raphael Kubo da Costa <rakuco@FreeBSD.org> on 2012-05-07
Reviewed by Dirk Pranke.

FreeBSD has the same sysctl interface present in Darwin to query
the number of CPUs available, so use that too.

* Scripts/webkitdirs.pm:
(determineNumberOfCPUs): Share the sysctl call with Darwin.
(isFreeBSD): Added.

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