Bug 1298171 - store result of BitmapProperties1 in a temporary to avoid warnings; r?jrmuizel draft
authorNathan Froyd <froydnj@mozilla.com>
Mon, 29 Aug 2016 10:31:25 -0400
changeset 406780 8df77f79865ff263ae4948146a4b710f91c32f27
parent 406288 9634da995479dc1a4afad658fdeb88ce4c1aab47
child 407420 c47c2156af1ef67809f1b418799dacb29699faf9
push id27825
push userbmo:nfroyd@mozilla.com
push dateMon, 29 Aug 2016 14:34:16 +0000
reviewersjrmuizel
bugs1298171
milestone51.0a1
Bug 1298171 - store result of BitmapProperties1 in a temporary to avoid warnings; r?jrmuizel MozReview-Commit-ID: ANy1vKc5p07
gfx/2d/DrawTargetD2D1.cpp
--- a/gfx/2d/DrawTargetD2D1.cpp
+++ b/gfx/2d/DrawTargetD2D1.cpp
@@ -1427,17 +1427,21 @@ DrawTargetD2D1::GetImageForLayerContent(
 
     RefPtr<ID2D1CommandList> list = CurrentLayer().mCurrentList;
     mDC->CreateCommandList(getter_AddRefs(CurrentLayer().mCurrentList));
     mDC->SetTarget(CurrentTarget());
     list->Close();
 
     RefPtr<ID2D1Bitmap1> tmpBitmap;
     if (mDidComplexBlendWithListInList) {
-      mDC->CreateBitmap(mBitmap->GetPixelSize(), nullptr, 0, &D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_TARGET, D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED)), getter_AddRefs(tmpBitmap));
+      D2D1_BITMAP_PROPERTIES1 props =
+        D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_TARGET,
+                                D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM,
+                                                  D2D1_ALPHA_MODE_PREMULTIPLIED));
+      mDC->CreateBitmap(mBitmap->GetPixelSize(), nullptr, 0, &props, getter_AddRefs(tmpBitmap));
       mDC->SetTransform(D2D1::IdentityMatrix());
       mDC->SetTarget(tmpBitmap);
       mDC->DrawImage(list, D2D1_INTERPOLATION_MODE_NEAREST_NEIGHBOR, D2D1_COMPOSITE_MODE_BOUNDED_SOURCE_COPY);
       mDC->SetTarget(CurrentTarget());
     }
 
     DCCommandSink sink(mDC);
     list->Stream(&sink);