зеркало из https://github.com/mozilla/gecko-dev.git
Bug 579985. Part 3.2: Remove gfxASurface::AreSimilarSurfacesSensitiveToContentType because it's effectively always true now. r=jrmuizel,a=blocking
This commit is contained in:
Родитель
55d56898d6
Коммит
6befdb5626
|
@ -472,10 +472,8 @@ BasicThebesLayer::Paint(gfxContext* aContext,
|
|||
nsRefPtr<gfxASurface> targetSurface = aContext->CurrentSurface();
|
||||
|
||||
PRBool canUseOpaqueSurface = CanUseOpaqueSurface();
|
||||
PRBool opaqueBuffer = canUseOpaqueSurface &&
|
||||
targetSurface->AreSimilarSurfacesSensitiveToContentType();
|
||||
Buffer::ContentType contentType =
|
||||
opaqueBuffer ? gfxASurface::CONTENT_COLOR :
|
||||
canUseOpaqueSurface ? gfxASurface::CONTENT_COLOR :
|
||||
gfxASurface::CONTENT_COLOR_ALPHA;
|
||||
float opacity = GetEffectiveOpacity();
|
||||
|
||||
|
|
|
@ -161,20 +161,6 @@ public:
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return trues if offscreen surfaces created from this surface
|
||||
* would behave differently depending on the gfxContentType. Returns
|
||||
* false if they don't (i.e. the surface returned by
|
||||
* CreateOffscreenSurface is always as if you passed
|
||||
* CONTENT_COLOR_ALPHA). Knowing this can be useful to avoid
|
||||
* recreating a surface just because it changed from opaque to
|
||||
* transparent.
|
||||
*/
|
||||
virtual PRBool AreSimilarSurfacesSensitiveToContentType()
|
||||
{
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
enum TextQuality {
|
||||
/**
|
||||
* TEXT_QUALITY_OK means that text is always rendered to a
|
||||
|
|
|
@ -104,8 +104,7 @@ gfxCachedTempSurface::Get(gfxASurface::gfxContentType aContentType,
|
|||
if (mSurface) {
|
||||
/* Verify the current buffer is valid for this purpose */
|
||||
if (mSize.width < aSize.width || mSize.height < aSize.height
|
||||
|| (mSurface->GetContentType() != aContentType
|
||||
&& mSurface->AreSimilarSurfacesSensitiveToContentType())) {
|
||||
|| mSurface->GetContentType() != aContentType) {
|
||||
mSurface = nsnull;
|
||||
} else {
|
||||
NS_ASSERTION(mType == aSimilarTo->GetType(),
|
||||
|
|
|
@ -56,10 +56,6 @@ public:
|
|||
|
||||
virtual already_AddRefed<gfxASurface> CreateSimilarSurface(gfxContentType aType,
|
||||
const gfxIntSize& aSize);
|
||||
virtual PRBool AreSimilarSurfacesSensitiveToContentType()
|
||||
{
|
||||
return PR_FALSE;
|
||||
}
|
||||
virtual TextQuality GetTextQualityInTransparentSurfaces()
|
||||
{
|
||||
return TEXT_QUALITY_OK_OVER_OPAQUE_PIXELS;
|
||||
|
|
Загрузка…
Ссылка в новой задаче