[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kbr at google.com
kbr at google.com
Wed Dec 22 11:43:08 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f2380478e1d91b815977286cbbf419a3ddb940f9
Author: kbr at google.com <kbr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 4 22:48:57 2010 +0000
2010-08-04 Kenneth Russell <kbr at google.com>
Reviewed by Dimitri Glazkov.
Rename CanvasObject to WebGLObject
https://bugs.webkit.org/show_bug.cgi?id=31564
Renamed CanvasObject to WebGLObject using do-webcore-rename script.
Because it seems the new convention is to not check in the changes
made to this script, only checking in its effects. No new tests;
built and ran WebGL in Safari and Chromium to test.
* Android.mk:
* WebCore.gypi:
* WebCore.pro:
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/CanvasObject.cpp: Removed.
* html/canvas/CanvasObject.h: Removed.
* html/canvas/CanvasRenderingContext.h:
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::WebGLBuffer):
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::WebGLFramebuffer):
(WebCore::WebGLFramebuffer::setAttachment):
(WebCore::WebGLFramebuffer::onAttachedObjectChange):
(WebCore::WebGLFramebuffer::isUninitialized):
(WebCore::WebGLFramebuffer::setInitialized):
* html/canvas/WebGLFramebuffer.h:
* html/canvas/WebGLObject.cpp: Copied from WebCore/html/canvas/CanvasObject.cpp.
(WebCore::WebGLObject::WebGLObject):
(WebCore::WebGLObject::~WebGLObject):
(WebCore::WebGLObject::setObject):
(WebCore::WebGLObject::deleteObject):
* html/canvas/WebGLObject.h: Copied from WebCore/html/canvas/CanvasObject.h.
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::WebGLProgram):
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLRenderbuffer.cpp:
(WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
* html/canvas/WebGLRenderbuffer.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::objectOrZero):
(WebCore::WebGLRenderingContext::validateWebGLObject):
(WebCore::WebGLRenderingContext::removeObject):
(WebCore::WebGLRenderingContext::addObject):
(WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
(WebCore::WebGLRenderingContext::findTexture):
(WebCore::WebGLRenderingContext::findRenderbuffer):
(WebCore::WebGLRenderingContext::findBuffer):
(WebCore::WebGLRenderingContext::findShader):
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::WebGLShader):
* html/canvas/WebGLShader.h:
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::WebGLTexture):
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLUniformLocation.h:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index c90d914..f79aa74 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -288,7 +288,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
\
html/canvas/CanvasGradient.cpp \
html/canvas/CanvasNumberArray.cpp \
- html/canvas/CanvasObject.cpp \
+ html/canvas/WebGLObject.cpp \
html/canvas/CanvasPattern.cpp \
html/canvas/CanvasPixelArray.cpp \
html/canvas/CanvasRenderingContext.cpp \
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 36cff8c..3a4b02d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,65 @@
+2010-08-04 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Rename CanvasObject to WebGLObject
+ https://bugs.webkit.org/show_bug.cgi?id=31564
+
+ Renamed CanvasObject to WebGLObject using do-webcore-rename script.
+ Because it seems the new convention is to not check in the changes
+ made to this script, only checking in its effects. No new tests;
+ built and ran WebGL in Safari and Chromium to test.
+
+ * Android.mk:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/canvas/CanvasObject.cpp: Removed.
+ * html/canvas/CanvasObject.h: Removed.
+ * html/canvas/CanvasRenderingContext.h:
+ * html/canvas/WebGLBuffer.cpp:
+ (WebCore::WebGLBuffer::WebGLBuffer):
+ * html/canvas/WebGLBuffer.h:
+ * html/canvas/WebGLFramebuffer.cpp:
+ (WebCore::WebGLFramebuffer::WebGLFramebuffer):
+ (WebCore::WebGLFramebuffer::setAttachment):
+ (WebCore::WebGLFramebuffer::onAttachedObjectChange):
+ (WebCore::WebGLFramebuffer::isUninitialized):
+ (WebCore::WebGLFramebuffer::setInitialized):
+ * html/canvas/WebGLFramebuffer.h:
+ * html/canvas/WebGLObject.cpp: Copied from WebCore/html/canvas/CanvasObject.cpp.
+ (WebCore::WebGLObject::WebGLObject):
+ (WebCore::WebGLObject::~WebGLObject):
+ (WebCore::WebGLObject::setObject):
+ (WebCore::WebGLObject::deleteObject):
+ * html/canvas/WebGLObject.h: Copied from WebCore/html/canvas/CanvasObject.h.
+ * html/canvas/WebGLProgram.cpp:
+ (WebCore::WebGLProgram::WebGLProgram):
+ * html/canvas/WebGLProgram.h:
+ * html/canvas/WebGLRenderbuffer.cpp:
+ (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
+ * html/canvas/WebGLRenderbuffer.h:
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::objectOrZero):
+ (WebCore::WebGLRenderingContext::validateWebGLObject):
+ (WebCore::WebGLRenderingContext::removeObject):
+ (WebCore::WebGLRenderingContext::addObject):
+ (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
+ (WebCore::WebGLRenderingContext::findTexture):
+ (WebCore::WebGLRenderingContext::findRenderbuffer):
+ (WebCore::WebGLRenderingContext::findBuffer):
+ (WebCore::WebGLRenderingContext::findShader):
+ * html/canvas/WebGLRenderingContext.h:
+ * html/canvas/WebGLShader.cpp:
+ (WebCore::WebGLShader::WebGLShader):
+ * html/canvas/WebGLShader.h:
+ * html/canvas/WebGLTexture.cpp:
+ (WebCore::WebGLTexture::WebGLTexture):
+ * html/canvas/WebGLTexture.h:
+ * html/canvas/WebGLUniformLocation.h:
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ * platform/graphics/qt/GraphicsContext3DQt.cpp:
+
2010-08-04 Dan Bernstein <mitz at apple.com>
Build fix.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 52bfe1d..d5ed3d2 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1447,8 +1447,8 @@
'html/canvas/Int32Array.cpp',
'html/canvas/Int32Array.h',
'html/canvas/IntegralTypedArrayBase.h',
- 'html/canvas/CanvasObject.cpp',
- 'html/canvas/CanvasObject.h',
+ 'html/canvas/WebGLObject.cpp',
+ 'html/canvas/WebGLObject.h',
'html/canvas/CanvasPattern.cpp',
'html/canvas/CanvasPattern.h',
'html/canvas/CanvasPixelArray.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 88242f9..12d056d 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -3007,7 +3007,7 @@ tobe|!tobe: QT += opengl
HEADERS += \
bindings/js/JSArrayBufferViewHelper.h \
html/canvas/CanvasContextAttributes.h \
- html/canvas/CanvasObject.h \
+ html/canvas/WebGLObject.h \
html/canvas/WebGLActiveInfo.h \
html/canvas/ArrayBuffer.h \
html/canvas/ArrayBufferView.h \
@@ -3042,7 +3042,7 @@ SOURCES += \
bindings/js/JSUint32ArrayCustom.cpp \
bindings/js/JSUint16ArrayCustom.cpp \
html/canvas/CanvasContextAttributes.cpp \
- html/canvas/CanvasObject.cpp \
+ html/canvas/WebGLObject.cpp \
html/canvas/ArrayBuffer.cpp \
html/canvas/ArrayBufferView.cpp \
html/canvas/WebGLBuffer.cpp \
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 3628f76..f5b9303 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -919,8 +919,8 @@
49C7B9CC1042D32F0009D447 /* Int8Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9AC1042D32E0009D447 /* Int8Array.h */; };
49C7B9CE1042D32F0009D447 /* WebGLFramebuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7B9AE1042D32E0009D447 /* WebGLFramebuffer.cpp */; };
49C7B9CF1042D32F0009D447 /* WebGLFramebuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9AF1042D32E0009D447 /* WebGLFramebuffer.h */; };
- 49C7B9D41042D32F0009D447 /* CanvasObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7B9B41042D32F0009D447 /* CanvasObject.cpp */; };
- 49C7B9D51042D32F0009D447 /* CanvasObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9B51042D32F0009D447 /* CanvasObject.h */; };
+ 49C7B9D41042D32F0009D447 /* WebGLObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7B9B41042D32F0009D447 /* WebGLObject.cpp */; };
+ 49C7B9D51042D32F0009D447 /* WebGLObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9B51042D32F0009D447 /* WebGLObject.h */; };
49C7B9D61042D32F0009D447 /* WebGLProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7B9B61042D32F0009D447 /* WebGLProgram.cpp */; };
49C7B9D71042D32F0009D447 /* WebGLProgram.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9B71042D32F0009D447 /* WebGLProgram.h */; };
49C7B9D91042D32F0009D447 /* WebGLRenderbuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7B9B91042D32F0009D447 /* WebGLRenderbuffer.cpp */; };
@@ -6657,8 +6657,8 @@
49C7B9AE1042D32E0009D447 /* WebGLFramebuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLFramebuffer.cpp; path = canvas/WebGLFramebuffer.cpp; sourceTree = "<group>"; };
49C7B9AF1042D32E0009D447 /* WebGLFramebuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLFramebuffer.h; path = canvas/WebGLFramebuffer.h; sourceTree = "<group>"; };
49C7B9B01042D32E0009D447 /* WebGLFramebuffer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLFramebuffer.idl; path = canvas/WebGLFramebuffer.idl; sourceTree = "<group>"; };
- 49C7B9B41042D32F0009D447 /* CanvasObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasObject.cpp; path = canvas/CanvasObject.cpp; sourceTree = "<group>"; };
- 49C7B9B51042D32F0009D447 /* CanvasObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasObject.h; path = canvas/CanvasObject.h; sourceTree = "<group>"; };
+ 49C7B9B41042D32F0009D447 /* WebGLObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLObject.cpp; path = canvas/WebGLObject.cpp; sourceTree = "<group>"; };
+ 49C7B9B51042D32F0009D447 /* WebGLObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLObject.h; path = canvas/WebGLObject.h; sourceTree = "<group>"; };
49C7B9B61042D32F0009D447 /* WebGLProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLProgram.cpp; path = canvas/WebGLProgram.cpp; sourceTree = "<group>"; };
49C7B9B71042D32F0009D447 /* WebGLProgram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLProgram.h; path = canvas/WebGLProgram.h; sourceTree = "<group>"; };
49C7B9B81042D32F0009D447 /* WebGLProgram.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLProgram.idl; path = canvas/WebGLProgram.idl; sourceTree = "<group>"; };
@@ -11784,8 +11784,8 @@
49484FB3102CF23C00187DD3 /* CanvasGradient.cpp */,
49484FB4102CF23C00187DD3 /* CanvasGradient.h */,
49484FB5102CF23C00187DD3 /* CanvasGradient.idl */,
- 49C7B9B41042D32F0009D447 /* CanvasObject.cpp */,
- 49C7B9B51042D32F0009D447 /* CanvasObject.h */,
+ 49C7B9B41042D32F0009D447 /* WebGLObject.cpp */,
+ 49C7B9B51042D32F0009D447 /* WebGLObject.h */,
49484FB6102CF23C00187DD3 /* CanvasPattern.cpp */,
49484FB7102CF23C00187DD3 /* CanvasPattern.h */,
49484FB8102CF23C00187DD3 /* CanvasPattern.idl */,
@@ -17433,7 +17433,7 @@
93F1995008245E59001E9ABC /* CachePolicy.h in Headers */,
6E4E91AD10F7FB3100A2779C /* CanvasContextAttributes.h in Headers */,
49484FC2102CF23C00187DD3 /* CanvasGradient.h in Headers */,
- 49C7B9D51042D32F0009D447 /* CanvasObject.h in Headers */,
+ 49C7B9D51042D32F0009D447 /* WebGLObject.h in Headers */,
49484FC5102CF23C00187DD3 /* CanvasPattern.h in Headers */,
49484FC8102CF23C00187DD3 /* CanvasPixelArray.h in Headers */,
49C7B9DD1042D32F0009D447 /* CanvasRenderingContext.h in Headers */,
@@ -20377,7 +20377,7 @@
BCB16C270979C3BD00467741 /* CachedXSLStyleSheet.cpp in Sources */,
6E4E91AC10F7FB3100A2779C /* CanvasContextAttributes.cpp in Sources */,
49484FC1102CF23C00187DD3 /* CanvasGradient.cpp in Sources */,
- 49C7B9D41042D32F0009D447 /* CanvasObject.cpp in Sources */,
+ 49C7B9D41042D32F0009D447 /* WebGLObject.cpp in Sources */,
49484FC4102CF23C00187DD3 /* CanvasPattern.cpp in Sources */,
49484FC7102CF23C00187DD3 /* CanvasPixelArray.cpp in Sources */,
49C7B9DC1042D32F0009D447 /* CanvasRenderingContext.cpp in Sources */,
diff --git a/WebCore/html/canvas/CanvasObject.cpp b/WebCore/html/canvas/CanvasObject.cpp
deleted file mode 100644
index 6c7667b..0000000
--- a/WebCore/html/canvas/CanvasObject.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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"
-
-#if ENABLE(3D_CANVAS)
-
-#include "CanvasObject.h"
-#include "WebGLRenderingContext.h"
-
-namespace WebCore {
-
-CanvasObject::CanvasObject(WebGLRenderingContext* context)
- : m_object(0)
- , m_shouldDeleteObject(true)
- , m_context(context)
-{
-}
-
-CanvasObject::~CanvasObject()
-{
- if (m_context)
- m_context->removeObject(this);
-}
-
-void CanvasObject::setObject(Platform3DObject object, bool shouldDeleteObject)
-{
- if (object == m_object)
- return;
-
- deleteObject();
- m_object = object;
- m_shouldDeleteObject = shouldDeleteObject;
-}
-
-void CanvasObject::deleteObject()
-{
- if (m_object) {
- if (m_shouldDeleteObject)
- if (m_context) {
- m_context->graphicsContext3D()->makeContextCurrent();
- _deleteObject(m_object);
- }
- m_object = 0;
- }
- m_shouldDeleteObject = true;
-}
-
-}
-
-#endif // ENABLE(3D_CANVAS)
diff --git a/WebCore/html/canvas/CanvasObject.h b/WebCore/html/canvas/CanvasObject.h
deleted file mode 100644
index 6f89f12..0000000
--- a/WebCore/html/canvas/CanvasObject.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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 CanvasObject_h
-#define CanvasObject_h
-
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-
-#include "GraphicsContext3D.h"
-
-namespace WebCore {
-
- class WebGLRenderingContext;
-
- class CanvasObject : public RefCounted<CanvasObject> {
- public:
- virtual ~CanvasObject();
-
- Platform3DObject object() const { return m_object; }
- void setObject(Platform3DObject, bool shouldDeleteObject = true);
- void deleteObject();
-
- void detachContext()
- {
- deleteObject();
- m_context = 0;
- }
-
- WebGLRenderingContext* context() const { return m_context; }
-
- virtual bool isBuffer() const { return false; }
- virtual bool isFramebuffer() const { return false; }
- virtual bool isProgram() const { return false; }
- virtual bool isRenderbuffer() const { return false; }
- virtual bool isShader() const { return false; }
- virtual bool isTexture() const { return false; }
-
- protected:
- CanvasObject(WebGLRenderingContext*);
- virtual void _deleteObject(Platform3DObject) = 0;
-
- private:
- Platform3DObject m_object;
- // The shouldDeleteObject flag indicates whether this wrapper
- // owns the underlying resource and should delete it when the
- // wrapper is unreferenced for the last time and deleted. It
- // is only set to false for certain objects returned from get
- // queries. FIXME: should consider canonicalizing all of these
- // objects in the future.
- bool m_shouldDeleteObject;
- WebGLRenderingContext* m_context;
- };
-
-} // namespace WebCore
-
-#endif // CanvasObject_h
diff --git a/WebCore/html/canvas/CanvasRenderingContext.h b/WebCore/html/canvas/CanvasRenderingContext.h
index 436eead..b8a7ca2 100644
--- a/WebCore/html/canvas/CanvasRenderingContext.h
+++ b/WebCore/html/canvas/CanvasRenderingContext.h
@@ -30,7 +30,7 @@
namespace WebCore {
- class CanvasObject;
+ class WebGLObject;
class GraphicsContext3D;
class HTMLCanvasElement;
diff --git a/WebCore/html/canvas/WebGLBuffer.cpp b/WebCore/html/canvas/WebGLBuffer.cpp
index e449052..6454001 100644
--- a/WebCore/html/canvas/WebGLBuffer.cpp
+++ b/WebCore/html/canvas/WebGLBuffer.cpp
@@ -38,7 +38,7 @@ PassRefPtr<WebGLBuffer> WebGLBuffer::create(WebGLRenderingContext* ctx)
}
WebGLBuffer::WebGLBuffer(WebGLRenderingContext* ctx)
- : CanvasObject(ctx)
+ : WebGLObject(ctx)
, m_target(0)
, m_byteLength(0)
, m_nextAvailableCacheEntry(0)
diff --git a/WebCore/html/canvas/WebGLBuffer.h b/WebCore/html/canvas/WebGLBuffer.h
index 1280cf9..ac8273e 100644
--- a/WebCore/html/canvas/WebGLBuffer.h
+++ b/WebCore/html/canvas/WebGLBuffer.h
@@ -26,7 +26,7 @@
#ifndef WebGLBuffer_h
#define WebGLBuffer_h
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include "ArrayBuffer.h"
#include <wtf/PassRefPtr.h>
@@ -34,7 +34,7 @@
namespace WebCore {
- class WebGLBuffer : public CanvasObject {
+ class WebGLBuffer : public WebGLObject {
public:
virtual ~WebGLBuffer() { deleteObject(); }
diff --git a/WebCore/html/canvas/WebGLFramebuffer.cpp b/WebCore/html/canvas/WebGLFramebuffer.cpp
index a3d4681..15ca478 100644
--- a/WebCore/html/canvas/WebGLFramebuffer.cpp
+++ b/WebCore/html/canvas/WebGLFramebuffer.cpp
@@ -38,7 +38,7 @@ PassRefPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContext* ctx
}
WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContext* ctx)
- : CanvasObject(ctx)
+ : WebGLObject(ctx)
, m_colorAttachment(0)
, m_depthAttachment(0)
, m_stencilAttachment(0)
@@ -47,7 +47,7 @@ WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContext* ctx)
setObject(context()->graphicsContext3D()->createFramebuffer());
}
-void WebGLFramebuffer::setAttachment(unsigned long attachment, CanvasObject* attachedObject)
+void WebGLFramebuffer::setAttachment(unsigned long attachment, WebGLObject* attachedObject)
{
if (!object())
return;
@@ -77,10 +77,10 @@ void WebGLFramebuffer::onBind()
initializeRenderbuffers();
}
-void WebGLFramebuffer::onAttachedObjectChange(CanvasObject* object)
+void WebGLFramebuffer::onAttachedObjectChange(WebGLObject* object)
{
// Currently object == 0 is not considered, but this might change if the
- // lifespan of CanvasObject changes.
+ // lifespan of WebGLObject changes.
if (object
&& (object == m_colorAttachment || object == m_depthAttachment
|| object == m_stencilAttachment || object == m_depthStencilAttachment))
@@ -110,7 +110,7 @@ void WebGLFramebuffer::_deleteObject(Platform3DObject object)
context()->graphicsContext3D()->deleteFramebuffer(object);
}
-bool WebGLFramebuffer::isUninitialized(CanvasObject* attachedObject)
+bool WebGLFramebuffer::isUninitialized(WebGLObject* attachedObject)
{
if (attachedObject && attachedObject->object() && attachedObject->isRenderbuffer()
&& !(reinterpret_cast<WebGLRenderbuffer*>(attachedObject))->isInitialized())
@@ -118,7 +118,7 @@ bool WebGLFramebuffer::isUninitialized(CanvasObject* attachedObject)
return false;
}
-void WebGLFramebuffer::setInitialized(CanvasObject* attachedObject)
+void WebGLFramebuffer::setInitialized(WebGLObject* attachedObject)
{
if (attachedObject && attachedObject->object() && attachedObject->isRenderbuffer())
(reinterpret_cast<WebGLRenderbuffer*>(attachedObject))->setInitialized();
diff --git a/WebCore/html/canvas/WebGLFramebuffer.h b/WebCore/html/canvas/WebGLFramebuffer.h
index ae1f4dc..7b9b0e3 100644
--- a/WebCore/html/canvas/WebGLFramebuffer.h
+++ b/WebCore/html/canvas/WebGLFramebuffer.h
@@ -26,14 +26,14 @@
#ifndef WebGLFramebuffer_h
#define WebGLFramebuffer_h
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
- class WebGLFramebuffer : public CanvasObject {
+ class WebGLFramebuffer : public WebGLObject {
public:
virtual ~WebGLFramebuffer() { deleteObject(); }
@@ -43,7 +43,7 @@ namespace WebCore {
bool isStencilAttached() const { return (m_stencilAttachment && m_stencilAttachment->object()); }
bool isDepthStencilAttached() const { return (m_depthStencilAttachment && m_depthStencilAttachment->object()); }
- void setAttachment(unsigned long, CanvasObject*);
+ void setAttachment(unsigned long, WebGLObject*);
// This function is called right after a framebuffer is bound.
// Because renderbuffers and textures attached to the framebuffer might
@@ -55,7 +55,7 @@ namespace WebCore {
// current bound framebuffer; if the newly changed object is attached
// to the framebuffer and the framebuffer becomes complete, we need to
// clear un-initialized renderbuffers.
- void onAttachedObjectChange(CanvasObject*);
+ void onAttachedObjectChange(WebGLObject*);
unsigned long getColorBufferFormat();
@@ -67,16 +67,16 @@ namespace WebCore {
private:
virtual bool isFramebuffer() const { return true; }
- bool isUninitialized(CanvasObject*);
- void setInitialized(CanvasObject*);
+ bool isUninitialized(WebGLObject*);
+ void setInitialized(WebGLObject*);
void initializeRenderbuffers();
// These objects are kept alive by the global table in
// WebGLRenderingContext.
- CanvasObject* m_colorAttachment;
- CanvasObject* m_depthAttachment;
- CanvasObject* m_stencilAttachment;
- CanvasObject* m_depthStencilAttachment;
+ WebGLObject* m_colorAttachment;
+ WebGLObject* m_depthAttachment;
+ WebGLObject* m_stencilAttachment;
+ WebGLObject* m_depthStencilAttachment;
};
} // namespace WebCore
diff --git a/WebCore/html/canvas/WebGLObject.cpp b/WebCore/html/canvas/WebGLObject.cpp
new file mode 100644
index 0000000..2ad5d56
--- /dev/null
+++ b/WebCore/html/canvas/WebGLObject.cpp
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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"
+
+#if ENABLE(3D_CANVAS)
+
+#include "WebGLObject.h"
+#include "WebGLRenderingContext.h"
+
+namespace WebCore {
+
+WebGLObject::WebGLObject(WebGLRenderingContext* context)
+ : m_object(0)
+ , m_shouldDeleteObject(true)
+ , m_context(context)
+{
+}
+
+WebGLObject::~WebGLObject()
+{
+ if (m_context)
+ m_context->removeObject(this);
+}
+
+void WebGLObject::setObject(Platform3DObject object, bool shouldDeleteObject)
+{
+ if (object == m_object)
+ return;
+
+ deleteObject();
+ m_object = object;
+ m_shouldDeleteObject = shouldDeleteObject;
+}
+
+void WebGLObject::deleteObject()
+{
+ if (m_object) {
+ if (m_shouldDeleteObject)
+ if (m_context) {
+ m_context->graphicsContext3D()->makeContextCurrent();
+ _deleteObject(m_object);
+ }
+ m_object = 0;
+ }
+ m_shouldDeleteObject = true;
+}
+
+}
+
+#endif // ENABLE(3D_CANVAS)
diff --git a/WebCore/html/canvas/WebGLObject.h b/WebCore/html/canvas/WebGLObject.h
new file mode 100644
index 0000000..1d559b5
--- /dev/null
+++ b/WebCore/html/canvas/WebGLObject.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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 WebGLObject_h
+#define WebGLObject_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+#include "GraphicsContext3D.h"
+
+namespace WebCore {
+
+ class WebGLRenderingContext;
+
+ class WebGLObject : public RefCounted<WebGLObject> {
+ public:
+ virtual ~WebGLObject();
+
+ Platform3DObject object() const { return m_object; }
+ void setObject(Platform3DObject, bool shouldDeleteObject = true);
+ void deleteObject();
+
+ void detachContext()
+ {
+ deleteObject();
+ m_context = 0;
+ }
+
+ WebGLRenderingContext* context() const { return m_context; }
+
+ virtual bool isBuffer() const { return false; }
+ virtual bool isFramebuffer() const { return false; }
+ virtual bool isProgram() const { return false; }
+ virtual bool isRenderbuffer() const { return false; }
+ virtual bool isShader() const { return false; }
+ virtual bool isTexture() const { return false; }
+
+ protected:
+ WebGLObject(WebGLRenderingContext*);
+ virtual void _deleteObject(Platform3DObject) = 0;
+
+ private:
+ Platform3DObject m_object;
+ // The shouldDeleteObject flag indicates whether this wrapper
+ // owns the underlying resource and should delete it when the
+ // wrapper is unreferenced for the last time and deleted. It
+ // is only set to false for certain objects returned from get
+ // queries. FIXME: should consider canonicalizing all of these
+ // objects in the future.
+ bool m_shouldDeleteObject;
+ WebGLRenderingContext* m_context;
+ };
+
+} // namespace WebCore
+
+#endif // WebGLObject_h
diff --git a/WebCore/html/canvas/WebGLProgram.cpp b/WebCore/html/canvas/WebGLProgram.cpp
index d13ae3d..cd7fb56 100644
--- a/WebCore/html/canvas/WebGLProgram.cpp
+++ b/WebCore/html/canvas/WebGLProgram.cpp
@@ -38,7 +38,7 @@ PassRefPtr<WebGLProgram> WebGLProgram::create(WebGLRenderingContext* ctx)
}
WebGLProgram::WebGLProgram(WebGLRenderingContext* ctx)
- : CanvasObject(ctx)
+ : WebGLObject(ctx)
, m_linkFailure(false)
{
setObject(context()->graphicsContext3D()->createProgram());
diff --git a/WebCore/html/canvas/WebGLProgram.h b/WebCore/html/canvas/WebGLProgram.h
index 1049334..2b4838a 100644
--- a/WebCore/html/canvas/WebGLProgram.h
+++ b/WebCore/html/canvas/WebGLProgram.h
@@ -26,7 +26,7 @@
#ifndef WebGLProgram_h
#define WebGLProgram_h
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -34,7 +34,7 @@
namespace WebCore {
- class WebGLProgram : public CanvasObject {
+ class WebGLProgram : public WebGLObject {
public:
virtual ~WebGLProgram() { deleteObject(); }
diff --git a/WebCore/html/canvas/WebGLRenderbuffer.cpp b/WebCore/html/canvas/WebGLRenderbuffer.cpp
index 701e2c9..9f16a5c 100644
--- a/WebCore/html/canvas/WebGLRenderbuffer.cpp
+++ b/WebCore/html/canvas/WebGLRenderbuffer.cpp
@@ -38,7 +38,7 @@ PassRefPtr<WebGLRenderbuffer> WebGLRenderbuffer::create(WebGLRenderingContext* c
}
WebGLRenderbuffer::WebGLRenderbuffer(WebGLRenderingContext* ctx)
- : CanvasObject(ctx)
+ : WebGLObject(ctx)
, m_internalFormat(GraphicsContext3D::RGBA4)
, m_initialized(false)
{
diff --git a/WebCore/html/canvas/WebGLRenderbuffer.h b/WebCore/html/canvas/WebGLRenderbuffer.h
index dbb08c1..b849b05 100644
--- a/WebCore/html/canvas/WebGLRenderbuffer.h
+++ b/WebCore/html/canvas/WebGLRenderbuffer.h
@@ -26,14 +26,14 @@
#ifndef WebGLRenderbuffer_h
#define WebGLRenderbuffer_h
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
- class WebGLRenderbuffer : public CanvasObject {
+ class WebGLRenderbuffer : public WebGLObject {
public:
virtual ~WebGLRenderbuffer() { deleteObject(); }
diff --git a/WebCore/html/canvas/WebGLRenderingContext.cpp b/WebCore/html/canvas/WebGLRenderingContext.cpp
index 80dd282..70507b6 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.cpp
+++ b/WebCore/html/canvas/WebGLRenderingContext.cpp
@@ -57,7 +57,7 @@
namespace WebCore {
-static inline Platform3DObject objectOrZero(CanvasObject* object)
+static inline Platform3DObject objectOrZero(WebGLObject* object)
{
return object ? object->object() : 0;
}
@@ -896,7 +896,7 @@ bool WebGLRenderingContext::validateRenderingState(long numElementsRequired)
return numElementsRequired <= smallestNumElements;
}
-bool WebGLRenderingContext::validateWebGLObject(CanvasObject* object)
+bool WebGLRenderingContext::validateWebGLObject(WebGLObject* object)
{
if (!object) {
m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE);
@@ -3083,12 +3083,12 @@ void WebGLRenderingContext::viewport(long x, long y, unsigned long width, unsign
cleanupAfterGraphicsCall(false);
}
-void WebGLRenderingContext::removeObject(CanvasObject* object)
+void WebGLRenderingContext::removeObject(WebGLObject* object)
{
m_canvasObjects.remove(object);
}
-void WebGLRenderingContext::addObject(CanvasObject* object)
+void WebGLRenderingContext::addObject(WebGLObject* object)
{
removeObject(object);
m_canvasObjects.add(object);
@@ -3096,8 +3096,8 @@ void WebGLRenderingContext::addObject(CanvasObject* object)
void WebGLRenderingContext::detachAndRemoveAllObjects()
{
- HashSet<RefPtr<CanvasObject> >::iterator pend = m_canvasObjects.end();
- for (HashSet<RefPtr<CanvasObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it)
+ HashSet<RefPtr<WebGLObject> >::iterator pend = m_canvasObjects.end();
+ for (HashSet<RefPtr<WebGLObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it)
(*it)->detachContext();
m_canvasObjects.clear();
@@ -3107,8 +3107,8 @@ WebGLTexture* WebGLRenderingContext::findTexture(Platform3DObject obj)
{
if (!obj)
return 0;
- HashSet<RefPtr<CanvasObject> >::iterator pend = m_canvasObjects.end();
- for (HashSet<RefPtr<CanvasObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
+ HashSet<RefPtr<WebGLObject> >::iterator pend = m_canvasObjects.end();
+ for (HashSet<RefPtr<WebGLObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
if ((*it)->isTexture() && (*it)->object() == obj)
return reinterpret_cast<WebGLTexture*>((*it).get());
}
@@ -3119,8 +3119,8 @@ WebGLRenderbuffer* WebGLRenderingContext::findRenderbuffer(Platform3DObject obj)
{
if (!obj)
return 0;
- HashSet<RefPtr<CanvasObject> >::iterator pend = m_canvasObjects.end();
- for (HashSet<RefPtr<CanvasObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
+ HashSet<RefPtr<WebGLObject> >::iterator pend = m_canvasObjects.end();
+ for (HashSet<RefPtr<WebGLObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
if ((*it)->isRenderbuffer() && (*it)->object() == obj)
return reinterpret_cast<WebGLRenderbuffer*>((*it).get());
}
@@ -3131,8 +3131,8 @@ WebGLBuffer* WebGLRenderingContext::findBuffer(Platform3DObject obj)
{
if (!obj)
return 0;
- HashSet<RefPtr<CanvasObject> >::iterator pend = m_canvasObjects.end();
- for (HashSet<RefPtr<CanvasObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
+ HashSet<RefPtr<WebGLObject> >::iterator pend = m_canvasObjects.end();
+ for (HashSet<RefPtr<WebGLObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
if ((*it)->isBuffer() && (*it)->object() == obj)
return reinterpret_cast<WebGLBuffer*>((*it).get());
}
@@ -3143,8 +3143,8 @@ WebGLShader* WebGLRenderingContext::findShader(Platform3DObject obj)
{
if (!obj)
return 0;
- HashSet<RefPtr<CanvasObject> >::iterator pend = m_canvasObjects.end();
- for (HashSet<RefPtr<CanvasObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
+ HashSet<RefPtr<WebGLObject> >::iterator pend = m_canvasObjects.end();
+ for (HashSet<RefPtr<WebGLObject> >::iterator it = m_canvasObjects.begin(); it != pend; ++it) {
if ((*it)->isShader() && (*it)->object() == obj)
return reinterpret_cast<WebGLShader*>((*it).get());
}
diff --git a/WebCore/html/canvas/WebGLRenderingContext.h b/WebCore/html/canvas/WebGLRenderingContext.h
index c973aa8..7164433 100644
--- a/WebCore/html/canvas/WebGLRenderingContext.h
+++ b/WebCore/html/canvas/WebGLRenderingContext.h
@@ -41,7 +41,7 @@ class WebGLActiveInfo;
class WebGLBuffer;
class WebGLContextAttributes;
class WebGLFramebuffer;
-class CanvasObject;
+class WebGLObject;
class WebGLProgram;
class WebGLRenderbuffer;
class WebGLShader;
@@ -315,14 +315,14 @@ class WebKitCSSMatrix;
void beginPaint();
void endPaint();
- void removeObject(CanvasObject*);
+ void removeObject(WebGLObject*);
private:
- friend class CanvasObject;
+ friend class WebGLObject;
WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<GraphicsContext3D>);
- void addObject(CanvasObject*);
+ void addObject(WebGLObject*);
void detachAndRemoveAllObjects();
WebGLTexture* findTexture(Platform3DObject);
WebGLRenderbuffer* findRenderbuffer(Platform3DObject);
@@ -348,14 +348,14 @@ class WebKitCSSMatrix;
bool validateIndexArrayPrecise(unsigned long count, unsigned long type, long offset, long& numElementsRequired);
bool validateRenderingState(long numElements);
- bool validateWebGLObject(CanvasObject* object);
+ bool validateWebGLObject(WebGLObject* object);
OwnPtr<GraphicsContext3D> m_context;
bool m_needsUpdate;
bool m_markedCanvasDirty;
// FIXME: I think this is broken -- it does not increment any
// reference counts, so may refer to destroyed objects.
- HashSet<RefPtr<CanvasObject> > m_canvasObjects;
+ HashSet<RefPtr<WebGLObject> > m_canvasObjects;
// List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER and stored values for ELEMENT_ARRAY_BUFFER
RefPtr<WebGLBuffer> m_boundArrayBuffer;
diff --git a/WebCore/html/canvas/WebGLShader.cpp b/WebCore/html/canvas/WebGLShader.cpp
index 664d3cb..15c4a91 100644
--- a/WebCore/html/canvas/WebGLShader.cpp
+++ b/WebCore/html/canvas/WebGLShader.cpp
@@ -38,7 +38,7 @@ PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContext* ctx, Graphics
}
WebGLShader::WebGLShader(WebGLRenderingContext* ctx, GraphicsContext3D::WebGLEnumType type)
- : CanvasObject(ctx)
+ : WebGLObject(ctx)
, m_type(type)
{
setObject(context()->graphicsContext3D()->createShader(type));
diff --git a/WebCore/html/canvas/WebGLShader.h b/WebCore/html/canvas/WebGLShader.h
index a0daa59..62d1222 100644
--- a/WebCore/html/canvas/WebGLShader.h
+++ b/WebCore/html/canvas/WebGLShader.h
@@ -26,14 +26,14 @@
#ifndef WebGLShader_h
#define WebGLShader_h
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
- class WebGLShader : public CanvasObject {
+ class WebGLShader : public WebGLObject {
public:
virtual ~WebGLShader() { deleteObject(); }
diff --git a/WebCore/html/canvas/WebGLTexture.cpp b/WebCore/html/canvas/WebGLTexture.cpp
index d832038..c47e040 100644
--- a/WebCore/html/canvas/WebGLTexture.cpp
+++ b/WebCore/html/canvas/WebGLTexture.cpp
@@ -38,7 +38,7 @@ PassRefPtr<WebGLTexture> WebGLTexture::create(WebGLRenderingContext* ctx)
}
WebGLTexture::WebGLTexture(WebGLRenderingContext* ctx)
- : CanvasObject(ctx)
+ : WebGLObject(ctx)
, cubeMapRWrapModeInitialized(false)
, m_target(0)
, m_minFilter(GraphicsContext3D::NEAREST_MIPMAP_LINEAR)
diff --git a/WebCore/html/canvas/WebGLTexture.h b/WebCore/html/canvas/WebGLTexture.h
index d4a32f0..d23b253 100644
--- a/WebCore/html/canvas/WebGLTexture.h
+++ b/WebCore/html/canvas/WebGLTexture.h
@@ -26,7 +26,7 @@
#ifndef WebGLTexture_h
#define WebGLTexture_h
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -34,7 +34,7 @@
namespace WebCore {
- class WebGLTexture : public CanvasObject {
+ class WebGLTexture : public WebGLObject {
public:
virtual ~WebGLTexture() { deleteObject(); }
diff --git a/WebCore/html/canvas/WebGLUniformLocation.h b/WebCore/html/canvas/WebGLUniformLocation.h
index f9f7a11..66647c5 100644
--- a/WebCore/html/canvas/WebGLUniformLocation.h
+++ b/WebCore/html/canvas/WebGLUniformLocation.h
@@ -27,7 +27,7 @@
#ifndef WebGLUniformLocation_h
#define WebGLUniformLocation_h
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include "WebGLProgram.h"
#include <wtf/PassRefPtr.h>
diff --git a/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm b/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
index a1555fb..fd503fc 100644
--- a/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
+++ b/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm
@@ -33,7 +33,7 @@
#include "ArrayBuffer.h"
#include "ArrayBufferView.h"
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include "CanvasRenderingContext.h"
#include "Float32Array.h"
#include "GraphicsContext.h"
diff --git a/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp b/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
index 3e43314..273e2dd 100644
--- a/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
@@ -21,7 +21,7 @@
#include "GraphicsContext3D.h"
#include "ArrayBufferView.h"
-#include "CanvasObject.h"
+#include "WebGLObject.h"
#include "CanvasRenderingContext.h"
#include "Float32Array.h"
#include "GraphicsContext.h"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list