It appears that CTFontCreateCopyWithAttributes and
CTFontCreateCopyWithSymbolicTraits share similar issues with the default
font on OSX10.10. CTFontCreateWithFontDescriptor cannot be used as
it will not work with webfonts. Since this is all low-level use, create the
CTFonts from the underlying CGFonts directly.
BUG=chromium:524646
Committed: https://skia.googlesource.com/skia/+/d3296717b9d0930237be3502b82ab94d0b4d177f
Review URL: https://codereview.chromium.org/1344213004
This CL removes the uses of SkNEW that have resprouted since commit
385fe4d, and removes the macros entirely now that Android and Chromium
have been cleaned up to no longer depend on them.
A bunch of files implicitly depend on #include <new> from SkPostConfig.h
still though, so keep that for now. To be fixed in a followup CL.
[mtklein mucking around]
Only public API removed.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1360653004
Reason for revert:
Who wants to land forever?
Original issue's description:
> update memset16/32 inlining heuristics
>
> I spent some time looking at perf.skia.org and it looks like we can do better.
>
> It is weird, weird, weird that on x86, we see three completely different behaviors:
> - x86 Android: inlining better for small N, custom better for large N;
> - Windows: inlining better for large N, custom better for small N;
> - other x86: inlining generally better
>
> BUG=skia:4316,chromium:516426
>
> (Temporary, plan to revert.)
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/b68fa409fc00ce2f38e2a0fd6f9dc2379b372481TBR=reed@google.com,jcgregorio@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4316,chromium:516426
Review URL: https://codereview.chromium.org/1358793002
I spent some time looking at perf.skia.org and it looks like we can do better.
It is weird, weird, weird that on x86, we see three completely different behaviors:
- x86 Android: inlining better for small N, custom better for large N;
- Windows: inlining better for large N, custom better for small N;
- other x86: inlining generally better
BUG=skia:4316,chromium:516426
(Temporary, plan to revert.)
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1357193002
It appears that CTFontCreateCopyWithAttributes and
CTFontCreateCopyWithSymbolicTraits share similar issues with the default
font on OSX10.10. CTFontCreateWithFontDescriptor cannot be used as
it will not work with webfonts. Since this is all low-level use, create the
CTFonts from the underlying CGFonts directly.
BUG=chromium:524646
Review URL: https://codereview.chromium.org/1344213004
libjpeg-turbo turns on dithering by default. When we
decode to RGBA, it uses Floyd-Steinberg dithering -
consistent with the libjpeg6b gold standard,
When we decode to 565, it uses ordered dithering. Ordered
dithering for 565 is not part of the 6b standard (libjpeg6b
doesn't even support 565) and is causing us a number of
issues:
(1) Ordered dithering + nearest neighbor sampling is
causing checkerboard visual artifacts in some outputs.
(2) The ordered dither function in libjpeg-turbo actually
behaves differently depending on the alignment of the
memory that it decodes into. This means that two image
decodes that should be identical may look different just
because they decode into different memory blocks. This
was causing some diffs on Gold with the scanline_subset
test that were causing me some confusion.
(3) Maybe not the best evidence, but visually I can't tell
a difference with and without dithering (except when
nearest neighbor scaling causes the checkerboard artifact).
(4) Turning off dithering should be a more significant
performance improvement than you might expect.
libjpeg-turbo has SIMD color conversions to 565, but when
dithering is on, it defaults to scalar code.
This CL should make every jpeg decode to 565 on Gold look
slightly different. Yay!
BUG=skia:
Review URL: https://codereview.chromium.org/1349563007
Right now we have a bug in Gold where some images are labeled
_0.167 and others are labeled _0.166. They are all 1/6
scales and should be labeled the same way and compared.
The fix involves changing 0.166 to 0.167 in the list of
scales that we test on, but SkScaledCodec does not scale
to 0.167 as I expected.
SkScaledCodec converts 0.167 to sampleSize = 5.999 and then
casts to sampleSize = 5. I would argue that we should do
a true round, so 0.167 represents a sampleSize of 6.
In general, this CL change onGetScaledDimensions so that
we now round desiredScale to the nearest sampleSize.
BUG=skia:
Review URL: https://codereview.chromium.org/1356923002
Reason for revert:
Failing ImageNewShaderTest on both Android (Tegra3 GPU) and iOS bots.
e.g.
/Users/chrome-bot/buildbot/skiabot-ipad4-000/build/slave/workdir/build/skia/tests/
ImageNewShaderTest.cpp:24 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.getSize())
ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y)
ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y)
...
Original issue's description:
> add ImageShader, sharing code with its Bitmap cousin
>
> This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.
>
> It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0b93e3149d2cb30860c51f9f3204ae811d9a97caTBR=fmalita@chromium.org,bsalomon@google.com,robertphillips@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1355863002
This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers.
It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now.
BUG=skia:
Review URL: https://codereview.chromium.org/1342113002