mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 941095 - Part 1: Support SetPermitSubpixelAA with Quartz. r=bas
--HG-- extra : rebase_source : 69171a8a17a34c822b34f48babecf18ffa08bf56
This commit is contained in:
parent
0909f112c0
commit
dc08516cff
@ -1338,6 +1338,7 @@ DrawTargetCG::Init(BackendType aType,
|
||||
// XXX: Create input parameter to control interpolation and
|
||||
// use the default for content.
|
||||
CGContextSetInterpolationQuality(mCg, kCGInterpolationLow);
|
||||
CGContextSetShouldSmoothFonts(mCg, GetPermitSubpixelAA());
|
||||
|
||||
|
||||
if (aType == BACKEND_COREGRAPHICS_ACCELERATED) {
|
||||
@ -1377,6 +1378,7 @@ DrawTargetCG::Init(CGContextRef cgContext, const IntSize &aSize)
|
||||
mSize = aSize;
|
||||
|
||||
mCg = cgContext;
|
||||
CGContextSetShouldSmoothFonts(mCg, GetPermitSubpixelAA());
|
||||
CGContextRetain(mCg);
|
||||
|
||||
assert(mCg);
|
||||
@ -1530,6 +1532,12 @@ DrawTargetCG::MarkChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetCG::SetPermitSubpixelAA(bool aPermitSubpixelAA) {
|
||||
DrawTarget::SetPermitSubpixelAA(aPermitSubpixelAA);
|
||||
CGContextSetShouldSmoothFonts(mCg, aPermitSubpixelAA);
|
||||
}
|
||||
|
||||
CGContextRef
|
||||
BorrowedCGContext::BorrowCGContextFromDrawTarget(DrawTarget *aDT)
|
||||
{
|
||||
|
@ -154,6 +154,7 @@ public:
|
||||
|
||||
virtual IntSize GetSize() { return mSize; }
|
||||
|
||||
virtual void SetPermitSubpixelAA(bool aPermitSubpixelAA) MOZ_OVERRIDE;
|
||||
|
||||
/* This is for creating good compatible surfaces */
|
||||
virtual TemporaryRef<SourceSurface> CreateSourceSurfaceFromData(unsigned char *aData,
|
||||
|
Loading…
Reference in New Issue
Block a user