mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 716639. Add a constructor for gfxQuartzSurface that takes a gfxIntSize. r=mwoodrow
This commit is contained in:
parent
85f9f45459
commit
c9be313fe1
@ -81,6 +81,26 @@ gfxQuartzSurface::gfxQuartzSurface(CGContextRef context,
|
||||
unsigned int width = static_cast<unsigned int>(mSize.width);
|
||||
unsigned int height = static_cast<unsigned int>(mSize.height);
|
||||
|
||||
cairo_surface_t *surf =
|
||||
cairo_quartz_surface_create_for_cg_context(context,
|
||||
width, height);
|
||||
|
||||
CGContextRetain(mCGContext);
|
||||
|
||||
Init(surf);
|
||||
}
|
||||
|
||||
gfxQuartzSurface::gfxQuartzSurface(CGContextRef context,
|
||||
const gfxIntSize& size,
|
||||
bool aForPrinting)
|
||||
: mCGContext(context), mSize(size), mForPrinting(aForPrinting)
|
||||
{
|
||||
if (!CheckSurfaceSize(size))
|
||||
MakeInvalid();
|
||||
|
||||
unsigned int width = static_cast<unsigned int>(mSize.width);
|
||||
unsigned int height = static_cast<unsigned int>(mSize.height);
|
||||
|
||||
cairo_surface_t *surf =
|
||||
cairo_quartz_surface_create_for_cg_context(context,
|
||||
width, height);
|
||||
|
@ -50,6 +50,7 @@ class THEBES_API gfxQuartzSurface : public gfxASurface {
|
||||
public:
|
||||
gfxQuartzSurface(const gfxSize& size, gfxImageFormat format, bool aForPrinting = false);
|
||||
gfxQuartzSurface(CGContextRef context, const gfxSize& size, bool aForPrinting = false);
|
||||
gfxQuartzSurface(CGContextRef context, const gfxIntSize& size, bool aForPrinting = false);
|
||||
gfxQuartzSurface(cairo_surface_t *csurf, bool aForPrinting = false);
|
||||
gfxQuartzSurface(unsigned char *data, const gfxSize& size, long stride, gfxImageFormat format, bool aForPrinting = false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user