Closed Bug 1274720 Opened 8 years ago Closed 8 years ago

Don't use DrawTargetCG for drawing popups (context menus, panels)

Categories

(Core :: Widget: Cocoa, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: tpi:+)

Attachments

(1 file)

Instead, draw into a Skia DrawTarget, rewrap the bits in a CGImageRef, and draw that to the window.
Comment on attachment 8755057 [details]
MozReview Request: Bug 1274720 - Don't use DrawTargetCG for drawing popups. r?jrmuizel

https://reviewboard.mozilla.org/r/54372/#review52554

::: widget/cocoa/nsChildView.h:688
(Diff revision 1)
>    RefPtr<mozilla::SwipeTracker> mSwipeTracker;
>    mozilla::UniquePtr<mozilla::SwipeEventQueue> mSwipeEventQueue;
>  
> +  // Only used for drawRect-based painting in popups.
> +  mozilla::UniquePtr<unsigned char[]> mBackingSurfaceData;
> +  mozilla::gfx::IntSize mBackingSurfaceSize;

Can this just be a DrawTarget instead of tracking this separately? We can just call LockRect on the DrawTarget.
Attachment #8755057 - Flags: review?(jmuizelaar)
Comment on attachment 8755057 [details]
MozReview Request: Bug 1274720 - Don't use DrawTargetCG for drawing popups. r?jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/54372/diff/1-2/
Attachment #8755057 - Flags: review?(jmuizelaar)
Comment on attachment 8755057 [details]
MozReview Request: Bug 1274720 - Don't use DrawTargetCG for drawing popups. r?jrmuizel

https://reviewboard.mozilla.org/r/54372/#review53456
Attachment #8755057 - Flags: review?(jmuizelaar) → review+
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/061b48fc0614
Don't use DrawTargetCG for drawing popups. r=jrmuizel
Priority: -- → P1
Whiteboard: tpi:+
https://hg.mozilla.org/mozilla-central/rev/061b48fc0614
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
FWIW, this broke drawing pop-ups if you were using the cg-only backend, ie: "gfx.content.azure.backends=cg" (I had it set when testing memory usage switching over to skia, forget to reset it). I wonder if we should just get rid of that pref.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: