Closed Bug 1060960 Opened 7 years ago Closed 7 years ago

Fix D2D 1.1 backend's ClearRect implementation

Categories

(Core :: Graphics, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(1 file)

Right now ClearRect on D2D 1.1 does not correctly support transforms or complex clips. This patch fixes that, notice the complex clip implementation is a not more elegant than it was for D2D 1.0, since we can use DESTINATION_OUT now.
Attachment #8481968 - Flags: review?(jmuizelaar)
Blocks: 902952
Comment on attachment 8481968 [details] [diff] [review]
Fix D2D 1.1 ClearRect to deal with transforms and complex clips

Review of attachment 8481968 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/2d/DrawTargetD2D1.cpp
@@ +893,5 @@
> +  if (!mPushedClips.size()) {
> +    return false;
> +  }
> +
> +  std::vector<DrawTargetD2D1::PushedClip>::iterator iter = mPushedClips.begin();

auto iter

@@ +898,5 @@
> +  if (iter->mPath) {
> +    return false;
> +  }
> +  aClipRect = iter->mBounds;
> +  aIsPixelAligned = iter->mIsPixelAligned;

You could fold this into into the loop below by initializing aClipRect to (0,0), mSize
Attachment #8481968 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/3706401f8cc9
Status: ASSIGNED → RESOLVED
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.