Bug 1256552 - fix int-to-float conversions in RadialGradientEffectD2D1. r=jrmuizel
authorLee Salzman <lsalzman@mozilla.com>
Mon, 21 Mar 2016 16:17:16 -0400
changeset 289658 30cc10b99593fd543eba8dcc20fd451b4424fb84
parent 289657 e7ee750067da1e8f56f1283239948358267a9762
child 289659 7b0c5b5589177cc568290a841f3912922c2cb2f6
push id73941
push userlsalzman@mozilla.com
push dateMon, 21 Mar 2016 20:17:34 +0000
treeherdermozilla-inbound@30cc10b99593 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1256552
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1256552 - fix int-to-float conversions in RadialGradientEffectD2D1. r=jrmuizel
gfx/2d/RadialGradientEffectD2D1.cpp
gfx/thebes/gfxGDIFontList.cpp
--- a/gfx/2d/RadialGradientEffectD2D1.cpp
+++ b/gfx/2d/RadialGradientEffectD2D1.cpp
@@ -148,23 +148,23 @@ RadialGradientEffectD2D1::PrepareForRend
     float radius1;
     float sq_radius1;
     float repeat_correct;
     float allow_odd;
     float padding2[1];
     float transform[8];
   };
 
-  PSConstantBuffer buffer = { { dc.x, dc.y, dr }, 0,
+  PSConstantBuffer buffer = { { dc.x, dc.y, dr }, 0.0f,
                               { mCenter1.x, mCenter1.y },
                               A, mRadius1, mRadius1 * mRadius1,
-                              mStopCollection->GetExtendMode() != D2D1_EXTEND_MODE_CLAMP ? 1 : 0,
-                              mStopCollection->GetExtendMode() == D2D1_EXTEND_MODE_MIRROR ? 1 : 0,
-                              { 0 }, { mat._11, mat._21, mat._31, 0,
-                                             mat._12, mat._22, mat._32, 0 } };
+                              mStopCollection->GetExtendMode() != D2D1_EXTEND_MODE_CLAMP ? 1.0f : 0.0f,
+                              mStopCollection->GetExtendMode() == D2D1_EXTEND_MODE_MIRROR ? 1.0f : 0.0f,
+                              { 0.0f }, { mat._11, mat._21, mat._31, 0.0f,
+                                             mat._12, mat._22, mat._32, 0.0f } };
 
   hr = mDrawInfo->SetPixelShaderConstantBuffer((BYTE*)&buffer, sizeof(buffer));
 
   if (FAILED(hr)) {
     return hr;
   }
 
   return S_OK;
--- a/gfx/thebes/gfxGDIFontList.cpp
+++ b/gfx/thebes/gfxGDIFontList.cpp
@@ -320,17 +320,17 @@ GDIFontEntry::TestCharacterMap(uint32_t 
             return false;
         gfxGDIFont *font = static_cast<gfxGDIFont*>(tempFont.get());
 
         HDC dc = GetDC((HWND)nullptr);
         SetGraphicsMode(dc, GM_ADVANCED);
         HFONT hfont = font->GetHFONT();
         HFONT oldFont = (HFONT)SelectObject(dc, hfont);
 
-        wchar_t str[1] = { aCh };
+        wchar_t str[1] = { (wchar_t)aCh };
         WORD glyph[1];
 
         bool hasGlyph = false;
 
         // Bug 573038 - in some cases GetGlyphIndicesW returns 0xFFFF for a 
         // missing glyph or 0x1F in other cases to indicate the "invalid" 
         // glyph.  Map both cases to "not found"
         if (IsType1() || mForceGDI) {