Texcache: Always mark videos as freq changing.

This prevents scaling of the first frame in some cases, when later frames
would also not be scaled.  Improves performance and reduces frame
mismatch.
This commit is contained in:
Unknown W. Brackets 2017-03-18 11:49:30 -07:00
parent 30ff5d6cdb
commit d0ea5ed72b

View File

@ -1378,6 +1378,13 @@ void TextureCacheCommon::ApplyTexture() {
bool replaceImages = false;
if (nextNeedsRebuild_) {
// Regardless of hash fails or otherwise, if this is a video, mark it frequently changing.
// This prevents temporary scaling perf hits on the first second of video.
bool isVideo = videos_.find(entry->addr & 0x3FFFFFFF) != videos_.end();
if (isVideo) {
entry->status |= TexCacheEntry::STATUS_CHANGE_FREQUENT;
}
if (nextNeedsRehash_) {
// Update the hash on the texture.
int w = gstate.getTextureWidth(0);