Closed Bug 1075616 Opened 7 years ago Closed 7 years ago

SurfacePattern::mSamplingRect does not work correctly for very large surfaces with Direct2D


(Core :: Graphics, defect)

35 Branch
Windows 8.1
Not set



Tracking Status
firefox35 + fixed


(Reporter: bas.schouten, Assigned: mattwoodrow)



(Keywords: regression)


(1 file, 1 obsolete file)

This is unlikely to cause real problems since cases where we use mSamplingRect shouldn't normally deal with very large images.

But CreatePartialBitmapForSurface doesn't play nicely with SurfacePattern::mSamplingRect. This means for border-image where the image is larger than 8192 pixels in some direction we might have a bug. I don't think this is high priority but I wanted to have this on file in case someone does run into this.
Is this what you had in mind?
Assignee: nobody → matt.woodrow
Attachment #8498539 - Flags: review?(bas)
Attachment #8498539 - Attachment is obsolete: true
Attachment #8498539 - Flags: review?(bas)
Attachment #8498543 - Flags: review?(bas)
Duplicate of this bug: 1075467
Duplicate of this bug: 1068565
Looks like this may be high priority, found two duplicates of it already.
[Tracking Requested - why for this release]:
Blocks: 1044702
Keywords: regression
Version: unspecified → 35 Branch
Comment on attachment 8498543 [details] [diff] [review]
Do partial uploads when we have a sampling rect

Review of attachment 8498543 [details] [diff] [review]:

Yup, this should do it, we'll need something similar for D2D 1.1. Again, no hurry, but eventually it's probably better if we sort it out. It's probably going to be a little annoying to test.

::: gfx/2d/DrawTargetD2D.cpp
@@ +2378,5 @@
>          MOZ_ASSERT("Invalid sampling rect size!");
>          return nullptr;
>        }
> +      dt->CopySurface(source, samplingRect, IntPoint())

nit: You'll need to re-add that ; you removed :P

@@ +2418,5 @@
> +        if (sourceRect.IsEmpty()) {
> +          sourceRect = IntRect(0, 0, source->GetSize().width, source->GetSize().height);
> +        }
> +
> +        bitmap = CreatePartialBitmapForSurface(dataSurf, mTransform, mSize, pat->mExtendMode, mat, mRT, &sourceRect); 

nit: might as well fix the whitespace while you're in this line :)
Attachment #8498543 - Flags: review?(bas) → review+
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.