commit | 5e542c8e2d79e45ce058ae9d2d5539bf2a7ea547 | [log] [tgz] |
---|---|---|
author | Aaron Krajeski <aaronhk@chromium.org> | Sat Dec 05 01:50:21 2020 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Sat Dec 05 01:50:21 2020 |
tree | 604fd924519eac9a57b6a8f0a713a1e641120a48 | |
parent | 45caaa3a81da159008f769a289109e1c6789b052 [diff] [blame] |
Add setMatrix with SkM44 as an argument This is step one of a multistep process to move the paint_op_buffer from SkMatrix->SkM44. The steps are 1. Add setMatrix(SkM44) <- this step 2. Add concat(SkM44) 2a. Add helper functions to SkM44 to allow it to do stuff like this: https://source.chromium.org/chromium/chromium/src/+/master:cc/paint/display_item_list.cc;l=412?q=display_item_list&sq=package:chromium&ct=os 3. Change setMatrix(SkMatrix) to use the SkM44 function 4. Change concat(SkMatrix) to use the SkM44 function 5. Remove the early-outs for checking identity in the ::Serialize functions and see if they have perf impact. SkCanvas now supports this https://skia-review.googlesource.com/c/skia/+/338596 It's necessary for perspective transforms https://bugs.chromium.org/p/chromium/issues/detail?id=1140535 It needs to be serializable due to the record paint canvas. Bug: 1153330, 1140535, 1155544 Change-Id: I0920b848386e003b6a18e9332a4f400484b68349 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562783 Reviewed-by: Joe Mason <joenotcharles@chromium.org> Reviewed-by: Khushal <khushalsagar@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Juanmi Huertas <juanmihd@chromium.org> Commit-Queue: Aaron Krajeski <aaronhk@chromium.org> Cr-Commit-Position: refs/heads/master@{#833962}
diff --git a/cc/paint/paint_canvas.h b/cc/paint/paint_canvas.h index 2b9c34a..4bcee9f 100644 --- a/cc/paint/paint_canvas.h +++ b/cc/paint/paint_canvas.h
@@ -76,9 +76,13 @@ virtual void translate(SkScalar dx, SkScalar dy) = 0; 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 virtual void concat(const SkMatrix& matrix) = 0; virtual void setMatrix(const SkMatrix& matrix) = 0; + virtual void setMatrix(const SkM44& matrix) = 0; + virtual void clipRect(const SkRect& rect, SkClipOp op, bool do_anti_alias) = 0;