Changes to allow for dynamically shared library

Change-Id: I4e7f2224fbda5231b21612faa8094c7fa54d2cb9
bindAttribLocation should check webgl reserved prefix

https://bugs.webkit.org/show_bug.cgi?id=83409

Reviewed by Kenneth Russell.

Source/WebCore:

* html/canvas/WebGLRenderingContext.cpp: Check for invalid parameters for a few functions.
(WebCore):
(WebCore::WebGLRenderingContext::bindAttribLocation):
(WebCore::WebGLRenderingContext::getAttribLocation):
(WebCore::WebGLRenderingContext::getUniformLocation):

LayoutTests:

* fast/canvas/webgl/webgl-specific-expected.txt: Added webgl prefix test case for bindAttribLocation.
* fast/canvas/webgl/webgl-specific.html:

Change-Id: I825b638edc1dade64adcec86af3f2aa987f3d844
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113634 268f45cc-cd09-0410-ab3c-d52691b4dbfc

CRs-Fixed: 426323
webkit: Support video frame capture for HTML5 canvas use cases

Includes several patches cherry-picked from jb branch.

Implement MediaPlayerPrivate::hasSingleSecurityOrigin

Allows drawing video to the canvas as long as the video is not a
playlist file which may contain references from different origins. The
MediaPlayer should be the source of this knowledge.

TODO: Have the MediaPlayer check the data sources and report back to
WebKit if the playlist files have the same security origin.

Change-Id: I184c173ad454c02649d0a9930e20e037846bbe33

HTML5 video should still play when not visible

The WebGL 1.0.1 texture-npot-video test expects to be able to play video
when the video element has display:none. According to the HTML5 video
specification this is allowed. The video frames won't be painted but the
media player will still generate the frames and they can be read once
the drawImage and texImage2D APIs gain support for video.

Change-Id: Ia265a3bc8394c097ffa917809c592b6cf1ef86ec

Conflicts:

	Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp

Allow HTMLMediaElement to capture video frames

Allow HTMLMediaElement to capture video frames by implementing
MediaPlayer::paintCurrentFrameInContext.  Because the MediaPlayer and
video texture are created in the UI context, need to do signalling
between the webcore and UI threads to do the video frame capture.

Modified android media player to return accurate ready states so
that webkit can check for valid states to issue the media frame capture.
In MediaPlayerPrivateAndroid, delay ready state change to "HaveEnoughData"
only when the first video frame is available.

Changed HTMLVideoElement to create a renderer even if style specifies
display "none" so that a corresponding platform layer can be created for
the RenderVideo. This allows canvas or WebGL to access video frames even
when the video itself is not displayed.

Change-Id: I396681d8f2ec7030a380ac4ffccbd4c95892eed0

Conflicts:

	Source/WebCore/platform/graphics/android/layers/VideoLayerAndroid.cpp
	Source/WebCore/platform/graphics/android/layers/VideoLayerAndroid.h
	Source/WebCore/platform/graphics/android/layers/VideoLayerManager.cpp
	Source/WebCore/platform/graphics/android/layers/VideoLayerManager.h
	Source/WebCore/platform/graphics/android/rendering/ShaderProgram.h
	Source/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp

Add callback for player state changes from HTML5 video java proxy

Keeps VideoLayerAndroid's player state in sync with the HTML5 video java
proxy's media player state. This is required so that
paintCurrentFrameInContext calls do not capture empty video frames.

CRs-Fixed: 426323

Conflicts:
	Source/WebKit/android/jni/WebViewCore.cpp
Enable Webworkers and GC fix

Cherrypicked from Iad989ce9378c24e250827533cfc698f2e76c3be7 (#/c/157027)

Change-Id: Ib779906e3354bb541d47c7f1096e3faa611c65a7
 networking features:

        - memory cache
        - request queue priority
        - event collection mechanism
      - merging new stathub interface changes

Change-Id: I2f3fa2effb49c2050f6b6b991a9b1f0d4b692849
webkit: fix crash when memcache resource is freed

Change-Id: Iefd7bf2632aeaf0ba895073bcfee33a2cccac92c
Fix for youtube not playing in browser

Update network state when video frame is available.
Rename to available video frame functions to be consistent.
Fix bug where player state is sometimes not updated.

Change-Id: I5027fd946747975fb6161e090620a7697cd56c7d
CRs-fixed: 458557
Merge ~150 WebAudio related commits from WebKit tip to Android
WebKit

This single patch contains all the WebAudio related commits in WebKit
trunk from May 15, 2011 to Feb 1, 2012

This patch contains no integration or build fixes and WebAudio feature
is not enabled in this patch.

There are no build breakes or regressions in WebKit because of this
patch.

Cherry-picked from change-Id: I49c3905497931bc9993ae40869a9bb30a2dfa7e3

Change-Id: I6e5a5328d5377073a15da8c44841155bf592fea5
use Cpu Upload path

Use Cpu Upload mode since the Gpu mode is not working
and expected to be slower.

Change-Id: Ic58f98fdedacc6c1c10d2b701276fac5ccac934b

Conflicts:
	Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp
	Source/WebCore/platform/graphics/android/rendering/TransferQueue.h
Use combined depth and stencil buffers

Use combined depth and stencil buffers when both are requested together.
When stencil and depth buffers are requested, create a packed buffer
instead of standalone buffers and attach it to both the DEPTH_ATTACHMENT
point as well as the STENCIL_ATTACHMENT point as per
OES_packed_depth_stencil extension to GLES2.

CRs-fixed: 45920

Change-Id: I537efb611158935206c295fec8fc1a9b6d27e82b
[WebKit] WebAudio on Android

This single patch contains the following changes to enable WebAudio
support on Android
- AudioBus implementation that uses libstagefright's OMX codecs
- AudioDestination implementation that uses libmedia's AudioTrack
- FFTFrame implementation that uses KissFFT FFT library
- Neon implementation of VectorMath routines
- Integration and build fixes in WebAudio code to buid with Android(ICS)
  WebKit

Change-Id: Ia92612f5186ce84f6b6182c1837aa7cc6397193e

Conflicts:
	Android.mk
[webkit] WebAudio resources on Android

 - Package the 240  WebAudio impulse response resources
   to make them accessible through AssetManager
 - Add mutex implementation in AudioNode

Change-Id: Ibc424063e47d19f9f3cd4349a317d061158360ba
Disable OES_texture_float WebGL extension

The following WebGL 1.0.2 conformance tests are causing crashes in
WebGLRenderingContext::texImage2DImpl:

conformance/extensions/oes-texture-float-with-canvas.html
conformance/extensions/oes-texture-float-with-image-data.html
conformance/extensions/oes-texture-float-with-image.html

Turning off the extension to avoid crashing.

Change-Id: Ideaf118cbd4770cd3b1f677bf342d9cc802a6688
CRs-fixed: 427617
Notify V8 when we have many WebGL contexts

This fix is to deal with the WebGL 1.0.2
context-creation-and-destruction test which creates 500 contexts quickly
and relies on JS cleaning up contexts as they go out of scope. WebGL
context objects consume almost no memory on the JS heap, and V8 does not
know what kind of external resources are associated with them. The
garbage collector is likely not running frequently enough to dispose of
the contexts. Calling lowMemoryNotification when we have many contexts
should force a major GC and free up the WebGL resources.

Change-Id: I3c8f51ddeede899e2b6a3d14a87b8c80883dd498
CRs-fixed: 427617