mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1099335: Base decision to use a complex clip on whether a DT supports regoin clipping. r=jrmuizel
DrawTargets that support region clipping are able to clip to regions effectively. Other DrawTargets go through expensive complex clip paths. When invalidating regions we have code that draws in multiple steps when using Direct2D to avoid this expense, we should base the decision to do this simply on whether the DrawTarget supports fast region clipping.
This commit is contained in:
parent
709421a42d
commit
d4181f7c5f
@ -1003,6 +1003,7 @@ public:
|
||||
|
||||
virtual bool IsDualDrawTarget() const { return false; }
|
||||
virtual bool IsTiledDrawTarget() const { return false; }
|
||||
virtual bool SupportsRegionClipping() const { return true; }
|
||||
|
||||
void AddUserData(UserDataKey *key, void *userData, void (*destroy)(void*)) {
|
||||
mUserData.Add(key, userData, destroy);
|
||||
|
@ -131,6 +131,8 @@ public:
|
||||
|
||||
virtual TemporaryRef<FilterNode> CreateFilter(FilterType aType);
|
||||
|
||||
virtual bool SupportsRegionClipping() const { return false; }
|
||||
|
||||
virtual void *GetNativeSurface(NativeSurfaceType aType);
|
||||
|
||||
bool Init(const IntSize &aSize, SurfaceFormat aFormat);
|
||||
|
@ -122,6 +122,8 @@ public:
|
||||
|
||||
virtual TemporaryRef<FilterNode> CreateFilter(FilterType aType);
|
||||
|
||||
virtual bool SupportsRegionClipping() const { return false; }
|
||||
|
||||
virtual void *GetNativeSurface(NativeSurfaceType aType) { return nullptr; }
|
||||
|
||||
bool Init(const IntSize &aSize, SurfaceFormat aFormat);
|
||||
|
@ -4407,7 +4407,7 @@ static bool ShouldDrawRectsSeparately(gfxContext* aContext, DrawRegionClip aClip
|
||||
}
|
||||
|
||||
DrawTarget *dt = aContext->GetDrawTarget();
|
||||
return dt->GetBackendType() == BackendType::DIRECT2D;
|
||||
return !dt->SupportsRegionClipping();
|
||||
}
|
||||
|
||||
static void DrawForcedBackgroundColor(gfxContext* aContext, Layer* aLayer, nscolor aBackgroundColor)
|
||||
|
Loading…
Reference in New Issue
Block a user