Bug 795627: Allow Skia canvas with accelerated Windows. r?gw280
MozReview-Commit-ID: DKyKC7n3OEM
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -459,27 +459,26 @@ gfxWindowsPlatform::HandleDeviceReset()
UpdateANGLEConfig();
BumpDeviceCounter();
return true;
}
void
gfxWindowsPlatform::UpdateBackendPrefs()
{
- uint32_t canvasMask = BackendTypeBit(BackendType::CAIRO);
- uint32_t contentMask = BackendTypeBit(BackendType::CAIRO);
+ uint32_t canvasMask = BackendTypeBit(BackendType::CAIRO) |
+ BackendTypeBit(BackendType::SKIA);
+ uint32_t contentMask = BackendTypeBit(BackendType::CAIRO) |
+ BackendTypeBit(BackendType::SKIA);
BackendType defaultBackend = BackendType::CAIRO;
if (gfxConfig::IsEnabled(Feature::DIRECT2D) && Factory::GetD2D1Device()) {
contentMask |= BackendTypeBit(BackendType::DIRECT2D1_1);
canvasMask |= BackendTypeBit(BackendType::DIRECT2D1_1);
defaultBackend = BackendType::DIRECT2D1_1;
- } else {
- canvasMask |= BackendTypeBit(BackendType::SKIA);
}
- contentMask |= BackendTypeBit(BackendType::SKIA);
InitBackendPrefs(canvasMask, defaultBackend, contentMask, defaultBackend);
}
bool
gfxWindowsPlatform::IsDirect2DBackend()
{
return GetDefaultContentBackend() == BackendType::DIRECT2D1_1;
}