aboutsummaryrefslogtreecommitdiff
path: root/bench/nanobench.cpp
diff options
context:
space:
mode:
authorMike Klein <mtklein@google.com>2018-10-04 09:06:00 -0400
committerMike Klein <mtklein@google.com>2018-10-04 14:01:11 +0000
commit4429a4f82cfeb2e63593b81ff373f6f1a5702b7c (patch)
tree1e29b573d31f8b05f14965de30c2377726a5c915 /bench/nanobench.cpp
parentae5e86413418bbbffef006e160c31dcf887c4ff0 (diff)
downloadskqp-4429a4f82cfeb2e63593b81ff373f6f1a5702b7c.tar.gz
re-precate SkMatrix44::SkMatrix44()
It's been driving me nuts that I can't just write `SkMatrix44 m;`, and I often don't care whether it's initialized or not. The default identity constructor would be nice to use, but it's deprecated. By tagging this constructor deprecated, we're only hurting ourselves; our big clients disable warnings about deprecated routines and use it freely. A quick tally in Skia shows we mostly use the uninitialized constructor, but sometimes the identity constructor, and there is a spread of all three in Chromium. So I've left the two explicit calls available. I switched a bunch of calls in Skia to use the less verbose constructor where it was clear that it didn't matter if the matrix was initialized. Literally zero of the kUninitialized constructor calls looked important for performance, so the only place I've kept is its lone unit test. A few places read clearer with an explicit "identity" to read. Change-Id: I0573cb6201f5a36f3b43070fb111f7d9af92736f Reviewed-on: https://skia-review.googlesource.com/c/159480 Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'bench/nanobench.cpp')
-rw-r--r--bench/nanobench.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 513e99c593..ee9f9c0dbe 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -478,7 +478,7 @@ static void create_config(const SkCommandLineConfig* config, SkTArray<Config>* c
CPU_CONFIG(565, kRaster_Backend, kRGB_565_SkColorType, kOpaque_SkAlphaType, nullptr)
// 'narrow' has a gamut narrower than sRGB, and different transfer function.
- SkMatrix44 narrow_gamut(SkMatrix44::kUninitialized_Constructor);
+ SkMatrix44 narrow_gamut;
narrow_gamut.set3x3RowMajorf(gNarrow_toXYZD50);
auto narrow = SkColorSpace::MakeRGB(k2Dot2Curve_SkGammaNamed, narrow_gamut),