diff --git a/es-app/src/views/SystemView.h b/es-app/src/views/SystemView.h index a64eff544..73e5746be 100644 --- a/es-app/src/views/SystemView.h +++ b/es-app/src/views/SystemView.h @@ -123,6 +123,10 @@ private: PrimaryComponent* mPrimary; PrimaryType mPrimaryType; + // Dummy entry to keep the default SVG rating images in the texture cache so they don't + // need to be re-rasterized for each gamelist that is loaded. + RatingComponent mRatingDummy; + float mCamOffset; float mFadeOpacity; int mPreviousScrollVelocity; diff --git a/es-core/src/components/RatingComponent.cpp b/es-core/src/components/RatingComponent.cpp index 719902dd6..362c0e794 100644 --- a/es-core/src/components/RatingComponent.cpp +++ b/es-core/src/components/RatingComponent.cpp @@ -27,10 +27,12 @@ RatingComponent::RatingComponent(bool colorizeChanges, bool linearInterpolation) mIconFilled.setResize(mSize, false); mIconFilled.setTileSize(mSize.y, mSize.y); + mIconFilled.setDynamic(false); mIconFilled.setLinearInterpolation(linearInterpolation); mIconUnfilled.setResize(mSize, false); mIconUnfilled.setTileSize(mSize.y, mSize.y); + mIconUnfilled.setDynamic(false); mIconUnfilled.setLinearInterpolation(linearInterpolation); mIconFilled.setImage(std::string(":/graphics/star_filled.svg"), true); @@ -233,7 +235,6 @@ void RatingComponent::applyTheme(const std::shared_ptr& theme, if (properties & PATH && elem->has("filledPath") && (Utils::FileSystem::isRegularFile(elem->get("filledPath")) || Utils::FileSystem::isSymlink(elem->get("filledPath")))) { - mIconFilled.setDynamic(true); mIconFilled.setLinearInterpolation(linearInterpolation); mIconFilled.setImage(std::string(elem->get("filledPath")), true); mIconFilled.getTexture()->setSize(std::round(mSize.y * mImageRatio), mSize.y); @@ -249,7 +250,6 @@ void RatingComponent::applyTheme(const std::shared_ptr& theme, if (properties & PATH && elem->has("unfilledPath") && (Utils::FileSystem::isRegularFile(elem->get("unfilledPath")) || Utils::FileSystem::isSymlink(elem->get("unfilledPath")))) { - mIconUnfilled.setDynamic(true); mIconUnfilled.setLinearInterpolation(linearInterpolation); mIconUnfilled.setImage(std::string(elem->get("unfilledPath")), true); mIconUnfilled.getTexture()->setSize(std::round(mSize.y * mImageRatio), mSize.y);