diff options
| author | Stenzek <stenzek@gmail.com> | 2017-10-30 21:51:42 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2017-11-22 18:47:04 +1000 |
| commit | 56afebeb44f1ace990d9383e9b840fdc27610029 (patch) | |
| tree | 3717a9e24cde9cfcc870ebfb7e083b4db053c0e5 /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | f43d85921dc85ae586d69b21d28a7578835a55bd (diff) | |
AbstractTexture: Seperate CopyRectangleFromTexture to two methods
ScaleRectangleFromTexture, which does a draw, and
CopyRectangleFromTexture, which where possible, does a bit-for-bit copy.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 521f5816f1..31701e6bc0 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -277,9 +277,9 @@ void TextureCacheBase::ScaleTextureCacheEntryTo(TextureCacheBase::TCacheEntry* e std::unique_ptr<AbstractTexture> new_texture = AllocateTexture(newconfig); if (new_texture) { - new_texture->CopyRectangleFromTexture(entry->texture.get(), - entry->texture->GetConfig().GetRect(), - new_texture->GetConfig().GetRect()); + new_texture->ScaleRectangleFromTexture(entry->texture.get(), + entry->texture->GetConfig().GetRect(), + new_texture->GetConfig().GetRect()); entry->texture.swap(new_texture); auto config = new_texture->GetConfig(); @@ -406,7 +406,8 @@ TextureCacheBase::DoPartialTextureUpdates(TCacheEntry* entry_to_update, u8* pale dstrect.top = dst_y; dstrect.right = (dst_x + copy_width); dstrect.bottom = (dst_y + copy_height); - entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, dstrect); + entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, 0, 0, + dstrect, 0, 0); if (isPaletteTexture) { @@ -1391,7 +1392,8 @@ bool TextureCacheBase::LoadTextureFromOverlappingTextures(TCacheEntry* entry_to_ dstrect.bottom -= 1; } - entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, dstrect); + entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, 0, 0, + dstrect, 0, 0); updated_entry = true; |
