Title: [110437] trunk/Source/WebCore
Revision
110437
Author
[email protected]
Date
2012-03-12 10:06:44 -0700 (Mon, 12 Mar 2012)

Log Message

[TexMap] Remove BitmapTexture::destroy.
https://bugs.webkit.org/show_bug.cgi?id=80844

Reviewed by Noam Rosenthal.

Use the destructor directly instead.

* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::BitmapTextureGL::~BitmapTextureGL):
* platform/graphics/texmap/TextureMapperGL.h:
(BitmapTextureGL):
* platform/graphics/texmap/TextureMapperImageBuffer.h:
(WebCore::BitmapTextureImageBuffer::~BitmapTextureImageBuffer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110436 => 110437)


--- trunk/Source/WebCore/ChangeLog	2012-03-12 16:39:38 UTC (rev 110436)
+++ trunk/Source/WebCore/ChangeLog	2012-03-12 17:06:44 UTC (rev 110437)
@@ -1,3 +1,20 @@
+2012-03-12  Jocelyn Turcotte  <[email protected]>
+
+        [TexMap] Remove BitmapTexture::destroy.
+        https://bugs.webkit.org/show_bug.cgi?id=80844
+
+        Reviewed by Noam Rosenthal.
+
+        Use the destructor directly instead.
+
+        * platform/graphics/texmap/TextureMapper.h:
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (WebCore::BitmapTextureGL::~BitmapTextureGL):
+        * platform/graphics/texmap/TextureMapperGL.h:
+        (BitmapTextureGL):
+        * platform/graphics/texmap/TextureMapperImageBuffer.h:
+        (WebCore::BitmapTextureImageBuffer::~BitmapTextureImageBuffer):
+
 2012-03-12  Pavel Podivilov  <[email protected]>
 
         Web Inspector: DebuggerModel.Location should have scriptId property.

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h (110436 => 110437)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2012-03-12 16:39:38 UTC (rev 110436)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapper.h	2012-03-12 17:06:44 UTC (rev 110437)
@@ -64,7 +64,6 @@
     }
 
     virtual ~BitmapTexture() { }
-    virtual void destroy() { }
 
     virtual IntSize size() const = 0;
     virtual void updateContents(Image*, const IntRect&, const IntRect&, BitmapTexture::PixelFormat) = 0;

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp (110436 => 110437)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2012-03-12 16:39:38 UTC (rev 110436)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp	2012-03-12 17:06:44 UTC (rev 110437)
@@ -543,7 +543,7 @@
     m_textureMapper->beginClip(TransformationMatrix(), FloatRect(IntPoint::zero(), contentSize()));
 }
 
-void BitmapTextureGL::destroy()
+BitmapTextureGL::~BitmapTextureGL()
 {
     if (m_id)
         GL_CMD(glDeleteTextures(1, &m_id))
@@ -553,12 +553,6 @@
 
     if (m_rbo)
         GL_CMD(glDeleteRenderbuffers(1, &m_rbo))
-
-    m_fbo = 0;
-    m_rbo = 0;
-    m_id = 0;
-    m_textureSize = IntSize();
-    m_relativeSize = FloatSize(1, 1);
 }
 
 bool BitmapTextureGL::isValid() const

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h (110436 => 110437)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h	2012-03-12 16:39:38 UTC (rev 110436)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.h	2012-03-12 17:06:44 UTC (rev 110437)
@@ -75,13 +75,12 @@
 
 class BitmapTextureGL : public BitmapTexture {
 public:
-    virtual void destroy();
     virtual IntSize size() const;
     virtual bool isValid() const;
     virtual void didReset();
     void bind();
     void initializeStencil();
-    ~BitmapTextureGL() { destroy(); }
+    ~BitmapTextureGL();
     virtual uint32_t id() const { return m_id; }
     inline FloatSize relativeSize() const { return m_relativeSize; }
     void setTextureMapper(TextureMapperGL* texmap) { m_textureMapper = texmap; }

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h (110436 => 110437)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h	2012-03-12 16:39:38 UTC (rev 110436)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h	2012-03-12 17:06:44 UTC (rev 110437)
@@ -30,8 +30,6 @@
     friend class TextureMapperImageBuffer;
 public:
     static PassRefPtr<BitmapTexture> create() { return adoptRef(new BitmapTextureImageBuffer); }
-    ~BitmapTextureImageBuffer() { destroy(); }
-    virtual void destroy() { m_image.clear(); }
     virtual IntSize size() const { return m_image->internalSize(); }
     virtual void didReset();
     virtual bool isValid() const { return m_image; }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to