Bug 1562278. Forward more methods of DrawTargetOffset. r=mstange
authorJeff Muizelaar <jrmuizel@gmail.com>
Fri, 28 Jun 2019 18:41:17 +0000
changeset 543411 426813c2ceee114544d415b5e2037febf3013814
parent 543410 e0311539d0fba60067acf35eef23eba60b26a669
child 543412 2f081ac561098d6342622c28b86ec92939942c26
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1562278
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1562278. Forward more methods of DrawTargetOffset. r=mstange This lets us avoid falling back to the generic implementations unnecessarily. Differential Revision: https://phabricator.services.mozilla.com/D36357
gfx/2d/DrawTargetOffset.cpp
gfx/2d/DrawTargetOffset.h
--- a/gfx/2d/DrawTargetOffset.cpp
+++ b/gfx/2d/DrawTargetOffset.cpp
@@ -52,16 +52,26 @@ void DrawTargetOffset::DetachAllSnapshot
   }
 
 OFFSET_COMMAND(Flush)
 OFFSET_COMMAND1(ClearRect, const Rect&)
 OFFSET_COMMAND4(MaskSurface, const Pattern&, SourceSurface*, Point,
                 const DrawOptions&)
 OFFSET_COMMAND4(FillGlyphs, ScaledFont*, const GlyphBuffer&, const Pattern&,
                 const DrawOptions&)
+OFFSET_COMMAND5(StrokeGlyphs, ScaledFont*, const GlyphBuffer&, const Pattern&,
+                const StrokeOptions&, const DrawOptions&)
+OFFSET_COMMAND3(FillRoundedRect, const RoundedRect&, const Pattern&,
+                const DrawOptions&)
+
+bool DrawTargetOffset::Draw3DTransformedSurface(SourceSurface *aSrc,
+                                                const Matrix4x4& aMatrix) {
+    return mDrawTarget->Draw3DTransformedSurface(aSrc, aMatrix);
+}
+
 OFFSET_COMMAND3(Mask, const Pattern&, const Pattern&, const DrawOptions&)
 
 void DrawTargetOffset::DrawFilter(FilterNode* aNode, const Rect& aSourceRect,
                                   const Point& aDestPoint,
                                   const DrawOptions& aOptions) {
   auto clone = mTransform;
   bool invertible = clone.Invert();
   // aSourceRect is in filter space. The filter outputs from aSourceRect need
--- a/gfx/2d/DrawTargetOffset.h
+++ b/gfx/2d/DrawTargetOffset.h
@@ -90,45 +90,54 @@ class DrawTargetOffset : public DrawTarg
       const Pattern& aSource, SourceSurface* aMask, Point aOffset,
       const DrawOptions& aOptions = DrawOptions()) override;
 
   virtual void CopySurface(SourceSurface* aSurface, const IntRect& aSourceRect,
                            const IntPoint& aDestination) override;
 
   virtual void FillRect(const Rect& aRect, const Pattern& aPattern,
                         const DrawOptions& aOptions = DrawOptions()) override;
+  virtual void FillRoundedRect(const RoundedRect& aRect,
+                               const Pattern& aPattern,
+                               const DrawOptions& aOptions = DrawOptions()) override;
   virtual void StrokeRect(const Rect& aRect, const Pattern& aPattern,
                           const StrokeOptions& aStrokeOptions = StrokeOptions(),
                           const DrawOptions& aOptions = DrawOptions()) override;
   virtual void StrokeLine(const Point& aStart, const Point& aEnd,
                           const Pattern& aPattern,
                           const StrokeOptions& aStrokeOptions = StrokeOptions(),
                           const DrawOptions& aOptions = DrawOptions()) override;
   virtual void Stroke(const Path* aPath, const Pattern& aPattern,
                       const StrokeOptions& aStrokeOptions = StrokeOptions(),
                       const DrawOptions& aOptions = DrawOptions()) override;
   virtual void Fill(const Path* aPath, const Pattern& aPattern,
                     const DrawOptions& aOptions = DrawOptions()) override;
   virtual void FillGlyphs(ScaledFont* aFont, const GlyphBuffer& aBuffer,
                           const Pattern& aPattern,
                           const DrawOptions& aOptions = DrawOptions()) override;
+  virtual void StrokeGlyphs(ScaledFont* aFont, const GlyphBuffer& aBuffer,
+                            const Pattern& aPattern,
+                            const StrokeOptions& aStrokeOptions = StrokeOptions(),
+                            const DrawOptions& aOptions = DrawOptions()) override;
   virtual void Mask(const Pattern& aSource, const Pattern& aMask,
                     const DrawOptions& aOptions = DrawOptions()) override;
   virtual void PushClip(const Path* aPath) override;
   virtual void PushClipRect(const Rect& aRect) override;
   virtual void PopClip() override;
   virtual void PushLayer(bool aOpaque, Float aOpacity, SourceSurface* aMask,
                          const Matrix& aMaskTransform,
                          const IntRect& aBounds = IntRect(),
                          bool aCopyBackground = false) override;
   virtual void PushLayerWithBlend(
       bool aOpaque, Float aOpacity, SourceSurface* aMask,
       const Matrix& aMaskTransform, const IntRect& aBounds = IntRect(),
       bool aCopyBackground = false,
       CompositionOp = CompositionOp::OP_OVER) override;
+  virtual bool Draw3DTransformedSurface(SourceSurface* aSurface,
+                                        const Matrix4x4& aMatrix) override;
   virtual void PopLayer() override;
 
   virtual void SetTransform(const Matrix& aTransform) override;
 
   virtual void SetPermitSubpixelAA(bool aPermitSubpixelAA) override;
 
   virtual already_AddRefed<SourceSurface> CreateSourceSurfaceFromData(
       unsigned char* aData, const IntSize& aSize, int32_t aStride,