diff --git a/gfx/2d/DrawTargetD2D.cpp b/gfx/2d/DrawTargetD2D.cpp index 28ec4893caed..077d7fb73d65 100644 --- a/gfx/2d/DrawTargetD2D.cpp +++ b/gfx/2d/DrawTargetD2D.cpp @@ -107,8 +107,10 @@ public: // We still need to take into account clipBounds if it contains additional // clipping information. RefPtr rectGeom; - factory()->CreateRectangleGeometry(D2D1::Rect(clipBounds.x, clipBounds.y, - clipBounds.XMost(), clipBounds.YMost()), + factory()->CreateRectangleGeometry(D2D1::Rect(Float(clipBounds.x), + Float(clipBounds.y), + Float(clipBounds.XMost()), + Float(clipBounds.YMost())), byRef(rectGeom)); mClippedArea = mDT->Intersect(mClippedArea, rectGeom); diff --git a/gfx/2d/RecordedEvent.cpp b/gfx/2d/RecordedEvent.cpp index b7b6c6d69af0..c8b649b93098 100644 --- a/gfx/2d/RecordedEvent.cpp +++ b/gfx/2d/RecordedEvent.cpp @@ -211,7 +211,9 @@ RecordedEvent::ReadStrokeOptions(std::istream &aStream, StrokeOptions &aStrokeOp ReadElement(aStream, aStrokeOptions.mMiterLimit); ReadElement(aStream, joinStyle); ReadElement(aStream, capStyle); - aStrokeOptions.mDashLength = dashLength; + // On 32 bit we truncate the value of dashLength. + // See also bug 811850 for history. + aStrokeOptions.mDashLength = size_t(dashLength); aStrokeOptions.mLineJoin = joinStyle; aStrokeOptions.mLineCap = capStyle; diff --git a/gfx/2d/SourceSurfaceD2D.cpp b/gfx/2d/SourceSurfaceD2D.cpp index 3f388e463296..c6ff601aa2d1 100644 --- a/gfx/2d/SourceSurfaceD2D.cpp +++ b/gfx/2d/SourceSurfaceD2D.cpp @@ -171,7 +171,9 @@ DataSourceSurfaceD2D::DataSourceSurfaceD2D(SourceSurfaceD2D* aSourceSurface) renderTarget->BeginDraw(); renderTarget->DrawBitmap(aSourceSurface->mBitmap, - D2D1::RectF(0, 0, mSize.width, mSize.height)); + D2D1::RectF(0, 0, + Float(mSize.width), + Float(mSize.height))); renderTarget->EndDraw(); desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ;