mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 940625 - Discard the surfaces for SVG images that are in the ImageLib SurfaceCache when the app theme changes. r=seth
This commit is contained in:
parent
f886ddcddc
commit
74a5f2859e
@ -33,6 +33,7 @@
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "RestyleManager.h"
|
||||
#include "SurfaceCache.h"
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "nsRuleNode.h"
|
||||
#include "gfxPlatform.h"
|
||||
@ -1710,10 +1711,15 @@ nsPresContext::ThemeChangedInternal()
|
||||
sThemeChanged = false;
|
||||
}
|
||||
|
||||
// Clear all cached LookAndFeel colors.
|
||||
if (sLookAndFeelChanged) {
|
||||
// Clear all cached LookAndFeel colors.
|
||||
LookAndFeel::Refresh();
|
||||
sLookAndFeelChanged = false;
|
||||
|
||||
// Vector images (SVG) may be using theme colors so we discard all cached
|
||||
// surfaces. (We could add a vector image only version of DiscardAll, but
|
||||
// in bug 940625 we decided theme changes are rare enough not to bother.)
|
||||
mozilla::image::SurfaceCache::DiscardAll();
|
||||
}
|
||||
|
||||
// This will force the system metrics to be generated the next time they're used
|
||||
|
Loading…
Reference in New Issue
Block a user