OSDN Git Service

Revert "Work around for pure virtual layers crash."
authorBen Murdoch <benm@google.com>
Fri, 18 Feb 2011 15:51:58 +0000 (15:51 +0000)
committerBen Murdoch <benm@google.com>
Fri, 18 Feb 2011 16:03:45 +0000 (16:03 +0000)
This reverts commit 2879037f2d6c595b8c16e992462ce5ca60d8fdba.

Revert the original work around as the underlying problem is fixed
with I2747dd4630a2a7dc18eae4c5fde36fd14c461747

Change-Id: Ibc1e997bca2aadc27527b6980de38603e6971770

WebCore/Android.mk
WebCore/platform/graphics/android/BackedDoubleBufferedTexture.cpp
WebCore/platform/graphics/android/TextureOwner.cpp [deleted file]
WebCore/platform/graphics/android/TextureOwner.h

index 749c9ba..27baa6d 100644 (file)
@@ -626,7 +626,6 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        platform/graphics/android/SharedBufferStream.cpp \
        platform/graphics/android/ShaderProgram.cpp \
        platform/graphics/android/SharedTexture.cpp \
-       platform/graphics/android/TextureOwner.cpp \
        platform/graphics/android/TexturesGenerator.cpp \
        platform/graphics/android/TilesManager.cpp \
        platform/graphics/android/TiledPage.cpp \
index d16b53e..7cfa480 100644 (file)
@@ -133,10 +133,9 @@ void BackedDoubleBufferedTexture::setNotBusy()
     android::Mutex::Autolock lock(m_busyLock);
     m_busy = false;
     if (m_delayedRelease) {
-        if (m_owner == m_delayedReleaseOwner) {
-            m_owner->removeOwned(this);
+        if (m_owner == m_delayedReleaseOwner)
             m_owner = 0;
-        }
+
         m_delayedRelease = false;
         m_delayedReleaseOwner = 0;
     }
@@ -207,7 +206,6 @@ bool BackedDoubleBufferedTexture::setOwner(TextureOwner* owner)
 
         if (proceed) {
             m_owner = owner;
-            owner->addOwned(this);
             return true;
         }
     }
@@ -219,7 +217,6 @@ bool BackedDoubleBufferedTexture::release(TextureOwner* owner)
     android::Mutex::Autolock lock(m_busyLock);
     if (m_owner == owner) {
         if (!m_busy) {
-            m_owner->removeOwned(this);
             m_owner = 0;
             return true;
         } else {
diff --git a/WebCore/platform/graphics/android/TextureOwner.cpp b/WebCore/platform/graphics/android/TextureOwner.cpp
deleted file mode 100644 (file)
index c4446d7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2011, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TextureOwner.h"
-
-#include "BackedDoubleBufferedTexture.h"
-
-namespace WebCore {
-
-TextureOwner::~TextureOwner()
-{
-    if (m_ownedTextures.size()) {
-        // This TextureOwner owns textures still!
-        HashSet<BackedDoubleBufferedTexture*> textures;
-        // Swap to a local copy because release will modify the iterator.
-        textures.swap(m_ownedTextures);
-        HashSet<BackedDoubleBufferedTexture*>::const_iterator it = textures.begin();
-        for (; it != textures.end(); ++it)
-            (*it)->release(this);
-    }
-}
-
-void TextureOwner::addOwned(BackedDoubleBufferedTexture* t)
-{
-    // This TextureOwner now owns texture t
-    m_ownedTextures.add(t);
-}
-
-void TextureOwner::removeOwned(BackedDoubleBufferedTexture* t)
-{
-    // This textureowner no longer owns texture t.
-    m_ownedTextures.remove(t);
-}
-}
index 684efac..aebbf90 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef TextureOwner_h
 #define TextureOwner_h
 
-#include <wtf/HashSet.h>
-
 namespace WebCore {
 
 class TiledPage;
@@ -35,15 +33,9 @@ class BackedDoubleBufferedTexture;
 
 class TextureOwner {
 public:
-    virtual ~TextureOwner();
+    virtual ~TextureOwner() { }
     virtual bool removeTexture(BackedDoubleBufferedTexture* texture) = 0;
     virtual TiledPage* page() = 0;
-
-    void addOwned(BackedDoubleBufferedTexture*);
-    void removeOwned(BackedDoubleBufferedTexture*);
-
-private:
-    WTF::HashSet<BackedDoubleBufferedTexture*> m_ownedTextures;
 };
 
 }