CGContext warnings with empty clip

RESOLVED FIXED in mozilla29

Status

()

Core
Graphics
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: mstange, Assigned: mstange)

Tracking

(Blocks: 1 bug)

Trunk
mozilla29
All
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
Created attachment 8349085 [details] [diff] [review]
early exit if clip is empty

When using the BasicCompositor, CG prints many warnings complaining about null contexts. These contexts come from the UnboundnessFixer which tries to create a CGLayer with 0x0 size.
Attachment #8349085 - Flags: review?(jmuizelaar)
As an aside can you look into why were hitting the UnboundnessFixer with BasicCompositor? That suggests badness.
Comment on attachment 8349085 [details] [diff] [review]
early exit if clip is empty

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

::: gfx/2d/DrawTargetCG.cpp
@@ +247,5 @@
>      {
>        if (!IsOperatorBoundByMask(blend)) {
>          mClipBounds = CGContextGetClipBoundingBox(baseCg);
> +        if (CGRectIsEmpty(mClipBounds)) {
> +          return nullptr;

I think we can just do return baseCG; here and not have to add all of the other checks.
Attachment #8349085 - Flags: review?(jmuizelaar) → review-
(Assignee)

Comment 3

4 years ago
(In reply to Jeff Muizelaar [:jrmuizel] from comment #1)
> As an aside can you look into why were hitting the UnboundnessFixer with
> BasicCompositor? That suggests badness.

The DrawSurface call at http://hg.mozilla.org/mozilla-central/annotate/1ad9af3a2ab8/gfx/layers/RotatedBuffer.cpp#l150 passes has aOperator == OP_SOURCE from http://hg.mozilla.org/mozilla-central/annotate/1ad9af3a2ab8/gfx/layers/client/ContentClient.cpp#l652 .
(Assignee)

Comment 4

4 years ago
Created attachment 8356731 [details] [diff] [review]
no early exit

Great idea.
Attachment #8349085 - Attachment is obsolete: true
Attachment #8356731 - Flags: review?(jmuizelaar)
Attachment #8356731 - Flags: review?(jmuizelaar) → review+
(Assignee)

Comment 5

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb0f15374f4f
https://hg.mozilla.org/mozilla-central/rev/cb0f15374f4f
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Blocks: 1087065
You need to log in before you can comment on or make changes to this bug.