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

RESOLVED FIXED in Firefox 35

Status

()

Core
Graphics
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bas, Assigned: mattwoodrow)

Tracking

({regression})

35 Branch
mozilla35
x86_64
Windows 8.1
regression
Points:
---

Firefox Tracking Flags

(firefox35+ fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
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.
(Assignee)

Comment 1

4 years ago
Created attachment 8498539 [details] [diff] [review]
Do partial uploads when we have a sampling rect

Is this what you had in mind?
Assignee: nobody → matt.woodrow
Attachment #8498539 - Flags: review?(bas)
(Assignee)

Comment 2

4 years ago
Created attachment 8498543 [details] [diff] [review]
Do partial uploads when we have a sampling rect
Attachment #8498539 - Attachment is obsolete: true
Attachment #8498539 - Flags: review?(bas)
Attachment #8498543 - Flags: review?(bas)
(Assignee)

Updated

4 years ago
Duplicate of this bug: 1075467
(Assignee)

Updated

4 years ago
Duplicate of this bug: 1068565
(Assignee)

Comment 5

4 years ago
Looks like this may be high priority, found two duplicates of it already.

Comment 6

4 years ago
[Tracking Requested - why for this release]:
Blocks: 1044702
status-firefox35: --- → affected
tracking-firefox35: --- → ?
Keywords: regression

Updated

4 years ago
Version: unspecified → 35 Branch
(Reporter)

Comment 7

4 years ago
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+
tracking-firefox35: ? → +

Comment 9

4 years ago
https://hg.mozilla.org/mozilla-central/rev/1b49657fad19
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox35: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.