Graphics: Taint entire Bitmap in #snap_to_bitmap

This commit is contained in:
Jonas Kulla 2014-04-15 19:05:36 +02:00
parent f25d2db63c
commit 51c5ca1410
3 changed files with 11 additions and 0 deletions

View File

@ -1045,6 +1045,11 @@ void Bitmap::bindTex(ShaderBase &shader)
p->bindTexture(shader); p->bindTexture(shader);
} }
void Bitmap::taintArea(const IntRect &rect)
{
p->addTaintedArea(rect);
}
void Bitmap::releaseResources() void Bitmap::releaseResources()
{ {
if (p->megaSurface) if (p->megaSurface)

View File

@ -116,6 +116,9 @@ public:
* texture size uniform in shader */ * texture size uniform in shader */
void bindTex(ShaderBase &shader); void bindTex(ShaderBase &shader);
/* Adds 'rect' to tainted area */
void taintArea(const IntRect &rect);
sigc::signal<void> modified; sigc::signal<void> modified;
private: private:

View File

@ -779,6 +779,9 @@ Bitmap *Graphics::snapToBitmap()
p->compositeToBuffer(bitmap->getGLTypes().fbo); p->compositeToBuffer(bitmap->getGLTypes().fbo);
/* Taint entire bitmap */
bitmap->taintArea(IntRect(0, 0, width(), height()));
return bitmap; return bitmap;
} }