Draw with Quartz when using OMTC on mac

RESOLVED FIXED in mozilla19

Status

()

Core
Graphics: Layers
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Tracking

unspecified
mozilla19
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Comment hidden (empty)
(Assignee)

Comment 1

6 years ago
Created attachment 678210 [details] [diff] [review]
Make gfxSharedImageSurface take a template parameter for the base surface type

We need this so that we can use gfxQuartzSurface as the drawing backend on mac.
Attachment #678210 - Flags: review?(jones.chris.g)
(Assignee)

Comment 2

6 years ago
Created attachment 678211 [details] [diff] [review]
Use gfxQuartzSurface for OMTC drawing on mac
Attachment #678211 - Flags: review?(jones.chris.g)
Comment on attachment 678210 [details] [diff] [review]
Make gfxSharedImageSurface take a template parameter for the base surface type

I'm not too enthused about the interface here, but the implementation
looks fine.  Would this alternative approach for the interface work?

 - create gfxBaseSharedMemorySurface.{h,cpp} with the code you factored
   out here

 - cut down gfxSharedImageSurface.h to something like

class gfxSharedImageSurface : public gfxBaseSharedMemorySurface<gfxImageSurface>

 - create gfxSharedQuartzSurface similarly
Attachment #678210 - Flags: review?(jones.chris.g)
Comment on attachment 678211 [details] [diff] [review]
Use gfxQuartzSurface for OMTC drawing on mac

>diff --git a/gfx/layers/ipc/ShadowLayerUtilsMac.cpp b/gfx/layers/ipc/ShadowLayerUtilsMac.cpp

>+bool
>+ShadowLayerForwarder::PlatformAllocBuffer(const gfxIntSize& aSize,
>+                                          gfxASurface::gfxContentType aContent,
>+                                          uint32_t aCaps,
>+                                          SurfaceDescriptor* aBuffer)
>+{
>+  return false;

This seems OK for now, but any reason why we wouldn't want to use
quartz from the content context?  It probably be problematic with
low-rights content processes, but shouldn't be an issue with omtc.
Attachment #678211 - Flags: review?(jones.chris.g) → review+
(Assignee)

Comment 5

6 years ago
(In reply to Chris Jones [:cjones] [:warhammer] from comment #4)

> This seems OK for now, but any reason why we wouldn't want to use
> quartz from the content context?  It probably be problematic with
> low-rights content processes, but shouldn't be an issue with omtc.

I'm not sure what you mean by this sorry. We should be using quartz for drawing content with my patch?
Your patch with return a gfxImageSurface to content, which have cairo use the cairo-image drawing backend right?
(Assignee)

Comment 7

6 years ago
Created attachment 678966 [details] [diff] [review]
Make gfxSharedImageSurface take a template parameter for the base surface type v2
Attachment #678210 - Attachment is obsolete: true
Attachment #678966 - Flags: review?(jones.chris.g)
Attachment #678966 - Flags: review?(jones.chris.g) → review+
https://hg.mozilla.org/mozilla-central/rev/877f3c82d44a
https://hg.mozilla.org/mozilla-central/rev/8083f8825153
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.