diff options
Diffstat (limited to 'src/icon.cpp')
-rw-r--r-- | src/icon.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/icon.cpp b/src/icon.cpp index f15a278..5dcdd0d 100644 --- a/src/icon.cpp +++ b/src/icon.cpp @@ -2,7 +2,6 @@ CompIcon::CompIcon (CompScreen *screen, unsigned int width, unsigned int height) : - mTexture (screen), mWidth (width), mHeight (height), mData (new unsigned char[width * height * 4]), @@ -12,21 +11,7 @@ CompIcon::CompIcon (CompScreen *screen, unsigned int width, CompIcon::~CompIcon () { - free (mData); -} - -CompTexture & -CompIcon::texture () -{ - if (mUpdateTex) - { - mUpdateTex = false; - mTexture.reset (); - if (!mTexture.imageBufferToTexture (&mTexture, - reinterpret_cast<const char *> (mData), mWidth, mHeight)) - mTexture.reset (); - } - return mTexture; + delete mData; } unsigned int |