|
|
|
@ -1009,7 +1009,7 @@ Surface RasterizerCacheOpenGL::GetSurface(const SurfaceParams& params, bool pres
|
|
|
|
|
// If surface parameters changed and we care about keeping the previous data, recreate
|
|
|
|
|
// the surface from the old one
|
|
|
|
|
Surface new_surface{RecreateSurface(surface, params)};
|
|
|
|
|
Unregister(surface);
|
|
|
|
|
UnregisterSurface(surface);
|
|
|
|
|
Register(new_surface);
|
|
|
|
|
if (new_surface->IsUploaded()) {
|
|
|
|
|
RegisterReinterpretSurface(new_surface);
|
|
|
|
@ -1017,7 +1017,7 @@ Surface RasterizerCacheOpenGL::GetSurface(const SurfaceParams& params, bool pres
|
|
|
|
|
return new_surface;
|
|
|
|
|
} else {
|
|
|
|
|
// Delete the old surface before creating a new one to prevent collisions.
|
|
|
|
|
Unregister(surface);
|
|
|
|
|
UnregisterSurface(surface);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1368,12 +1368,12 @@ static bool IsReinterpretInvalidSecond(const Surface render_surface,
|
|
|
|
|
bool RasterizerCacheOpenGL::PartialReinterpretSurface(Surface triggering_surface,
|
|
|
|
|
Surface intersect) {
|
|
|
|
|
if (IsReinterpretInvalid(triggering_surface, intersect)) {
|
|
|
|
|
Unregister(intersect);
|
|
|
|
|
UnregisterSurface(intersect);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (!LayerFitReinterpretSurface(*this, triggering_surface, intersect)) {
|
|
|
|
|
if (IsReinterpretInvalidSecond(triggering_surface, intersect)) {
|
|
|
|
|
Unregister(intersect);
|
|
|
|
|
UnregisterSurface(intersect);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
FlushObject(intersect);
|
|
|
|
|