mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 623852. gfxContext::PushGroupAndCopyBackground should not try to copy the background if the underlying surface cannot be used as a source. r=mstange,a=blocking
This commit is contained in:
parent
fceda9686a
commit
7193a092f0
@ -222,8 +222,6 @@ public:
|
||||
|
||||
/**
|
||||
* Mark the surface as being allowed/not allowed to be used as a source.
|
||||
* This currently has no effect other than triggering assertions in some
|
||||
* cases.
|
||||
*/
|
||||
void SetAllowUseAsSource(PRBool aAllow) { mAllowUseAsSource = aAllow; }
|
||||
PRBool GetAllowUseAsSource() { return mAllowUseAsSource; }
|
||||
|
@ -772,8 +772,9 @@ gfxContext::PushGroupAndCopyBackground(gfxASurface::gfxContentType content)
|
||||
{
|
||||
if (content == gfxASurface::CONTENT_COLOR_ALPHA) {
|
||||
nsRefPtr<gfxASurface> s = CurrentSurface();
|
||||
if (s->GetContentType() == gfxASurface::CONTENT_COLOR ||
|
||||
s->GetOpaqueRect().Contains(GetRoundOutDeviceClipExtents(this))) {
|
||||
if ((s->GetAllowUseAsSource() || s->GetType() == gfxASurface::SurfaceTypeTee) &&
|
||||
(s->GetContentType() == gfxASurface::CONTENT_COLOR ||
|
||||
s->GetOpaqueRect().Contains(GetRoundOutDeviceClipExtents(this)))) {
|
||||
cairo_push_group_with_content(mCairo, CAIRO_CONTENT_COLOR);
|
||||
nsRefPtr<gfxASurface> d = CurrentSurface();
|
||||
|
||||
|
@ -2736,6 +2736,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||
NSSize bufferSize = [self bounds].size;
|
||||
nsRefPtr<gfxQuartzSurface> targetSurface =
|
||||
new gfxQuartzSurface(aContext, gfxSize(bufferSize.width, bufferSize.height));
|
||||
targetSurface->SetAllowUseAsSource(PR_FALSE);
|
||||
|
||||
nsRefPtr<gfxContext> targetContext = new gfxContext(targetSurface);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user