Merge pull request #4633 from BreadFish64/fully-invalid

video_core: improve efficiency of CachedSurface::IsSurfaceFullyInvalid
This commit is contained in:
Weiyi Wang 2019-02-14 11:44:46 -05:00 committed by GitHub
commit 4b2397aa77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -344,7 +344,8 @@ struct CachedSurface : SurfaceParams, std::enable_shared_from_this<CachedSurface
}
bool IsSurfaceFullyInvalid() const {
return (invalid_regions & GetInterval()) == SurfaceRegions(GetInterval());
auto interval = GetInterval();
return *invalid_regions.equal_range(interval).first == interval;
}
bool registered = false;