Graphics: Taint entire Bitmap in #snap_to_bitmap
This commit is contained in:
parent
f25d2db63c
commit
51c5ca1410
|
@ -1045,6 +1045,11 @@ void Bitmap::bindTex(ShaderBase &shader)
|
|||
p->bindTexture(shader);
|
||||
}
|
||||
|
||||
void Bitmap::taintArea(const IntRect &rect)
|
||||
{
|
||||
p->addTaintedArea(rect);
|
||||
}
|
||||
|
||||
void Bitmap::releaseResources()
|
||||
{
|
||||
if (p->megaSurface)
|
||||
|
|
|
@ -116,6 +116,9 @@ public:
|
|||
* texture size uniform in shader */
|
||||
void bindTex(ShaderBase &shader);
|
||||
|
||||
/* Adds 'rect' to tainted area */
|
||||
void taintArea(const IntRect &rect);
|
||||
|
||||
sigc::signal<void> modified;
|
||||
|
||||
private:
|
||||
|
|
|
@ -779,6 +779,9 @@ Bitmap *Graphics::snapToBitmap()
|
|||
|
||||
p->compositeToBuffer(bitmap->getGLTypes().fbo);
|
||||
|
||||
/* Taint entire bitmap */
|
||||
bitmap->taintArea(IntRect(0, 0, width(), height()));
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue