зеркало из https://github.com/mozilla/gecko-dev.git
Bug 624152. Don't do the 'copy background' part of PushGroupAndCopyBackground for non-pixel-based surfaces; it shouldn't be necessary. r=jrmuizel,a=blocker
This commit is contained in:
Родитель
785dc45b3a
Коммит
1d5fa13201
|
@ -770,7 +770,8 @@ CopySurface(gfxASurface* aSrc, gfxASurface* aDest)
|
|||
void
|
||||
gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content)
|
||||
{
|
||||
if (content == gfxASurface::CONTENT_COLOR_ALPHA) {
|
||||
if (content == gfxASurface::CONTENT_COLOR_ALPHA &&
|
||||
!(GetFlags() & FLAG_DISABLE_COPY_BACKGROUND)) {
|
||||
nsRefPtr<gfxASurface> s = CurrentSurface();
|
||||
if ((s->GetAllowUseAsSource() || s->GetType() == gfxASurface::SurfaceTypeTee) &&
|
||||
(s->GetContentType() == gfxASurface::CONTENT_COLOR ||
|
||||
|
|
|
@ -649,7 +649,11 @@ public:
|
|||
* When this flag is set, snapping to device pixels is disabled.
|
||||
* It simply never does anything.
|
||||
*/
|
||||
FLAG_DISABLE_SNAPPING = (1 << 1)
|
||||
FLAG_DISABLE_SNAPPING = (1 << 1),
|
||||
/**
|
||||
* Disable copying of backgrounds in PushGroupAndCopyBackground.
|
||||
*/
|
||||
FLAG_DISABLE_COPY_BACKGROUND = (1 << 2)
|
||||
};
|
||||
|
||||
void SetFlag(PRInt32 aFlag) { mFlags |= aFlag; }
|
||||
|
|
|
@ -69,7 +69,8 @@ public:
|
|||
virtual PRInt32 GetDefaultContextFlags() const
|
||||
{
|
||||
return gfxContext::FLAG_SIMPLIFY_OPERATORS |
|
||||
gfxContext::FLAG_DISABLE_SNAPPING;
|
||||
gfxContext::FLAG_DISABLE_SNAPPING |
|
||||
gfxContext::FLAG_DISABLE_COPY_BACKGROUND;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -61,7 +61,11 @@ public:
|
|||
|
||||
CGContextRef GetCGContext() { return mCGContext; }
|
||||
|
||||
virtual PRInt32 GetDefaultContextFlags() const { return gfxContext::FLAG_DISABLE_SNAPPING; }
|
||||
virtual PRInt32 GetDefaultContextFlags() const
|
||||
{
|
||||
return gfxContext::FLAG_DISABLE_SNAPPING |
|
||||
gfxContext::FLAG_DISABLE_COPY_BACKGROUND;
|
||||
}
|
||||
|
||||
protected:
|
||||
CGContextRef mCGContext;
|
||||
|
|
|
@ -286,7 +286,8 @@ gfxWindowsSurface::GetDefaultContextFlags() const
|
|||
{
|
||||
if (mForPrinting)
|
||||
return gfxContext::FLAG_SIMPLIFY_OPERATORS |
|
||||
gfxContext::FLAG_DISABLE_SNAPPING;
|
||||
gfxContext::FLAG_DISABLE_SNAPPING |
|
||||
gfxContext::FLAG_DISABLE_COPY_BACKGROUND;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче