summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-10-12 14:56:35 -0400
committerDerek Sollenberger <djsollen@google.com>2010-10-12 14:56:35 -0400
commitc2232e10301fba77b8765957339451f605c37085 (patch)
tree87493ace2796d050f4d648a6e787d2209c926665 /WebCore
parent49bf866973cb3b2a6c74c0eab864e9562e4cbab1 (diff)
downloadexternal_webkit-c2232e10301fba77b8765957339451f605c37085.zip
external_webkit-c2232e10301fba77b8765957339451f605c37085.tar.gz
external_webkit-c2232e10301fba77b8765957339451f605c37085.tar.bz2
Remove unnecessary mutex locks from texture sharing code
The DoubleBufferedTexture currently uses a mutex to protect access to m_frontTexture on the producer functions. This mutex is not needed in the producerLock/producerRelease functions as they will always be called by the thread that sets m_frontTexture. Additionally, this data will be initialized before calls to those funtions as the thread must always call aquireContext() before calling these functions. Change-Id: I110ad357c5eed4c0f5501761174e0da4b872af5d http://b/3089605
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/DoubleBufferedTexture.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/android/DoubleBufferedTexture.cpp b/WebCore/platform/graphics/android/DoubleBufferedTexture.cpp
index e713398..7746603 100644
--- a/WebCore/platform/graphics/android/DoubleBufferedTexture.cpp
+++ b/WebCore/platform/graphics/android/DoubleBufferedTexture.cpp
@@ -95,9 +95,7 @@ EGLContext DoubleBufferedTexture::producerAcquireContext() {
}
TextureInfo* DoubleBufferedTexture::producerLock() {
- m_varLock.lock();
SharedTexture* sharedTex = getFrontTexture();
- m_varLock.unlock();
LOGV("Acquiring P Lock (%d)", sharedTex->getSourceTextureId());
TextureInfo* texInfo = sharedTex->lockSource();
LOGV("Acquired P Lock");
@@ -106,11 +104,9 @@ TextureInfo* DoubleBufferedTexture::producerLock() {
}
void DoubleBufferedTexture::producerRelease() {
- m_varLock.lock();
// get the front texture and cache the id
SharedTexture* sharedTex = getFrontTexture();
LOGV("Releasing P Lock (%d)", sharedTex->getSourceTextureId());
- m_varLock.unlock();
sharedTex->releaseSource();