Report a DrawTargetTiled as a capture if it is made of captures (bug 1425056, r=bas) draft
authorRyan Hunt <rhunt@eqrion.net>
Wed, 13 Dec 2017 09:27:07 -0600
changeset 713692 c856b693abc3196e3e7e771af6d6447e621d6d7c
parent 713691 0f82c1eeef3f7aa64c07d2125c153c37a4a7a004
child 713693 3646c7c12727f777e7dd1994e8ab2f17ebeb329e
push id93735
push userbmo:rhunt@eqrion.net
push dateWed, 20 Dec 2017 22:39:00 +0000
reviewersbas
bugs1425056
milestone59.0a1
Report a DrawTargetTiled as a capture if it is made of captures (bug 1425056, r=bas) This will make it so that we avoid main thread rasterization for box shadows. MozReview-Commit-ID: 9Tg4dsH21V6
gfx/2d/DrawTargetTiled.h
--- a/gfx/2d/DrawTargetTiled.h
+++ b/gfx/2d/DrawTargetTiled.h
@@ -37,16 +37,17 @@ class DrawTargetTiled : public DrawTarge
 {
 public:
   DrawTargetTiled();
 
   bool Init(const TileSet& mTiles);
 
   virtual bool IsTiledDrawTarget() const override { return true; }
 
+  virtual bool IsCaptureDT() const override { return mTiles[0].mDrawTarget->IsCaptureDT(); }
   virtual DrawTargetType GetType() const override { return mTiles[0].mDrawTarget->GetType(); }
   virtual BackendType GetBackendType() const override { return mTiles[0].mDrawTarget->GetBackendType(); }
   virtual already_AddRefed<SourceSurface> Snapshot() override;
   virtual void DetachAllSnapshots() override;
   virtual IntSize GetSize() override {
     MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
     return IntSize(mRect.XMost(), mRect.YMost());
   }