|
|
DescriptionAdd isScale() helper function to SkMatrix44.
This will be used later in Chromium to cleanup gfx::Transform::IsScale2d().
BUG=408710, skia:997
TEST=None
R=bsalomon@google.com,danakj@chromium.org
Committed: https://skia.googlesource.com/skia/+/20b7960798320e6804ffee78fd92e6c001eba30b
Patch Set 1 #Patch Set 2 : isScale() #Messages
Total messages: 19 (6 generated)
tomhudson@google.com changed reviewers: + tomhudson@google.com
The CQ bit was checked by tomhudson@google.com
lgtm
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/676583002/1
The CQ bit was unchecked by commit-bot@chromium.org
Presubmit check for 676583002-1 failed and returned exit status 1. Running presubmit commit checks ... ** Presubmit ERRORS ** Since the CL is editing public API, you must have an LGTM from one of: ('reed@chromium.org', 'reed@google.com', 'bsalomon@chromium.org', 'bsalomon@google.com', 'djsollen@chromium.org', 'djsollen@google.com')
tomhudson@google.com changed reviewers: + reed@google.com - bsalomon@google.com, tomhudson@google.com
Ah, public API - technically I think Brian handles the Ganesh API, but anything in the core Skia API goes through Mike?
bsalomon@google.com changed reviewers: + bsalomon@google.com
lgtm, but wondering whether we really need this if there are no callers.
not lgtm for the moment. In general, there are a semi-unbounded number of possible helper methods that could be added here. At some point I suggest callers create their own helper functions for things like this. e.g. inline bool isScale(const SkMatrix44& mat) { return !(mat.getType() & ~SkMatrix44::kScale_Mask); } That said, we can add this, but I find the name a little confusing. Why 2D in the name. Why not isScale?
On 2014/10/23 14:30:33, reed1 wrote: > not lgtm for the moment. > > In general, there are a semi-unbounded number of possible helper methods that > could be added here. At some point I suggest callers create their own helper > functions for things like this. > > e.g. > > inline bool isScale(const SkMatrix44& mat) { > return !(mat.getType() & ~SkMatrix44::kScale_Mask); > } > > That said, we can add this, but I find the name a little confusing. Why 2D in > the name. Why not isScale? Mike, which changes do I need to do, to get this accepted by you? Do I have to move isScale2d() from SkMatrix44 to a helper file? If yes, which one (where)? Do I need to rename it isScale or is it fine to keep it as isScale2d() (from your question, I guess it is not and it should be renamed). Please, let me know your preference for one or another. Regards,
On 2014/10/23 18:21:32, tfarina wrote: > On 2014/10/23 14:30:33, reed1 wrote: > > not lgtm for the moment. > > > > In general, there are a semi-unbounded number of possible helper methods that > > could be added here. At some point I suggest callers create their own helper > > functions for things like this. > > > > e.g. > > > > inline bool isScale(const SkMatrix44& mat) { > > return !(mat.getType() & ~SkMatrix44::kScale_Mask); > > } > > > > That said, we can add this, but I find the name a little confusing. Why 2D in > > the name. Why not isScale? > > Mike, which changes do I need to do, to get this accepted by you? Do I have to > move isScale2d() from SkMatrix44 to a helper file? If yes, which one (where)? Do > I need to rename it isScale or is it fine to keep it as isScale2d() (from your > question, I guess it is not and it should be renamed). Please, let me know your > preference for one or another. > > Regards, Just renaming to isScale() would be sufficient for me.
On 2014/10/23 18:58:37, reed1 wrote: > Just renaming to isScale() would be sufficient for me. Renamed. PTAL!
lgtm -- please add a unittest for this either now, or in a subsequent CL. Doesn't need to be too tricky, but something to help nail down the boundary of this predicate.
The CQ bit was checked by tfarina@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/676583002/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as 20b7960798320e6804ffee78fd92e6c001eba30b |