mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 874721; Re-fix WebGL. r=mattwoodrow
This commit is contained in:
parent
1568126fd7
commit
3595dbcb83
@ -73,11 +73,9 @@ gfxCachedTempSurface::Get(gfxASurface::gfxContentType aContentType,
|
||||
if (mSurface) {
|
||||
/* Verify the current buffer is valid for this purpose */
|
||||
if (mSize.width < aRect.width || mSize.height < aRect.height
|
||||
|| mSurface->GetContentType() != aContentType) {
|
||||
|| mSurface->GetContentType() != aContentType
|
||||
|| mType != aSimilarTo->GetType()) {
|
||||
mSurface = nullptr;
|
||||
} else {
|
||||
NS_ASSERTION(mType == aSimilarTo->GetType(),
|
||||
"Unexpected surface type change");
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,9 +87,7 @@ gfxCachedTempSurface::Get(gfxASurface::gfxContentType aContentType,
|
||||
return nullptr;
|
||||
|
||||
cleared = true;
|
||||
#ifdef DEBUG
|
||||
mType = aSimilarTo->GetType();
|
||||
#endif
|
||||
}
|
||||
mSurface->SetDeviceOffset(-aRect.TopLeft());
|
||||
|
||||
|
@ -33,10 +33,9 @@ public:
|
||||
* When |aContentType| differs in different invocations this is handled
|
||||
* appropriately, creating a new surface if necessary.
|
||||
*
|
||||
* |aSimilarTo| should be of the same gfxSurfaceType in each invocation.
|
||||
* Because the cached surface may have been created during a previous
|
||||
* invocation, this will not be efficient if the new |aSimilarTo| has a
|
||||
* different format.
|
||||
* different format, size, or gfxSurfaceType.
|
||||
*/
|
||||
already_AddRefed<gfxContext> Get(gfxASurface::gfxContentType aContentType,
|
||||
const gfxRect& aRect,
|
||||
@ -52,9 +51,7 @@ private:
|
||||
nsRefPtr<gfxASurface> mSurface;
|
||||
gfxIntSize mSize;
|
||||
nsExpirationState mExpirationState;
|
||||
#ifdef DEBUG
|
||||
gfxASurface::gfxSurfaceType mType;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* GFX_CACHED_TEMP_SURFACE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user