OSDN Git Service

Merge changes I55c6d71a,Ifb3277d4,Ia1b847a2,I7ba9cf3f,Ida2b2a8a,I1280ec90,I72f818d5...
authorSteve Block <steveblock@google.com>
Wed, 8 Jun 2011 15:26:01 +0000 (08:26 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 8 Jun 2011 15:26:01 +0000 (08:26 -0700)
* changes:
  Merge WebKit at r82507: Update ThirdPartyProject.prop
  Merge WebKit at r82507: Cherry-pick change r88166 to add INSPECTOR guards to ScriptProfiler
  Merge WebKit at r82507: Work around a V8 bug
  Merge WebKit at r82507: JNIType renamed to JavaType
  Merge WebKit at r82507: IconDatabaseClient interface expanded
  Merge WebKit at r82507: Don't use new loss-free code path in HTMLCanvasElement::toDataURL()
  Merge WebKit at r82507: IcondDatabaseBase::iconForPageURL() renamed
  Merge WebKit at r82507: IconDatabaseBase::Open() signature changed
  Merge WebKit at r82507: Node::isContentEditable() renamed
  Merge WebKit at r82507: Use icon database through IconDatabaseBase
  Merge WebKit at r82507: toInputElement() is now a member of Node
  Merge WebKit at r82507: FrameLoaderClient::objectContentType() signature changed
  Merge WebKit at r82507: StringImpl::computeHash() removed
  Merge WebKit at r82507: Stub out FontPlatformData::setOrientation()
  Merge WebKit at r82507: Path::strokeBoundingRect() is now const
  Merge WebKit at r82507: Add missing UnusedParam.h include in ApplicationCacheGroup.cpp
  Merge WebKit at r82507: Continue to use Android's version of FontPlatformData.h
  Merge WebKit at r82507: Update signature of FontCustomPlatformData::fontPlatformData()
  Merge WebKit at r82507: Fix conflicts due to JNI refactoring
  Merge WebKit at r82507: Fix conflicts due to new StorageTracker
  Merge WebKit at r82507: Fix conflicts
  Merge WebKit at r82507: Fix makefiles
  Merge WebKit at r82507: Initial merge by git

Source/WebCore/Android.mk
Source/WebCore/platform/graphics/android/BaseTile.h
Source/WebCore/platform/graphics/android/SharedTexture.cpp
Source/WebCore/platform/graphics/android/SharedTexture.h
Source/WebCore/platform/graphics/android/TextureInfo.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/android/TextureInfo.h [new file with mode: 0644]

index 83c2182..83bfc91 100644 (file)
@@ -658,6 +658,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        platform/graphics/android/SharedBufferStream.cpp \
        platform/graphics/android/ShaderProgram.cpp \
        platform/graphics/android/SharedTexture.cpp \
+       platform/graphics/android/TextureInfo.cpp \
        platform/graphics/android/TexturesGenerator.cpp \
        platform/graphics/android/TilesManager.cpp \
        platform/graphics/android/TiledPage.cpp \
index 03b96ce..a48378b 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "HashMap.h"
 #include "PerformanceMonitor.h"
-#include "SharedTexture.h"
+#include "TextureInfo.h"
 #include "SkBitmap.h"
 #include "SkCanvas.h"
 #include "SkRect.h"
index 040a28a..829cdcf 100644 (file)
 
 namespace WebCore {
 
-TextureInfo::TextureInfo()
-{
-    m_textureId = GL_NO_TEXTURE;
-    m_width = 0;
-    m_height = 0;
-    m_internalFormat = 0;
-}
-
-bool TextureInfo::equalsAttributes(const TextureInfo* otherTexture)
-{
-    return otherTexture->m_width == m_width
-        && otherTexture->m_height == m_height
-        && otherTexture->m_internalFormat == m_internalFormat;
-}
-
-void TextureInfo::copyAttributes(const TextureInfo* sourceTexture)
-{
-    m_width = sourceTexture->m_width;
-    m_height = sourceTexture->m_height;
-    m_internalFormat = sourceTexture->m_internalFormat;
-}
-
-bool TextureInfo::operator==(const TextureInfo& otherTexture)
-{
-    return otherTexture.m_textureId == m_textureId && equalsAttributes(&otherTexture);
-}
-
 SharedTexture::SharedTexture()
 {
     m_eglImage = EGL_NO_IMAGE_KHR;
index 37d6091..376eeb3 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef SharedTexture_h
 #define SharedTexture_h
 
+#include "TextureInfo.h"
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
 #include <GLES2/gl2.h>
 
 namespace WebCore {
 
-static const GLuint GL_NO_TEXTURE = 0;
-
-/**
- * TextureInfo is a class that stores both the texture and metadata about the
- * texture.
- */
-class TextureInfo {
-public:
-
-    TextureInfo();
-
-    bool equalsAttributes(const TextureInfo* otherTexture);
-    void copyAttributes(const TextureInfo* sourceTexture);
-
-    bool operator==(const TextureInfo& otherTexture);
-
-    GLuint m_textureId;
-    int32_t m_width;
-    int32_t m_height;
-    GLenum m_internalFormat;
-};
-
 /**
  * SharedTexture is a class that encapsulates all the necessary variables
  * needed to share a single texture across threads. In the case that threads
diff --git a/Source/WebCore/platform/graphics/android/TextureInfo.cpp b/Source/WebCore/platform/graphics/android/TextureInfo.cpp
new file mode 100644 (file)
index 0000000..2db1667
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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 "TextureInfo.h"
+
+namespace WebCore {
+
+TextureInfo::TextureInfo()
+{
+    m_textureId = GL_NO_TEXTURE;
+    m_width = 0;
+    m_height = 0;
+    m_internalFormat = 0;
+}
+
+bool TextureInfo::equalsAttributes(const TextureInfo* otherTexture)
+{
+    return otherTexture->m_width == m_width
+        && otherTexture->m_height == m_height
+        && otherTexture->m_internalFormat == m_internalFormat;
+}
+
+void TextureInfo::copyAttributes(const TextureInfo* sourceTexture)
+{
+    m_width = sourceTexture->m_width;
+    m_height = sourceTexture->m_height;
+    m_internalFormat = sourceTexture->m_internalFormat;
+}
+
+bool TextureInfo::operator==(const TextureInfo& otherTexture)
+{
+    return otherTexture.m_textureId == m_textureId && equalsAttributes(&otherTexture);
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/android/TextureInfo.h b/Source/WebCore/platform/graphics/android/TextureInfo.h
new file mode 100644 (file)
index 0000000..9ed6719
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+#ifndef TextureInfo_h
+#define TextureInfo_h
+
+#include <GLES2/gl2.h>
+
+namespace WebCore {
+
+static const GLuint GL_NO_TEXTURE = 0;
+/**
+ * TextureInfo is a class that stores both the texture and metadata about the
+ * texture.
+ */
+class TextureInfo {
+public:
+
+    TextureInfo();
+
+    bool equalsAttributes(const TextureInfo* otherTexture);
+    void copyAttributes(const TextureInfo* sourceTexture);
+
+    bool operator==(const TextureInfo& otherTexture);
+
+    GLuint m_textureId;
+    int32_t m_width;
+    int32_t m_height;
+    GLenum m_internalFormat;
+
+};
+
+} // namespace WebCore
+
+#endif // TextureInfo_h