[go: nahoru, domu]

Add concat method to paint op buffer with SkM44s

Part of the greater effort to migrate cc and the paint_op_buffer away
from SkMatrix, which is 3x3 and relatively slow, compared to SkM44.

SetMatrix(SkM44) was added. Once concat(SkM44) is added we can make
the PaintCanvas version of these functions that use SkMatrixs just
call these functions and remove the SkMatrix versions within the
paint op buffer.

Bug: 1155544
Change-Id: Id0a866cba2ea8eb44822d9632bd890980ab707c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577704
Reviewed-by: Caleb Raitto <caraitto@chromium.org>
Reviewed-by: Aaron Krajeski <aaronhk@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Commit-Queue: Aaron Krajeski <aaronhk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837269}
diff --git a/cc/paint/paint_canvas.h b/cc/paint/paint_canvas.h
index 4bcee9f..d2afbad5 100644
--- a/cc/paint/paint_canvas.h
+++ b/cc/paint/paint_canvas.h
@@ -77,10 +77,10 @@
   virtual void scale(SkScalar sx, SkScalar sy) = 0;
   virtual void rotate(SkScalar degrees) = 0;
   // TODO(aaronhk): crbug.com/1153330 deprecate these in favor of the SkM44
-  // versions. Also add concat with a SkM44 argument
+  // versions.
   virtual void concat(const SkMatrix& matrix) = 0;
   virtual void setMatrix(const SkMatrix& matrix) = 0;
-
+  virtual void concat(const SkM44& matrix) = 0;
   virtual void setMatrix(const SkM44& matrix) = 0;
 
   virtual void clipRect(const SkRect& rect,