On 2012/12/05 14:29:01, reed1 wrote: > This CL is just for show, to get a ...
12 years, 6 months ago
(2012-12-05 14:32:08 UTC)
#2
On 2012/12/05 14:29:01, reed1 wrote:
> This CL is just for show, to get a feel for this style of
> constructor-specialization and ways to name it.
I like the idea... would you get rid of the existing default constructor?
Whatever we do I think we should keep SkMatrix and SkMatrix44 in sync. It would
kinda irk me to type kUninitializedConstructor every time I want a matrix,
though.
I agree on both counts. I like the empty/default constructor to be uninitialized. I think ...
12 years, 6 months ago
(2012-12-05 14:36:29 UTC)
#3
I agree on both counts. I like the empty/default constructor to be
uninitialized.
I think we might keep it hidden initially, to explicitly catch all of our
current callers in chrome, which are today relying on it calling setIdent. After
that phase, I would like to re-introduce the empty guy.
Given all that, I bet we could start to use this pattern in SkMatrix now: to add
helper constructors w/ enums as we see the value at call-sites. (in a separate
cl)
I'm against re-introducing the default constructor. I don't feel it adds any expressive power or ...
12 years, 6 months ago
(2012-12-05 18:41:18 UTC)
#4
I'm against re-introducing the default constructor. I don't feel it adds any
expressive power or efficiency to how we use the matrix class. But on the other
hand it does risk additional obscurity and error-proneness.
For chrome in particular, many of us have it baked in our minds that default
constructor will initialize to identity. In general I would expect that its
very common for people to assume a class is correctly initialized and ready to
use after its default constructor...
Issue 6882043: add enums to distinguish different constructors for matrix44
Created 12 years, 6 months ago by reed1
Modified 12 years, 6 months ago
Reviewers: bsalomon, shawnsingh
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 0