msarett [Wed, 8 Jun 2016 17:02:32 +0000 (10:02 -0700)]
Modify QCMS test to match use by Chrome
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2049813002
Review-Url: https://codereview.chromium.org/
2049813002
csmartdalton [Wed, 8 Jun 2016 16:32:54 +0000 (09:32 -0700)]
Fix instances where hwaa was wrong for mixed samples
Fixes a bug with coverage-AA hairlines where hwaa was unintentionally
enabled for mixed samples, and a bug with path stenciling where hwaa
was unintentionally disabled for mixed samples.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2043203004
Review-Url: https://codereview.chromium.org/
2043203004
martina.kollarova [Wed, 8 Jun 2016 16:25:24 +0000 (09:25 -0700)]
Document dm error about missing skps
BUG=None
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2049703002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=
2049703002
Review-Url: https://codereview.chromium.org/
2049703002
herb [Wed, 8 Jun 2016 15:57:24 +0000 (08:57 -0700)]
Handle single pixel case on tiled.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2041813004
Review-Url: https://codereview.chromium.org/
2041813004
egdaniel [Wed, 8 Jun 2016 15:22:05 +0000 (08:22 -0700)]
Subclass GrVkCommandBuffer into Primary and Secondary CommandBuffers.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2019723002
Review-Url: https://codereview.chromium.org/
2019723002
egdaniel [Wed, 8 Jun 2016 13:48:09 +0000 (06:48 -0700)]
Add support for finding/creating general GrVkRenderPass from the VkResourceProvider.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2035853002
Review-Url: https://codereview.chromium.org/
2035853002
caryclark [Wed, 8 Jun 2016 11:28:19 +0000 (04:28 -0700)]
fix pathops fuzz bugs
Fail out in a couple of new places when the input data is very
large and exceeds the limits of the pathops machinery.
Most of the change here plumbs in a way to exclude an assert in
one of these exceptional cases. The current SkAddIntersection
implementation and the inner functions it calls has no way to
report an error to the root caller for an early exit, so rather
than add that in, exclude the assert when the test that would
trigger it runs (allowing the test to otherwise ensure that it
properly fails).
TBR=reed@google.com
BUG=617586,617635
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2046713003
Review-Url: https://codereview.chromium.org/
2046713003
lsalzman [Wed, 8 Jun 2016 02:08:57 +0000 (19:08 -0700)]
A Mozilla developer ran the µmix static analyzer on its codebase and incidentally found some issues regarding null checks in Skia. This fixes the issues that were found.
Downstream bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1278452
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2046563007
Review-Url: https://codereview.chromium.org/
2046563007
halcanary [Wed, 8 Jun 2016 00:21:10 +0000 (17:21 -0700)]
SkLeanWindows.h: #include "Windows.h" fewer places
$ git grep -l '<windows.h>' include src
include/private/SkLeanWindows.h
$ git grep -l SkLeanWindows.h | grep '\.h$'
include/ports/SkTypeface_win.h
include/utils/win/SkHRESULT.h
include/utils/win/SkTScopedComPtr.h
include/views/SkEvent.h
src/core/SkMathPriv.h
src/ports/SkTypeface_win_dw.h
src/utils/SkThreadUtils_win.h
src/utils/win/SkWGL.h
The same for `#include <intrin.h>` that was found in SkMath.h.
Those functions that needed it are moved to SkMathPriv.h.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2041943002
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng
Review-Url: https://codereview.chromium.org/
2041943002
mtklein [Tue, 7 Jun 2016 23:46:39 +0000 (16:46 -0700)]
Revert of Move immintrin/arm_neon includes to where they are used. (patchset #2 id:20001 of https://codereview.chromium.org/
2045633002/ )
Reason for revert:
Appears to have broken the ARMv7 aspect of the Google3 roll in bizarre seemingly-unrelated ways.
Original issue's description:
> Move immintrin/arm_neon includes to where they are used.
>
> On my Mac (so, immintrin), this improves compile time, both wall and cpu,
> by about 16%. To test I ran this on an SSD with files hot in their caches:
>
> $ env CC=/usr/bin/clang CXX=/usr/bin/clang++ ./gyp_skia && \
> ninja -C out/Release -t clean && \
> time ninja -C out/Release
>
> Before: 159 wall / 3367 cpu
> 159 wall / 3368 cpu
>
> After: 137 wall / 2860 cpu
> 136 wall / 2863 cpu
>
> I also tried further refining immintrin down to emmintrin / tmmintrin / smmintrin etc.
> That made no signficant difference, so I've kept immintrin for its simplicity.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2045633002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> TBR=reed@google.com
> No public API changes.
>
> Committed: https://skia.googlesource.com/skia/+/
12dfaaa53c23f3d03050bde8f64136ac1f44164a
TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/
2046213002
csmartdalton [Tue, 7 Jun 2016 21:27:51 +0000 (14:27 -0700)]
Fix dashing bug where hwaa was unintentionally disabled
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2046483003
Review-Url: https://codereview.chromium.org/
2046483003
brianosman [Tue, 7 Jun 2016 21:22:44 +0000 (14:22 -0700)]
Switch to a whitelist for manual mip-map generation
Due to performance regression on various GPUs, we're only going to use the
new draw-call based mip-mapper when necessary. Of the bots where we have
test coverage, that means Intel and Mac-NVIDIA. We also had failures on
our AMD 7770 bots - I'm upgrading the drivers on those two machines, and
I'm leaving them out of the whitelist for now.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2042313002
Review-Url: https://codereview.chromium.org/
2042313002
liyuqian [Tue, 7 Jun 2016 21:22:37 +0000 (14:22 -0700)]
Implement Raster Backend on Android Viewer App
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2041193004
Review-Url: https://codereview.chromium.org/
2041193004
senorblanco [Tue, 7 Jun 2016 19:36:00 +0000 (12:36 -0700)]
Fix for rare crash in Poly::addEdge().
Don't add an edge if the bottom vertex was already added, or
if an island vertex has a left poly but no right poly.
(Sorry for the lack of test, but the only reduction I could create was still a huge path and only crashes in Chrome.)
BUG=617907
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2043873005
Review-Url: https://codereview.chromium.org/
2043873005
bsalomon [Tue, 7 Jun 2016 19:20:15 +0000 (12:20 -0700)]
Make GrShape use the original path when path effect fails.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2044793002
Review-Url: https://codereview.chromium.org/
2044793002
mtklein [Tue, 7 Jun 2016 19:12:37 +0000 (12:12 -0700)]
linear -> sRGB: use fast approximate sqrt()
Since we're already approximating the sRGB gamma curve with a sqrt(), we might
as well approximate with it a faster approximate sqrt(). On Intel, this
.rsqrt().invert() version is 2-3x faster than .sqrt() (~3x faster on older
machines, ~2x faster on newer machines).
This should provide ~11 bits of precision, suspiciously exactly enough.
Running dm --config srgb, there are diffs, but none perceptible.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2046063002
Review-Url: https://codereview.chromium.org/
2046063002
mtklein [Tue, 7 Jun 2016 16:35:27 +0000 (09:35 -0700)]
Move immintrin/arm_neon includes to where they are used.
On my Mac (so, immintrin), this improves compile time, both wall and cpu,
by about 16%. To test I ran this on an SSD with files hot in their caches:
$ env CC=/usr/bin/clang CXX=/usr/bin/clang++ ./gyp_skia && \
ninja -C out/Release -t clean && \
time ninja -C out/Release
Before: 159 wall / 3367 cpu
159 wall / 3368 cpu
After: 137 wall / 2860 cpu
136 wall / 2863 cpu
I also tried further refining immintrin down to emmintrin / tmmintrin / smmintrin etc.
That made no signficant difference, so I've kept immintrin for its simplicity.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2045633002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
TBR=reed@google.com
No public API changes.
Review-Url: https://codereview.chromium.org/
2045633002
egdaniel [Tue, 7 Jun 2016 15:43:30 +0000 (08:43 -0700)]
Refactor creation of GrVkRenderPasses to make them move general
This change is a refactorization to open up more flexable use for render passes
in the future. Once we start bundling draw calls into a single render pass we
will need to start using specific load and store ops instead of the default
currently of load and store everything.
We still will need to simply get a compatible render pass for creation of framebuffers
and pipeline objects. These render passes don't need to know load and store ops. Thus
in this change, I'm defaulting the "compatible" render pass to always be the one
which both loads and stores. All other load/store combinations will be created lazily
when requested for a specific draw (future change).
The CompatibleRPHandle is a way for us to avoid analysing the RenderTarget every time
we want to get a new GrVkRenderPass.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1977403002
Review-Url: https://codereview.chromium.org/
1977403002
bsalomon [Tue, 7 Jun 2016 15:10:46 +0000 (08:10 -0700)]
Make GrDashEffect take a AA mode enum.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2042923003
Review-Url: https://codereview.chromium.org/
2042923003
liyuqian [Tue, 7 Jun 2016 13:57:40 +0000 (06:57 -0700)]
Show FPS in UI state
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2043793002
Review-Url: https://codereview.chromium.org/
2043793002
bsalomon [Tue, 7 Jun 2016 13:28:51 +0000 (06:28 -0700)]
Get segment masks from GrShape.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2046753002
Review-Url: https://codereview.chromium.org/
2046753002
bsalomon [Mon, 6 Jun 2016 21:01:25 +0000 (14:01 -0700)]
Make GrShape track the winding direction and starting point for rrect types.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2042813002
Review-Url: https://codereview.chromium.org/
2042813002
brianosman [Mon, 6 Jun 2016 20:10:58 +0000 (13:10 -0700)]
Add new SkSourceGammaTreatment enum, used in situations like mipmap construction, where we need to know if we should respect (vs. ignore) the gamma encoding of sRGB tagged images. Plumb that extensively.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2037413002
Review-Url: https://codereview.chromium.org/
2037413002
msarett [Mon, 6 Jun 2016 19:02:31 +0000 (12:02 -0700)]
Add SkDefaultXform as a catch-all to handle color conversions
I'd like to start optimizing the common case for color xforms,
but before doing that, I think it makes sense to have correct
code to support all xforms.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2038823002
Review-Url: https://codereview.chromium.org/
2038823002
scroggo [Mon, 6 Jun 2016 18:48:05 +0000 (11:48 -0700)]
Use Options object passed to startScanlineDecode
This->options() has not been updated to include the latest settings.
Originally brought up in crrev.com/
1997703003, which has been reverted.
This is not really related to that change anyway, so separating it out.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2046493004
Review-Url: https://codereview.chromium.org/
2046493004
scroggo [Mon, 6 Jun 2016 18:26:17 +0000 (11:26 -0700)]
Revert of Make SkPngCodec decode progressively. (patchset #26 id:520001 of https://codereview.chromium.org/
1997703003/ )
Reason for revert:
Still causing problems in Google3, e.g.
https://test.corp.google.com/ui#cl=
124138817&flags=CAMQBQ==&id=OCL:
124138817:BASE:
124139560:
1465227435491:
219ffbdb&t=//third_party/skia/HEAD:dm
Original issue's description:
> Make SkPngCodec decode progressively.
>
> This is a step towards using SkCodec in Chromium, where progressive
> decoding is necessary.
>
> Switch from using png_read_row (which expects all the data to be
> available) to png_process_data, which uses callbacks when rows are
> available.
>
> Create a new API for SkCodec, which supports progressive decoding and
> scanline decoding. Future changes will switch the other clients off of
> startScanlineDecode and get/skip-Scanlines to the new API.
>
> Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
> PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
> updateCurrScanline(), which was only used by the old implementation for
> interlaced PNG.
>
> DMSrcSink:
> - In CodecSrc::kScanline_Mode, use the new method for scanline decoding
> for the supported formats (just PNG and PNG-in-ICO for now).
>
> fuzz.cpp:
> - Remove reference to kNone_ScanlineOrder
>
> SkCodec:
> - Add new APIs:
> - startIncrementalDecode
> - incrementalDecode
> - Remove kNone_SkScanlineOrder and updateCurrScanline()
>
> SkPngCodec:
> - Implement new APIs
> - Switch from sk_read_fn/png_read_row etc to png_process_data
> - Expand AutoCleanPng's role to decode the header and create the
> SkPngCodec
> - Make the interlaced PNG decoder report how many lines were
> initialized during an incomplete decode
> - Make initializeSwizzler return a bool instead of an SkCodec::Result
> (It only returned kSuccess or kInvalidInput anyway)
>
> SkIcoCodec:
> - Implement the new APIs; supported for PNG in ICO
>
> SkSampledCodec:
> - Call the new method for decoding scanlines, and fall back to the old
> method if the new version is unimplemented
> - Remove references to kNone_SkScanlineOrder
>
> tests/CodecPartial:
> - Add a test which decodes part of an image, then finishes the decode,
> and compares it to the straightforward method
>
> tests/CodecTest:
> - Add a test which decodes all scanlines using the new method
> - Repurpose the Codec_stripes test to decode using the new method in
> sections rather than all at once
> - In the method check(), add a parameter for whether the image supports
> the new method of scanline decoding, and be explicit about whether an
> image supports incomplete
> - Test incomplete PNG decodes. We should have been doing it anyway for
> non-interlaced (except for an image that is too small - one row), but
> the new method supports interlaced incomplete as well
> - Make test_invalid_parameters test the new method
> - Add a test to ensure that it's safe to fall back to scanline decoding without
> rewinding
>
> BUG=skia:4211
>
> The new version was generally faster than the old version (but not significantly so).
>
> Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
>
> Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1997703003
>
> Committed: https://skia.googlesource.com/skia/+/
a4b09a117d4d1ba5dda372e6a2323e653766539e
>
> Committed: https://skia.googlesource.com/skia/+/
30e78c9737ff4861dc4e3fa1e4cd010680ed6965
>
> Committed: https://skia.googlesource.com/skia/+/
6fb2391b2cc83ee2160b4e994faa8128975acc1f
TBR=reed@google.com,msarett@google.com,scroggo@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:4211
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2044573002
Review-Url: https://codereview.chromium.org/
2044573002
msarett [Mon, 6 Jun 2016 17:42:51 +0000 (10:42 -0700)]
Gamma sanity checks
(1) Make load_gammas() return false on invalid gammas.
(2) Assert that gamma always exists after loading.
(3) Avoid dividing by zero.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2043803002
Review-Url: https://codereview.chromium.org/
2043803002
scroggo [Mon, 6 Jun 2016 15:57:50 +0000 (08:57 -0700)]
Prefix png functions
This way multiple copies of libpng can coexist.
Update libpng's README.google
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2046603002
Review-Url: https://codereview.chromium.org/
2046603002
jvanverth [Mon, 6 Jun 2016 15:48:47 +0000 (08:48 -0700)]
Use intptr_t for onTouch argument.
On 64-bit platforms, casting int to void* is not valid.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2047443002
Review-Url: https://codereview.chromium.org/
2047443002
scroggo [Mon, 6 Jun 2016 15:27:52 +0000 (08:27 -0700)]
Update pnglibconf.h
It should have been updated when we updated the version.
Update README.google to better reflect the difference from the
original file.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2042833002
Review-Url: https://codereview.chromium.org/
2042833002
msarett [Mon, 6 Jun 2016 15:20:37 +0000 (08:20 -0700)]
Use SK_TEST_QCMS to mark qcms test code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2031053005
Review-Url: https://codereview.chromium.org/
2031053005
liyuqian [Mon, 6 Jun 2016 14:53:24 +0000 (07:53 -0700)]
Allow animation in Android viewer
To do that, we let ALooper_pollAll return immediately rather than wait indefinitely.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2031383002
Review-Url: https://codereview.chromium.org/
2031383002
msarett [Mon, 6 Jun 2016 14:26:39 +0000 (07:26 -0700)]
Name parametric gamma curve types
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2041753004
Review-Url: https://codereview.chromium.org/
2041753004
robertphillips [Mon, 6 Jun 2016 13:16:20 +0000 (06:16 -0700)]
Remove GrRenderTarget from GrPipelineBuilder
This used to be "Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder"
but has been split into:
https://codereview.chromium.org/
1993263002/ (Make GrAppliedClip friendless)
https://codereview.chromium.org/
1997773002/ (Retract GrRenderTarget from GLProgramsTest)
https://codereview.chromium.org/
1993403002/ (GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext))
https://codereview.chromium.org/
2004433002/ (Retract GrRenderTarget from GrTestTarget)
https://codereview.chromium.org/
2015333002/ (Change parameters to GrPipelineBuilder's ctor)
https://codereview.chromium.org/
2035823002/ (Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1988923002
Review-Url: https://codereview.chromium.org/
1988923002
milko.leporis [Sun, 5 Jun 2016 20:14:21 +0000 (13:14 -0700)]
MIPS32r2: Fix Chromium runtime crash
Crash is caused by ldxc1 instruction, which traps when double values are
not aligned on 8-byte boundaries. Problem was tracked to SkChunkAlloc which
produces pointers aligned on 4-byte boundaries leading to misalignment.
This change makes sure that SkChunkAlloc will produce pointers that are
aligned to 8 bytes.
Appropriate tests are added to tests/MemsetTest.cpp
TEST=Build Chromium with Clang and run on MIPS32r2 platform
TEST=./out/Debug/dm --match Memset
BUG=130022
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1849183004
Review-Url: https://codereview.chromium.org/
1849183004
update-skps [Sun, 5 Jun 2016 07:36:10 +0000 (00:36 -0700)]
Update SKP version
Automatic commit by the RecreateSKPs bot.
TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2038313002
Review-Url: https://codereview.chromium.org/
2038313002
herb [Sat, 4 Jun 2016 20:27:10 +0000 (13:27 -0700)]
Add the ability to handle premul and swizzle src bitmap data.
BUG=skia:5378
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2030953002
Review-Url: https://codereview.chromium.org/
2030953002
rmistry [Sat, 4 Jun 2016 18:57:23 +0000 (11:57 -0700)]
Test PDFium bot again
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2037283002
TBR=
NOTRY=true
Review-Url: https://codereview.chromium.org/
2041623002
rmistry [Sat, 4 Jun 2016 17:27:30 +0000 (10:27 -0700)]
Test PDFium bot
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2037283002
TBR=
NOTRY=true
Review-Url: https://codereview.chromium.org/
2037283002
bungeman [Sat, 4 Jun 2016 00:43:24 +0000 (17:43 -0700)]
More Unref GrXPFactory.
Not releasing the reference was caught by the Skia asan bot.
All remaining occurences of this pattern have been updated.
This fixes "Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack".
TBR=herb
Review-Url: https://codereview.chromium.org/
2037243002
robertphillips [Fri, 3 Jun 2016 22:48:16 +0000 (15:48 -0700)]
Add ability to rotate light direction in drawLitAtlas Sample slide
As requested by Greg.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2032263004
Review-Url: https://codereview.chromium.org/
2032263004
bungeman [Fri, 3 Jun 2016 21:35:06 +0000 (14:35 -0700)]
Remove some uses of SK_SUPPORT_LEGACY_TYPEFACE_PTR.
Some of the deprecated signatures are no longer used by any known
client, so remove them now to prevent future use.
TBR=reed
This doesn't add API, it just removes it.
Review-Url: https://codereview.chromium.org/
2036993003
bungeman [Fri, 3 Jun 2016 21:25:05 +0000 (14:25 -0700)]
Unref GrXPFactory.
Not releasing the reference was caught by asan in the Chromium roll.
This fixes "Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack".
Review-Url: https://codereview.chromium.org/
2037193002
cblume [Fri, 3 Jun 2016 18:59:50 +0000 (11:59 -0700)]
SkMipMap::ComputeLevelSize to return SkISize
This previously returned SkSize, which had scalar components.
That doesn't make sense for a mipmap size.
R=bsalomon@google.com
BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2036313002
Review-Url: https://codereview.chromium.org/
2036313002
csmartdalton [Fri, 3 Jun 2016 18:56:51 +0000 (11:56 -0700)]
Don't use complex blend mode for shapes gm
The darken blend mode introduced barriers on most platforms, which
interfered with batching.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2031113003
Review-Url: https://codereview.chromium.org/
2031113003
cblume [Fri, 3 Jun 2016 18:17:42 +0000 (11:17 -0700)]
Plumbing mipmaps to the point of creation.
When creating a DeferredTextureImage we may create mipmaps.
Those mipmaps need to then be passed along for when the texture is
actually created.
R=bsalomon@google.com
BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2031273002
Review-Url: https://codereview.chromium.org/
2031273002
robertphillips [Fri, 3 Jun 2016 17:59:20 +0000 (10:59 -0700)]
Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack
This will be followed up with a CL to remove the GrRenderTarget from the GrPipelineBuilder.
Split out of:
https://codereview.chromium.org/
1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2035823002
Review-Url: https://codereview.chromium.org/
2035823002
robertphillips [Fri, 3 Jun 2016 17:12:08 +0000 (10:12 -0700)]
Add SampleApp slide with animating lightmapped objects & transparency
This is pulled out of the drawLitAtlas CL (may it someday land). It does nicely demonstrate animating normal mapped objects and normal maps combined with partially transparent diffuse textures.
It is a crude Asteroids game.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2026393005
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/
2026393005
herb [Fri, 3 Jun 2016 16:44:53 +0000 (09:44 -0700)]
Add gm for displaying different variants of 8888 bitmaps and fix a small rejection case for sprite blitters.
BUG=skia:5378
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2036493004
Review-Url: https://codereview.chromium.org/
2036493004
caryclark [Fri, 3 Jun 2016 16:42:53 +0000 (09:42 -0700)]
fix windows assert
Windows asserts trigger out of memory stack traces that
are confusing. This permits windows to break more
directly, stopping the IDE at the assert and providing
a less confusing stacktrace outside of the IDE.
R=reed@google.com,herb@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2039443002
Review-Url: https://codereview.chromium.org/
2039443002
scroggo [Fri, 3 Jun 2016 16:36:53 +0000 (09:36 -0700)]
Fix undefined behavior in libpng
Check for a null source before calling memcpy.
BUG=skia:5390
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2040433002
Review-Url: https://codereview.chromium.org/
2040433002
halcanary [Fri, 3 Jun 2016 15:57:03 +0000 (08:57 -0700)]
SkPDF: handle unpremul right
.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2037083002
Review-Url: https://codereview.chromium.org/
2037083002
csmartdalton [Fri, 3 Jun 2016 15:50:54 +0000 (08:50 -0700)]
Abandon offset support with texel buffers
We don't seem to require nonzero offsets for texel buffers at this
point in time, and requiring this feature greatly reduces the number
of desktop clients that can use texel buffers. If we find a use for
offsets later we can always add it back as a separate feature.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2036953002
Review-Url: https://codereview.chromium.org/
2036953002
liyuqian [Fri, 3 Jun 2016 15:47:23 +0000 (08:47 -0700)]
Add Softkey UIState to Viewer
We can use this to simulate any key/command on Android UI.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2035923002
Review-Url: https://codereview.chromium.org/
2035923002
csmartdalton [Fri, 3 Jun 2016 15:28:47 +0000 (08:28 -0700)]
Support ARB extensions for indirect drawing
Adds support for the ARB extensions and fixes incorrect logic that was
being used on the GL version for indirect drawing.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2038743002
Review-Url: https://codereview.chromium.org/
2038743002
msarett [Fri, 3 Jun 2016 15:25:21 +0000 (08:25 -0700)]
Add color correction benchmark - with comparison to qcms
--colorImages is empty by default so this won't affect the runtime of
the bots. To run locally, use --colorImages <path> and
--benchType skcolorcodec.
Two takeaways so far:
Color correction is (currently) slower than jpeg decodes.
Our reference solution is slower than qcms.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2035793002
Review-Url: https://codereview.chromium.org/
2035793002
msarett [Fri, 3 Jun 2016 15:23:40 +0000 (08:23 -0700)]
Fix uses of SkImageInfo in BRD to preserve color space info
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2035483005
Review-Url: https://codereview.chromium.org/
2035483005
jcgregorio [Fri, 3 Jun 2016 14:26:22 +0000 (07:26 -0700)]
skiaserve: Add a flag to control hosted mode, i.e. when running on debugger.skia.org.
BUG=skia:
TBR=ethannicholas@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2036173002
Review-Url: https://codereview.chromium.org/
2036173002
borenet [Fri, 3 Jun 2016 14:01:32 +0000 (07:01 -0700)]
Add Android device type for NVIDIA Shield
BUG=skia:5185
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2036183003
Review-Url: https://codereview.chromium.org/
2036183003
scroggo [Thu, 2 Jun 2016 21:16:43 +0000 (14:16 -0700)]
Make SkPngCodec decode progressively.
This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.
Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.
Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.
Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.
DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).
fuzz.cpp:
- Remove reference to kNone_ScanlineOrder
SkCodec:
- Add new APIs:
- startIncrementalDecode
- incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()
SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
SkPngCodec
- Make the interlaced PNG decoder report how many lines were
initialized during an incomplete decode
- Make initializeSwizzler return a bool instead of an SkCodec::Result
(It only returned kSuccess or kInvalidInput anyway)
SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO
SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder
tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
and compares it to the straightforward method
tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
sections rather than all at once
- In the method check(), add a parameter for whether the image supports
the new method of scanline decoding, and be explicit about whether an
image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
non-interlaced (except for an image that is too small - one row), but
the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
rewinding
BUG=skia:4211
The new version was generally faster than the old version (but not significantly so).
Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1997703003
Committed: https://skia.googlesource.com/skia/+/
a4b09a117d4d1ba5dda372e6a2323e653766539e
Committed: https://skia.googlesource.com/skia/+/
30e78c9737ff4861dc4e3fa1e4cd010680ed6965
Review-Url: https://codereview.chromium.org/
1997703003
scroggo [Thu, 2 Jun 2016 19:59:59 +0000 (12:59 -0700)]
Check libpng directly into third_party/
With this change, the CMake build, which does not use DEPS to sync
external projects, is able to build and use the same version of libpng
that is used in other builds.
This will allow all platforms (including Google3 CMake build) to test on
the same version of libpng, so we do not need to make SkPngCodec support
all versions of libpng.
- Update CMakeLists.txt to use the checked in libpng.
- Check in libpng version 1.6.22rc01
- Update README.google
- Replace our old LICENSE file with the latest one from libpng
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2033063003
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review-Url: https://codereview.chromium.org/
2033063003
halcanary [Thu, 2 Jun 2016 19:41:14 +0000 (12:41 -0700)]
SkMultiPictureDocument & SkMultiPictureDocumentReader
also, a new DM::Src.
motivation: To be used to test the printing pipeline in Chromium.
BUG=skia:5370
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2023593002
Review-Url: https://codereview.chromium.org/
2023593002
reed [Thu, 2 Jun 2016 19:40:22 +0000 (12:40 -0700)]
add MakeS32 helper to SkImageInfo, fix named-gamma constructor bug
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2035813003
Review-Url: https://codereview.chromium.org/
2035813003
liyuqian [Thu, 2 Jun 2016 19:16:25 +0000 (12:16 -0700)]
Implement OpenGL backend in Android viewer app
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2032623002
Review-Url: https://codereview.chromium.org/
2032623002
brianosman [Thu, 2 Jun 2016 18:44:06 +0000 (11:44 -0700)]
Fix argument parsing in android app launcher script
Makes the argument match the error message that gets printed (and users'
expectations).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2030123002
Review-Url: https://codereview.chromium.org/
2030123002
senorblanco [Thu, 2 Jun 2016 18:36:48 +0000 (11:36 -0700)]
Tessellator: stop copying vertices into Polys and Monotones.
The vertices which are produced by stage 5 of the
tesselator are copied into the Polys and MonotonePolys it
produces. This is necessary because each vertex may have an
arbitrary valence, since it may participate in an arbitrary
number of Polys, so we can't use the vertex's prev/next
pointers to represent all the Monotones of which this
vertex may be a member.
However, each Edge can only be a member of two Polys (one
on each side of the edge). So by adding two prev/next
pointer pairs to each Edge, we can represent each Monotone
as a list of edges instead. Then we no longer need to copy
the vertices.
One wrinkle is that the ear-clipping stage (6) of the
tessellator does require prev/next pointers, in order to
remove vertices as their ears are clipped. So we convert
the edge list into a vertex list during Monotone::emit(),
using the prev/next pointers temporarily for that monotone.
This change improves performance by 7-20% on a non-caching
version of the tessellator, and reduces memory use.
Other notes:
1) Polys are initially constructed empty (no edges), but
with the top vertex, which is needed for splitting
Polys. Edges are added to Polys only after their bottom
vertex is seen.
2) MonotonePolys are always constructed with one edge, so
we always know their handedness (left/right).
MonotonePoly::addEdge() no longer detects when a monotone
is "done" (edge of opposite handedness); this is handled
by Poly::addEdge(), so MonotonePoly::addEdge() has no
return value.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2029243002
Review-Url: https://codereview.chromium.org/
2029243002
robertphillips [Thu, 2 Jun 2016 17:57:59 +0000 (10:57 -0700)]
Adjust tolerance for when Ganesh stroked-line-as-rect optimization kicks in
Some GPUs results look worse for the < 1.0f tolerance (i.e., iPad)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2035843002
Review-Url: https://codereview.chromium.org/
2035843002
bungeman [Thu, 2 Jun 2016 17:47:19 +0000 (10:47 -0700)]
Remove SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME.
The define SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME is no longer used
by any clients and the code it guards can now be removed as well.
TBR=reed
This just removes dead code.
Review-Url: https://codereview.chromium.org/
2030983002
brianosman [Thu, 2 Jun 2016 17:19:10 +0000 (10:19 -0700)]
Exclude Mali devices from manual mip-mapping.
With manual mip-mapping, the Nexus 10 is failing the sRGB mip-map test. That suggests a failure in the sRGB implementation (decode after bilerp, possibly?). Using the driver's mip-mapper resolves the unit test issue, at least.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2036763002
Review-Url: https://codereview.chromium.org/
2036763002
cblume [Thu, 2 Jun 2016 16:01:48 +0000 (09:01 -0700)]
Add getting the size of a given mipmap level.
When allocating memory for mipmaps, it would be very handy to know the
dimensions of a given mipmap level.
R=bsalomon@google.com
BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2018283002
Review-Url: https://codereview.chromium.org/
2018283002
brianosman [Thu, 2 Jun 2016 15:59:34 +0000 (08:59 -0700)]
Add a caps bit to enable/disable the new manual mip-mapper
Turn it off on Adreno3xx devices, because the small-render-target bug on
those devices leads to empty mipmaps for the smallest mips.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2026393004
Review-Url: https://codereview.chromium.org/
2026393004
brianosman [Thu, 2 Jun 2016 13:50:40 +0000 (06:50 -0700)]
Fix incorrect parameter in new benchmark.
An old value for one of the dimensions slipped in with the original CL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2033713003
Review-Url: https://codereview.chromium.org/
2033713003
brianosman [Thu, 2 Jun 2016 12:49:21 +0000 (05:49 -0700)]
Manually generated sRGB mipmaps, with successively smaller draws.
Dirty GL-generated mipmaps whenever an sRGB texture is used with a new
value for TEXTURE_SRGB_DECODE. Add a new test rectangle to the gamma GM
that tests that textures are correctly converted to linear before
filtering when generating mipmaps.
Added a new unit test that alternates how a texture is interpreted (sRGB
or not), to verify that we rebuild mipmaps when needed, and that we get
the correct results out in both modes.
This test originally failed on four of our bots producing incorrect mips
in three different ways. I'm not real surprised, but it looks like
we can't rely on glGenerateMipmap to do the right thing, in conjunction
with TEXTURE_SRGB_DECODE.
Instead, actually create mip-chains using a series of draw calls.
(My first attempt used glBlitFramebuffer, and that still had bugs on
several bots). This approach appears to work correctly on any device
that fully supports sRGB.
Because the mipmap draws are fairly destructive to state, I had to
hoist them out of bindTexture. That means adding a second pass over
the texture accesses in the processor, at the very beginning of flush.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1840473002
Review-Url: https://codereview.chromium.org/
2007973002
robertphillips [Thu, 2 Jun 2016 12:21:34 +0000 (05:21 -0700)]
Handle stroked single line special case in Ganesh
This CL roughly halves the time spent on the captured stroked lines skp.
On my Linux desktop it boosts the external benchmark from 2618 to 5007.
This is a companion to: https://codereview.chromium.org/
2019193002/ (Add new GM to exercise stroked line special case)
The idea is to land the GM first so any regressions are visible.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2023693002
Review-Url: https://codereview.chromium.org/
2023693002
mbarbella [Wed, 1 Jun 2016 22:39:47 +0000 (15:39 -0700)]
Add a test to ensure that a case where SkCubicClipper::ChopMonoAtY returns false is handled properly.
Also fixes a style issue in the fix for the issue being tested.
BUG=chromium:613918
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2021343004
Review-Url: https://codereview.chromium.org/
2021343004
msarett [Wed, 1 Jun 2016 21:47:18 +0000 (14:47 -0700)]
Create SkColorSpaceXform to handle color conversions
Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1952063002
Committed: https://skia.googlesource.com/skia/+/
740cc88ee3d63c75e52d31238f2a32600cc57a8c
Review-Url: https://codereview.chromium.org/
1952063002
msarett [Wed, 1 Jun 2016 21:43:36 +0000 (14:43 -0700)]
Recognize common parametric gamma
5% of images with ICC profiles (in my test set of 10k)
have this exact gamma representation, which is very close
to 2.2f.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2027413002
Review-Url: https://codereview.chromium.org/
2027413002
brianosman [Wed, 1 Jun 2016 20:49:27 +0000 (13:49 -0700)]
Release surface between runs to avoid seg fault
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2032693002
Review-Url: https://codereview.chromium.org/
2032693002
Brian Salomon [Wed, 1 Jun 2016 20:02:17 +0000 (16:02 -0400)]
Fix uninit warning on valgrind bot in SkPathPriv:IsSimpleClosedRect
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2030713002
Review URL: https://codereview.chromium.org/
2030713002 .
brianosman [Wed, 1 Jun 2016 19:40:15 +0000 (12:40 -0700)]
New benchmark to measure GPU mip-mapping performance
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2030673002
Review-Url: https://codereview.chromium.org/
2030673002
scroggo [Wed, 1 Jun 2016 19:08:23 +0000 (12:08 -0700)]
Revert of Make SkPngCodec decode progressively. (patchset #24 id:480001 of https://codereview.chromium.org/
1997703003/ )
Reason for revert:
Still breaking Google3 e.g.:
https://sponge.corp.google.com/target?id=
9261d31b-34fc-4f0f-981e-
f92f7c5cea2c&target=//third_party/skia/HEAD:dm#shard=1|run=1|attempt=1|page=-1
https://test.corp.google.com/ui#cl=
123773095&flags=CAMQBQ==&id=OCL:
123773095:BASE:
123773415:
1464804876959:
b0ea9b1c&t=//third_party/skia/HEAD:dm
Original issue's description:
> Make SkPngCodec decode progressively.
>
> This is a step towards using SkCodec in Chromium, where progressive
> decoding is necessary.
>
> Switch from using png_read_row (which expects all the data to be
> available) to png_process_data, which uses callbacks when rows are
> available.
>
> Create a new API for SkCodec, which supports progressive decoding and
> scanline decoding. Future changes will switch the other clients off of
> startScanlineDecode and get/skip-Scanlines to the new API.
>
> Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
> PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
> updateCurrScanline(), which was only used by the old implementation for
> interlaced PNG.
>
> DMSrcSink:
> - In CodecSrc::kScanline_Mode, use the new method for scanline decoding
> for the supported formats (just PNG and PNG-in-ICO for now).
>
> fuzz.cpp:
> - Remove reference to kNone_ScanlineOrder
>
> SkCodec:
> - Add new APIs:
> - startIncrementalDecode
> - incrementalDecode
> - Remove kNone_SkScanlineOrder and updateCurrScanline()
>
> SkPngCodec:
> - Implement new APIs
> - Switch from sk_read_fn/png_read_row etc to png_process_data
> - Expand AutoCleanPng's role to decode the header and create the
> SkPngCodec
> - Make the interlaced PNG decoder report how many lines were
> initialized during an incomplete decode
> - Make initializeSwizzler return a bool instead of an SkCodec::Result
> (It only returned kSuccess or kInvalidInput anyway)
>
> SkIcoCodec:
> - Implement the new APIs; supported for PNG in ICO
>
> SkSampledCodec:
> - Call the new method for decoding scanlines, and fall back to the old
> method if the new version is unimplemented
> - Remove references to kNone_SkScanlineOrder
>
> tests/CodecPartial:
> - Add a test which decodes part of an image, then finishes the decode,
> and compares it to the straightforward method
>
> tests/CodecTest:
> - Add a test which decodes all scanlines using the new method
> - Repurpose the Codec_stripes test to decode using the new method in
> sections rather than all at once
> - In the method check(), add a parameter for whether the image supports
> the new method of scanline decoding, and be explicit about whether an
> image supports incomplete
> - Test incomplete PNG decodes. We should have been doing it anyway for
> non-interlaced (except for an image that is too small - one row), but
> the new method supports interlaced incomplete as well
> - Make test_invalid_parameters test the new method
> - Add a test to ensure that it's safe to fall back to scanline decoding without
> rewinding
>
> BUG=skia:4211
>
> The new version was generally faster than the old version (but not significantly so).
>
> Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
>
> Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1997703003
>
> Committed: https://skia.googlesource.com/skia/+/
a4b09a117d4d1ba5dda372e6a2323e653766539e
>
> Committed: https://skia.googlesource.com/skia/+/
30e78c9737ff4861dc4e3fa1e4cd010680ed6965
TBR=reed@google.com,msarett@google.com,scroggo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4211
Review-Url: https://codereview.chromium.org/
2026383002
bsalomon [Wed, 1 Jun 2016 16:42:31 +0000 (09:42 -0700)]
Add SkPathPriv::IsSimpleClosedRect
This function looks for "simple" rect paths. Simple here means begins and ends at a corner and is closed (either manually or with a close verb). Unlike SkPath::isRect this returns the starting point index (using the same start indexing scheme as SkPath::addRect).
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2017313002
Review-Url: https://codereview.chromium.org/
2017313002
jvanverth [Wed, 1 Jun 2016 16:39:15 +0000 (09:39 -0700)]
Add offset to memory allocations
This is setting up for suballocations within one large
allocation
BUG=skia:5031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2018933004
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/
2018933004
msarett [Wed, 1 Jun 2016 16:16:04 +0000 (09:16 -0700)]
Revert of Create SkColorSpaceXform to handle color conversions (patchset #10 id:260001 of https://codereview.chromium.org/
1952063002/ )
Reason for revert:
Google3 can't find qcms
Original issue's description:
> Create SkColorSpaceXform to handle color conversions
>
> Also adds testing of qcms color correction, so we can compare
> SkColorSpaceXform outputs to qcms outputs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1952063002
>
> Committed: https://skia.googlesource.com/skia/+/
740cc88ee3d63c75e52d31238f2a32600cc57a8c
TBR=reed@google.com,scroggo@google.com,mtklein@google.com,herb@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/
2023093004
kulshin [Wed, 1 Jun 2016 15:31:28 +0000 (08:31 -0700)]
Implement support for rendering color emoji on Windows
This change adds support to the DirectWrite scaler context
for detection of color fonts. If it detects a color font and
the glyph is a color glyph, it will use DirectWrite's
TranslateColorGlyphRun API and generate an image of the
glyph that can then be rendered.
Chromium tests: https://codereview.chromium.org/
2003853002
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1984943002
Review-Url: https://codereview.chromium.org/
1984943002
msarett [Wed, 1 Jun 2016 14:55:30 +0000 (07:55 -0700)]
Create SkColorSpaceXform to handle color conversions
Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1952063002
Review-Url: https://codereview.chromium.org/
1952063002
scroggo [Wed, 1 Jun 2016 14:31:28 +0000 (07:31 -0700)]
Make SkPngCodec decode progressively.
This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.
Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.
Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.
Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.
DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).
fuzz.cpp:
- Remove reference to kNone_ScanlineOrder
SkCodec:
- Add new APIs:
- startIncrementalDecode
- incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()
SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
SkPngCodec
- Make the interlaced PNG decoder report how many lines were
initialized during an incomplete decode
- Make initializeSwizzler return a bool instead of an SkCodec::Result
(It only returned kSuccess or kInvalidInput anyway)
SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO
SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder
tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
and compares it to the straightforward method
tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
sections rather than all at once
- In the method check(), add a parameter for whether the image supports
the new method of scanline decoding, and be explicit about whether an
image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
non-interlaced (except for an image that is too small - one row), but
the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
rewinding
BUG=skia:4211
The new version was generally faster than the old version (but not significantly so).
Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1997703003
Committed: https://skia.googlesource.com/skia/+/
a4b09a117d4d1ba5dda372e6a2323e653766539e
Review-Url: https://codereview.chromium.org/
1997703003
sdefresne [Wed, 1 Jun 2016 14:08:56 +0000 (07:08 -0700)]
[GN] Add support for disabling opts via SK_BUILD_NO_OPTS define.
When targetting iOS and using gyp to generate the build files, it is not
possible to select files to build depending on the architecture. Due to
that, the skia code was disabling all optimisation when SK_BUILD_FOR_IOS
was defined.
Since it is possible to select the correct optimised version when using
gn, this pessimisation is hurting the build. Introduce a new define to
disable the optimisation SK_BUILD_NO_OPTS. It will be used by Chromium
when building skia for iOS with gyp but not gn.
Define SK_BUILD_NO_OPTS along-side SK_BUILD_FOR_IOS for all files that
look like build configuration (Xcode projects, gyp configuration files,
public.bzl) in order to avoid introducing breakage on those builds.
BUG=607933
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2002423002
Review-Url: https://codereview.chromium.org/
2002423002
caryclark [Wed, 1 Jun 2016 11:42:02 +0000 (04:42 -0700)]
always compute a cubic tangent
If the inflection of a cubic is also the cusp, the tangent
is degenerate at that t when computed directly. Rather than
giving up, subdivide the curve there and use the computed
control points to compute the tangent.
This strategy also removes the error paths where the tangent
formerly could not be computed.
R=reed@google.com
BUG=615686
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2020293002
Review-Url: https://codereview.chromium.org/
2020293002
mbarbella [Tue, 31 May 2016 21:44:01 +0000 (14:44 -0700)]
Check results from calls to SkCubicClipper::ChopMonoAtY.
BUG=613918
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2006143009
Review-Url: https://codereview.chromium.org/
2006143009
scroggo [Tue, 31 May 2016 20:52:47 +0000 (13:52 -0700)]
Revert of Make SkPngCodec decode progressively. (patchset #18 id:340001 of https://codereview.chromium.org/
1997703003/ )
Reason for revert:
This is failing tests and then crashing on Google3 [1]. The crashes are fixed by crrev.com/
2026873002, but to fix the builder we'll need to upgrade its version of libpng.
[1] https://sponge.corp.google.com/target?id=
e545ef55-4da4-4931-9524-
1ac92acb61b1&target=//third_party/skia/HEAD:dm#shard=1|run=1|attempt=1|page=-1
Original issue's description:
> Make SkPngCodec decode progressively.
>
> This is a step towards using SkCodec in Chromium, where progressive
> decoding is necessary.
>
> Switch from using png_read_row (which expects all the data to be
> available) to png_process_data, which uses callbacks when rows are
> available.
>
> Create a new API for SkCodec, which supports progressive decoding and
> scanline decoding. Future changes will switch the other clients off of
> startScanlineDecode and get/skip-Scanlines to the new API.
>
> Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
> PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
> updateCurrScanline(), which was only used by the old implementation for
> interlaced PNG.
>
> DMSrcSink:
> - In CodecSrc::kScanline_Mode, use the new method for scanline decoding
> for the supported formats (just PNG and PNG-in-ICO for now).
>
> fuzz.cpp:
> - Remove reference to kNone_ScanlineOrder
>
> SkCodec:
> - Add new APIs:
> - startIncrementalDecode
> - incrementalDecode
> - Remove kNone_SkScanlineOrder and updateCurrScanline()
>
> SkPngCodec:
> - Implement new APIs
> - Switch from sk_read_fn/png_read_row etc to png_process_data
> - Expand AutoCleanPng's role to decode the header and create the
> SkPngCodec
> - Make the interlaced PNG decoder report how many lines were
> initialized during an incomplete decode
> - Make initializeSwizzler return a bool instead of an SkCodec::Result
> (It only returned kSuccess or kInvalidInput anyway)
>
> SkIcoCodec:
> - Implement the new APIs; supported for PNG in ICO
>
> SkSampledCodec:
> - Call the new method for decoding scanlines, and fall back to the old
> method if the new version is unimplemented
> - Remove references to kNone_SkScanlineOrder
>
> tests/CodecPartial:
> - Add a test which decodes part of an image, then finishes the decode,
> and compares it to the straightforward method
>
> tests/CodecTest:
> - Add a test which decodes all scanlines using the new method
> - Repurpose the Codec_stripes test to decode using the new method in
> sections rather than all at once
> - In the method check(), add a parameter for whether the image supports
> the new method of scanline decoding, and be explicit about whether an
> image supports incomplete
> - Test incomplete PNG decodes. We should have been doing it anyway for
> non-interlaced (except for an image that is too small - one row), but
> the new method supports interlaced incomplete as well
> - Make test_invalid_parameters test the new method
> - Add a test to ensure that it's safe to fall back to scanline decoding without
> rewinding
>
> BUG=skia:4211
>
> The new version was generally faster than the old version (but not significantly so).
>
> Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
>
> Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1997703003
>
> Committed: https://skia.googlesource.com/skia/+/
a4b09a117d4d1ba5dda372e6a2323e653766539e
TBR=reed@google.com,msarett@google.com,scroggo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4211
Review-Url: https://codereview.chromium.org/
2023103002
jcgregorio [Tue, 31 May 2016 19:51:31 +0000 (12:51 -0700)]
skiaserve: Add /quitquitquit handler. Will be used in the hosted debugger.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2023023002
TBR=ethannicholas
Review-Url: https://codereview.chromium.org/
2023023002
robertphillips [Tue, 31 May 2016 19:08:25 +0000 (12:08 -0700)]
Make use of new SkLights class
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2026763002
Review-Url: https://codereview.chromium.org/
2026763002
scroggo [Tue, 31 May 2016 18:47:39 +0000 (11:47 -0700)]
Fix build error
TBR=herb@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2021393002
Review-Url: https://codereview.chromium.org/
2021393002
mboc [Tue, 31 May 2016 18:42:36 +0000 (11:42 -0700)]
SkTypeface::MakeFromName to take SkFontStyle.
SkTypeface::MakeFromName currently takes SkTypeface::Style,
which is quite limited. This starts the transition to this
function taking SkFontStyle instead.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1818043002
TBR=reed
He said it sounded like a good idea.
Review-Url: https://codereview.chromium.org/
1818043002
halcanary [Tue, 31 May 2016 18:23:42 +0000 (11:23 -0700)]
SkXPS: clean up SkConstexprMath
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2000853003
Review-Url: https://codereview.chromium.org/
2000853003
halcanary [Tue, 31 May 2016 17:57:36 +0000 (10:57 -0700)]
SkEncodedInfo: simplify
No public API change.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2025713003
Review-Url: https://codereview.chromium.org/
2025713003
bsalomon [Tue, 31 May 2016 17:42:16 +0000 (10:42 -0700)]
Fix bug where SkPath will convert an arc to an oval and change the starting point.
Adds unit tests to test the behavior of addArc to oval conversions.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2017743002
Review-Url: https://codereview.chromium.org/
2017743002
herb [Tue, 31 May 2016 17:04:24 +0000 (10:04 -0700)]
Use special case for 0x00 and 0xFF alpha to go faster.
Base Exp Ratio Name
3916010 3077544 0.785888 top25desk_amazon_com.skp_1
3462512 2776580 0.801898 top25desk_google_com_calendar_.skp_1
3446330 3134187 0.909427 top25desk_ebay_com.skp_1
590474 546375 0.925316 top25desk_techcrunch_com.skp_1
3804991 3544162 0.931451 top25desk_google_com__hl_en_q_b.skp_1
996037 939960 0.9437 top25desk_blogger.skp_1
973264 922677 0.948023 top25desk_wikipedia__1_tab_.skp_1
4514050 4295660 0.95162 top25desk_docs___1_open_documen.skp_1
4255383 4110057 0.965849 top25desk_linkedin.skp_1
8408717 8191843 0.974208 top25desk_booking_com.skp_1
2878529 2806501 0.974977 top25desk_plus_google_com_11003.skp_1
11509894 11254486 0.97781 top25desk_pinterest.skp_1
9132514 9010635 0.986654 top25desk_weather_com.skp_1
6504720 6419592 0.986913 top25desk_sports_yahoo_com_.skp_1
9136774 9033870 0.988737 top25desk_answers_yahoo_com.skp_1
4836199 4799784 0.99247 top25desk_news_yahoo_com.skp_1
1393650 1384065 0.993122 top25desk_games_yahoo_com.skp_1
6779678 6735278 0.993451 top25desk_youtube_com.skp_1
10926943 10882308 0.995915 top25desk_espn.skp_1
4259514 4245489 0.996707 top25desk_facebook.skp_1
10955293 10947657 0.999303 top25desk_google_com_search_q_c.skp_1
9153575 9207386 1.00588 top25desk_twitter.skp_1
3865942 3906345 1.01045 top25desk_wordpress.skp_1
4180009 4305530 1.03003 top25desk_mail_google_com_mail_.skp_1
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2020463003
Review-Url: https://codereview.chromium.org/
2020463003
cblume [Tue, 31 May 2016 16:55:08 +0000 (09:55 -0700)]
Add mip support to *DeferredTextureImageData functions.
As a first step, I want to add the ability to store multiple mip levels
in the opaque object.
I will follow this with using SkMipMap to generate and store the mip
levels and generating the texture from those stored mip levels.
R=bsalomon@chromium.org
CC=ericrk@chromium.org
BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2023573002
Review-Url: https://codereview.chromium.org/
2023573002