Document SkMatrix default constructs to identity
SkMatrix has a constexpr default constructor which initializes to identity. This allows it to be both efficient and always initialized. However, the pre-C++11 documentation stating that SkMatrix starts off uninitialized still exists. Update the documentation. Change-Id: I4f81209ea82f0cef04ca9369ccfdf8e9f448ff71 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432257 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
9304aa5325
commit
c9f475784f
@ -34,10 +34,8 @@ enum class SkApplyPerspectiveClip {
|
||||
SkPoint and vectors with translation, scaling, skewing, rotation, and
|
||||
perspective.
|
||||
|
||||
SkMatrix elements are in row major order. SkMatrix does not have a constructor,
|
||||
so it must be explicitly initialized. setIdentity() initializes SkMatrix
|
||||
so it has no effect. setTranslate(), setScale(), setSkew(), setRotate(), set9 and setAll()
|
||||
initializes all SkMatrix elements with the corresponding mapping.
|
||||
SkMatrix elements are in row major order.
|
||||
SkMatrix constexpr default constructs to identity.
|
||||
|
||||
SkMatrix includes a hidden variable that classifies the type of matrix to
|
||||
improve performance. SkMatrix is not thread safe unless getType() is called first.
|
||||
|
Loading…
Reference in New Issue
Block a user