mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 1850727 - Only clear last clip mask when destroying clip mask. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D187366
This commit is contained in:
parent
e4a95dc345
commit
3ebedffae0
@ -194,9 +194,11 @@ static Atomic<int64_t> sDrawTargetWebglCount(0);
|
||||
|
||||
DrawTargetWebgl::DrawTargetWebgl() { sDrawTargetWebglCount++; }
|
||||
|
||||
inline void DrawTargetWebgl::SharedContext::ClearLastTexture() {
|
||||
inline void DrawTargetWebgl::SharedContext::ClearLastTexture(bool aFullClear) {
|
||||
mLastTexture = nullptr;
|
||||
mLastClipMask = nullptr;
|
||||
if (aFullClear) {
|
||||
mLastClipMask = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// Attempts to clear the snapshot state. If the snapshot is only referenced by
|
||||
@ -239,6 +241,7 @@ DrawTargetWebgl::~DrawTargetWebgl() {
|
||||
child->DeallocShmem(mShmem);
|
||||
}
|
||||
}
|
||||
mSharedContext->ClearLastTexture(true);
|
||||
if (mClipMask) {
|
||||
mSharedContext->mWebgl->DeleteTexture(mClipMask);
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ class DrawTargetWebgl : public DrawTarget, public SupportsWeakPtr {
|
||||
// Reset the current target.
|
||||
void ClearTarget() { mCurrentTarget = nullptr; }
|
||||
// Reset the last used texture to force binding next use.
|
||||
void ClearLastTexture();
|
||||
void ClearLastTexture(bool aFullClear = false);
|
||||
|
||||
bool SupportsPattern(const Pattern& aPattern);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user