Bug 795627: Allow Skia canvas with accelerated Windows. r?gw280 draft
authorMilan Sreckovic <milan@mozilla.com>
Wed, 14 Dec 2016 19:10:27 -0500
changeset 449754 fb4bcf34a79334d10d05f82a5c0be3339269f110
parent 449264 489f981e8c2beb050d7faee956dd940431bdafe6
child 539565 f29128e088ca2443037c8ca0d3f5a6825e87ef58
push id38647
push userbmo:milan@mozilla.com
push dateThu, 15 Dec 2016 00:11:05 +0000
reviewersgw280
bugs795627
milestone53.0a1
Bug 795627: Allow Skia canvas with accelerated Windows. r?gw280 MozReview-Commit-ID: DKyKC7n3OEM
gfx/thebes/gfxWindowsPlatform.cpp
--- 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;
 }