Commit Graph

4093 Commits

Author SHA1 Message Date
brianosman
97bbf8211f Add SkColor4f serialization
Adjusted usage in color shader, and will also be using this
in gradients, soon.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2334123003

Review-Url: https://codereview.chromium.org/2334123003
2016-09-25 13:15:58 -07:00
brianosman
eed6b0e1d8 Change SkSpecialImage::makeSurface and makeTightSurface to take output
properties (color space), bounds, and (optional) alphaType.

We were being pretty inconsistent before. Raster was honoring all
components of the info. GPU was using the supplied color type, but
propagating the source's color space. All call sites were saying N32.

What we want to do is propagate the original device's color space, and
pick a good format from that. Rather than force all the clients to
jump through hoops constructing an SkImageInfo that meets our criteria,
just have them supply the few bits we care about, and do everything else
internally.

This also lets us always use RGBA on GPU, but N32 on raster.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349373004

Committed: https://skia.googlesource.com/skia/+/53c38087949252d27cde668368a3eeb59cc2eb00
Review-Url: https://codereview.chromium.org/2349373004
2016-09-23 13:04:05 -07:00
bsalomon
aa840647fc Don't compute path keys for volatile paths in GrShape.
Otherwise, we will compute cache keys for internally transformed paths that don't repeat (e.g. clip paths transformed into device space with a changing view matrix).

BUG=chromium:649562
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2369513002

Review-Url: https://codereview.chromium.org/2369513002
2016-09-23 12:09:16 -07:00
jvanverth
68c3d30702 Some Vulkan memory fixes and cleanup
* Switch back to not setting transfer_dst on all buffers
* Add some missing unit tests
* Add tracking of heap usage for debugging purposes
* Fall back to non-device-local memory if device-local allocation fails

BUG=skia:5031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356343003

Committed: https://skia.googlesource.com/skia/+/c5850e9fdb62cc4ae5ed2b6af51aea92cac07455
Review-Url: https://codereview.chromium.org/2356343003
2016-09-23 10:30:04 -07:00
caryclark
cc09372730 fix msan bug in pathops
Msan and Valgrind found an uninitialized memory mistake in
pathops. This also fixes similar bugs where not all parts
of the geometry were covered in the loop iteration.

R=borenet@google.com
NOTREECHECKS=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2366893003

Review-Url: https://codereview.chromium.org/2366893003
2016-09-23 09:32:27 -07:00
brianosman
a76554d2ae Revert of Create special surfaces according to original device (not always in N32) (patchset #9 id:160001 of https://codereview.chromium.org/2349373004/ )
Reason for revert:
DM crash and/or TSAN failure

Original issue's description:
> Change SkSpecialImage::makeSurface and makeTightSurface to take output
> properties (color space), bounds, and (optional) alphaType.
>
> We were being pretty inconsistent before. Raster was honoring all
> components of the info. GPU was using the supplied color type, but
> propagating the source's color space. All call sites were saying N32.
>
> What we want to do is propagate the original device's color space, and
> pick a good format from that. Rather than force all the clients to
> jump through hoops constructing an SkImageInfo that meets our criteria,
> just have them supply the few bits we care about, and do everything else
> internally.
>
> This also lets us always use RGBA on GPU, but N32 on raster.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349373004
>
> Committed: https://skia.googlesource.com/skia/+/53c38087949252d27cde668368a3eeb59cc2eb00

TBR=robertphillips@google.com,reed@google.com,bsalomon@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/2366723004
2016-09-23 08:49:51 -07:00
Mike Reed
1cd88c4b75 use SkCanvas::ClipOp
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2583

Change-Id: I651e2c278bb4d2df08b6e134c734c5403c7e7ff7
Reviewed-on: https://skia-review.googlesource.com/2583
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-09-23 15:17:31 +00:00
brianosman
53c3808794 Change SkSpecialImage::makeSurface and makeTightSurface to take output
properties (color space), bounds, and (optional) alphaType.

We were being pretty inconsistent before. Raster was honoring all
components of the info. GPU was using the supplied color type, but
propagating the source's color space. All call sites were saying N32.

What we want to do is propagate the original device's color space, and
pick a good format from that. Rather than force all the clients to
jump through hoops constructing an SkImageInfo that meets our criteria,
just have them supply the few bits we care about, and do everything else
internally.

This also lets us always use RGBA on GPU, but N32 on raster.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349373004

Review-Url: https://codereview.chromium.org/2349373004
2016-09-23 08:11:55 -07:00
caryclark
27c015dfcf split tight quads and conics
Tight quads and conics may nearly fold over on themselves, confusing
coincidence against other curves. Split them at their max curvature
early on to avoid complicating later logic.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357353002

Review-Url: https://codereview.chromium.org/2357353002
2016-09-23 05:47:20 -07:00
reed
d14df7c700 document.close from bool to void
Nothing meaningful is returned, it is inconsistent with the bulk of the rest of skia's api. The C api is waiting on this change as well.

Required chrome CL: https://codereview.chromium.org/2355343003/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2354403002

Review-Url: https://codereview.chromium.org/2354403002
2016-09-22 14:12:47 -07:00
jvanverth
ae6e4869c9 Revert of Some Vulkan memory fixes and cleanup (patchset #2 id:20001 of https://codereview.chromium.org/2356343003/ )
Reason for revert:
fHeapIndex is not used in release, need to hide behind SK_DEBUG. Failing on Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Release-GN_Android_Vulkan.

Original issue's description:
> Some Vulkan memory fixes and cleanup
>
> * Switch back to not setting transfer_dst on all buffers
> * Add some missing unit tests
> * Add tracking of heap usage for debugging purposes
> * Fall back to non-device-local memory if device-local allocation fails
>
> BUG=skia:5031
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356343003
>
> Committed: https://skia.googlesource.com/skia/+/c5850e9fdb62cc4ae5ed2b6af51aea92cac07455

TBR=egdaniel@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:5031

Review-Url: https://codereview.chromium.org/2358123004
2016-09-22 13:45:24 -07:00
caryclark
1c10607244 don't close a contour with a line if nothing's there
R=kjlubick@google.com
BUG=skia:5789
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360083006

Review-Url: https://codereview.chromium.org/2360083006
2016-09-22 12:52:21 -07:00
jvanverth
c5850e9fdb Some Vulkan memory fixes and cleanup
* Switch back to not setting transfer_dst on all buffers
* Add some missing unit tests
* Add tracking of heap usage for debugging purposes
* Fall back to non-device-local memory if device-local allocation fails

BUG=skia:5031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2356343003

Review-Url: https://codereview.chromium.org/2356343003
2016-09-22 12:47:35 -07:00
bsalomon
e2e87f3484 Change implementation of flush-count based GrGpuResource purging
Change default to approx 30seconds (given some API usage assumptions)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2361093002

Review-Url: https://codereview.chromium.org/2361093002
2016-09-22 12:42:11 -07:00
msarett
cf7b877d62 Add BGRA as input format to SkColorSpaceXform
This is immediately useful for webp and I think it's a fair guess
that BGRA src formats are not uncommon.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2353363008

Review-Url: https://codereview.chromium.org/2353363008
2016-09-22 12:37:04 -07:00
caryclark
bac104605e Reland of ix for conic fuzz (patchset #1 id:1 of https://codereview.chromium.org/2361473004/ )
Reason for revert:
Landed suppression in Chrome's LayoutTests/TestExpectations

Original issue's description:
> Revert of fix for conic fuzz (patchset #3 id:40001 of https://codereview.chromium.org/2350263003/ )
>
> Reason for revert:
> See if this fixes the layout tests.
>
> Original issue's description:
> > fix for conic fuzz
> >
> > A fuzzer generates a conic that hangs when drawn.
> > The quads that approximate the conics move up and down
> > in y, confusing the renderer.
> >
> > This fix ensures that the split conic maintains the
> > same y direction as the original conic.
> >
> > R=reed@google.com
> > BUG=647922
> > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003
> >
> > Committed: https://skia.googlesource.com/skia/+/ac78863acdef4b428aaf66985b80c76d1be0fdea
>
> TBR=reed@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=647922
>
> Committed: https://skia.googlesource.com/skia/+/08b345588414b861af8a55950e7dc21a1bd85a28

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=647922

Review-Url: https://codereview.chromium.org/2359253002
2016-09-22 10:24:59 -07:00
caryclark
08b3455884 Revert of fix for conic fuzz (patchset #3 id:40001 of https://codereview.chromium.org/2350263003/ )
Reason for revert:
See if this fixes the layout tests.

Original issue's description:
> fix for conic fuzz
>
> A fuzzer generates a conic that hangs when drawn.
> The quads that approximate the conics move up and down
> in y, confusing the renderer.
>
> This fix ensures that the split conic maintains the
> same y direction as the original conic.
>
> R=reed@google.com
> BUG=647922
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003
>
> Committed: https://skia.googlesource.com/skia/+/ac78863acdef4b428aaf66985b80c76d1be0fdea

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=647922

Review-Url: https://codereview.chromium.org/2361473004
2016-09-22 07:42:39 -07:00
brianosman
2a75e5df30 Add output format properties to SkImageFilter::Context
For now, this is just the color space (of the original
requesting device). This is used when constructing
intermediate rendering surfaces, so that we ensure we
land in a surface that's similar/compatible to the
final consumer of the DAG's output.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357273002

Review-Url: https://codereview.chromium.org/2357273002
2016-09-22 07:15:37 -07:00
msarett
4be0e7cfe0 Make SkColorSpaceXform::New() take bare ptrs
There's no need to take sk_sp if we're not going to
ref the ptr.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360863003

Review-Url: https://codereview.chromium.org/2360863003
2016-09-22 07:02:24 -07:00
caryclark
e7bb5b2266 fix next kevin fuzz
Fix one more fuzzer crash.

R=kjlubick@google.com
BUG=skia:5775
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357373002

Review-Url: https://codereview.chromium.org/2357373002
2016-09-22 05:20:07 -07:00
caryclark
ac78863acd fix for conic fuzz
A fuzzer generates a conic that hangs when drawn.
The quads that approximate the conics move up and down
in y, confusing the renderer.

This fix ensures that the split conic maintains the
same y direction as the original conic.

R=reed@google.com
BUG=647922
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350263003

Review-Url: https://codereview.chromium.org/2350263003
2016-09-22 05:15:15 -07:00
mtklein
605d952893 GN: take over CommandBuffer bot
As you suspected, I see nothing preventing us from building our side of things unconditionally.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358173002
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2358173002
2016-09-21 14:01:32 -07:00
caryclark
45f04b8ea8 fix skia pathops fuzzers
Add isolated tests.

R=kjlubick@google.com
BUG=skia:5775
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358043002

Review-Url: https://codereview.chromium.org/2358043002
2016-09-21 08:46:56 -07:00
bsalomon
67fa4e31d8 Make GrShape compute keys for short paths from path data instead of using the gen id.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357643002

Review-Url: https://codereview.chromium.org/2357643002
2016-09-21 08:26:57 -07:00
jvanverth
65b8cb05a7 Fix VkWrapTests
BUG=skia:
TBR=bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2352173002

Review-Url: https://codereview.chromium.org/2352173002
2016-09-20 13:18:00 -07:00
bsalomon
a624bf3d1c Stop flattening GrCoordTransforms in parent GrFragmentProcessors.
This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002

Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6
Review-Url: https://codereview.chromium.org/2339203002
2016-09-20 09:12:47 -07:00
reed
73603f3c52 abstract name of clipping ops, to transtion to a more restricted set
SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp

pre-CL needed in chrome : https://codereview.chromium.org/2355583002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002

Review-Url: https://codereview.chromium.org/2355483002
2016-09-20 08:42:39 -07:00
brianosman
4562f6ecda Add ability to pick a different gamut in GPU f16 or sRGB configs
For now, the only options are sRGB or WideGamutRGB

Basically, the color option to the gpu config is now of
the form: 8888|srgb[_gamut]|f16[_gamut]

color=8888 still implies legacy behavior
srgb implies 8-bit gamma-correct rendering (via sRGB format)
f16 implies 16-bit gamma-correct rendering (via F16 format)

Either of the last two options can then optionally include
a gamut specifier, either _srgb or _wide.
_srgb selects the (default) sRGB gamut
_wide selects the Adobe Wide Gamut RGB gamut, which is nice
for testing, in that it's significantly wider than sRGB,
so rendering differences are obvious.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350003003

Review-Url: https://codereview.chromium.org/2350003003
2016-09-19 14:42:04 -07:00
bsalomon
56b7dc476b Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. (patchset #3 id:40001 of https://codereview.chromium.org/2339203002/ )
Reason for revert:
Crashing blink
 https://codereview.chromium.org/2351743002/

Original issue's description:
> Stop flattening GrCoordTransforms in parent GrFragmentProcessors.
>
> This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002
>
> Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6

TBR=egdaniel@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2351753002
2016-09-19 09:26:40 -07:00
bsalomon
d91237ee05 Stop flattening GrCoordTransforms in parent GrFragmentProcessors.
This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002

Review-Url: https://codereview.chromium.org/2339203002
2016-09-19 08:36:58 -07:00
caryclark
bbfe92bc1d fix fuzzer bugs
Add a couple more cases where Op() fails and
returns false when the out of range input
values make the internal numeric unstable.

TBR=reed@google.com
BUG=647834, 648068
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2348263002

Review-Url: https://codereview.chromium.org/2348263002
2016-09-19 06:00:35 -07:00
msarett
c0444615ed Support Float32 output from SkColorSpaceXform
* Adds Float32 support to SkColorSpaceXform
* Changes API to allows clients to ask for F32, updates clients to
  new API
* Adds Sk4f_load4 and Sk4f_store4 to SkNx
* Make use of new xform in SkGr.cpp

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47
Review-Url: https://codereview.chromium.org/2339233003
2016-09-16 11:45:59 -07:00
msarett
c71a9b7f53 Revert of Support Float32 output from SkColorSpaceXform (patchset #7 id:140001 of https://codereview.chromium.org/2339233003/ )
Reason for revert:
Hitting an assert

Original issue's description:
> Support Float32 output from SkColorSpaceXform
>
> * Adds Float32 support to SkColorSpaceXform
> * Changes API to allows clients to ask for F32, updates clients to
>   new API
> * Adds Sk4f_load4 and Sk4f_store4 to SkNx
> * Make use of new xform in SkGr.cpp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47

TBR=brianosman@google.com,mtklein@google.com,scroggo@google.com,mtklein@chromium.org,bsalomon@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/2347473007
2016-09-16 11:01:27 -07:00
msarett
43d6651111 Support Float32 output from SkColorSpaceXform
* Adds Float32 support to SkColorSpaceXform
* Changes API to allows clients to ask for F32, updates clients to
  new API
* Adds Sk4f_load4 and Sk4f_store4 to SkNx
* Make use of new xform in SkGr.cpp

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2339233003
2016-09-16 09:51:12 -07:00
scroggo
8e6c7ada5a 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()
- Set fDstInfo and fOptions in getPixels(). This may not be necessary
  for all implementations, but it simplifies things for SkPngCodec.

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

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

Review-Url: https://codereview.chromium.org/1997703003
2016-09-16 08:20:38 -07:00
bungeman
f93d71122e SkFontData to use smart pointers.
The SkFontData type is not exposed externally, so any method which uses
it can be updated to use smart pointers without affecting external
users. Updating this first will make updating the public API much
easier.

This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to
std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It
appears that no one outside Skia is currently using SkStream::NewfromFile
so this is a good time to update it as well.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002

Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c
Review-Url: https://codereview.chromium.org/2339273002
2016-09-16 06:24:20 -07:00
reed
262052c926 test/fix/tweak writePicture/readPicture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347593004

Review-Url: https://codereview.chromium.org/2347593004
2016-09-15 14:24:53 -07:00
bsalomon
7bffcd2673 Fix key computation for GrPaths
Improve tests to ensure paths are receiving valid keys
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2342873002

Review-Url: https://codereview.chromium.org/2342873002
2016-09-15 13:55:33 -07:00
bungeman
606add3dfb Revert of SkFontData to use smart pointers. (patchset #3 id:40001 of https://codereview.chromium.org/2339273002/ )
Reason for revert:
Killing Mac

Original issue's description:
> SkFontData to use smart pointers.
>
> The SkFontData type is not exposed externally, so any method which uses
> it can be updated to use smart pointers without affecting external
> users. Updating this first will make updating the public API much
> easier.
>
> This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to
> std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It
> appears that no one outside Skia is currently using SkStream::NewfromFile
> so this is a good time to update it as well.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002
>
> Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c

TBR=mtklein@chromium.org,halcanary@google.com,mtklein@google.com,reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2343933002
2016-09-15 10:57:39 -07:00
bungeman
d8c2476a8b SkFontData to use smart pointers.
The SkFontData type is not exposed externally, so any method which uses
it can be updated to use smart pointers without affecting external
users. Updating this first will make updating the public API much
easier.

This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to
std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It
appears that no one outside Skia is currently using SkStream::NewfromFile
so this is a good time to update it as well.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002

Review-Url: https://codereview.chromium.org/2339273002
2016-09-15 10:03:27 -07:00
caryclark
e839e78443 quad and conic do not intersect
If a quad a conic intersect only where the end of one
is contained by the convex hull of the other, and the
curve contained by the hull is nearly a straight line,
treating it as a line may move the end point to the
other side of the curve.

Detect this by checking to see if the end point is in
the hull, and if so, continue to subdivide the curve
rather than treating it as a line.

This fixes several existing tests that were disabled
earlier this year.

A typo in SkDCurve::nearPoint() prevented detecting when
the end of a line was nearly touching a curve.

Also fixed concidence a bit to get the second half of
tiger further along.

All existing tests, including extended testing in
Release and the first half of tiger, work.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2338323002

Review-Url: https://codereview.chromium.org/2338323002
2016-09-15 07:48:18 -07:00
fmalita
a17411f056 Improved optional command handling in SkParsePath::FromSVGString()
Repeating command letters are optional in SVG path data strings:
https://www.w3.org/TR/SVG/paths.html#PathData

FromSVGString() already supports this feature, but only checks for
scalars prefixes == (digit | '-' | '+').

A decimal point is also a valid scalar prefix though, so it should be
included in the test.

R=caryclark@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339813003

Review-Url: https://codereview.chromium.org/2339813003
2016-09-14 10:14:08 -07:00
caryclark
eed356d281 Rewriting path writer
The path writer takes constructs the output path out of
curves that satisfy the pathop operation.

Curves contain lists of t/point pairs that may not be
comparable to each other. To match up curve ends in the
output path, look for adjacent curves to have a shared
membership rather than comparing point values.

Use path utilities to connect partial curve lists into
closed contours.

Share the angle code that determines if a curve has become
a degenerate line with the path writer.

Clean up some code on the way, and delete some unused
functions.

TBR=reed@google.com
BUG=5188
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321973005

Review-Url: https://codereview.chromium.org/2321973005
2016-09-14 07:18:20 -07:00
reed
7e3ba9f88d change write-image to use pipeverbs like everyone else, and add test
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335973003

Review-Url: https://codereview.chromium.org/2335973003
2016-09-13 17:25:19 -07:00
csmartdalton
6270e558c3 Add ContextOptions field to SkCommandLineConfigGpu
Reduces duplicate code by computing the ContextOptions in one spot.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337163002

Review-Url: https://codereview.chromium.org/2337163002
2016-09-13 10:41:50 -07:00
fmalita
37283c28aa Use sk_sp text blob APIs
SkTextBlobBuilder::build()      -> make()
SkAutoTUnref<const SkTextBlob>  -> sk_sp<SkTextBlob>
drawTextBlob(const SkTextBlob*) -> drawTextBlob(const sk_sp<SkTextBlob>&)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335493005

Review-Url: https://codereview.chromium.org/2335493005
2016-09-13 10:00:23 -07:00
reed
54dc4878b0 add pipecanvas
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201323003

Review-Url: https://codereview.chromium.org/2201323003
2016-09-13 08:09:45 -07:00
msarett
f17b71f6c9 Support RGBA/BGRA Premul/Unpremul from SkPNGImageEncoder
BUG=skia:5616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2325223002

Review-Url: https://codereview.chromium.org/2325223002
2016-09-12 14:30:03 -07:00
reed
42943c8aa9 change SkStreams to work with sk_sp<SkData> instead of SkData*
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002

Review-Url: https://codereview.chromium.org/2333713002
2016-09-12 12:01:44 -07:00
ethannicholas
a316395e66 Revert of Turned on SkSL->GLSL compiler (patchset #12 id:220001 of https://codereview.chromium.org/2288033003/ )
Reason for revert:
Compilation errors on some bots.

Original issue's description:
> Turned on SkSL->GLSL compiler
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288033003
>
> Committed: https://skia.googlesource.com/skia/+/9b0fe3d125f237d9884732a48414fa85fc71b4e3

TBR=benjaminwagner@google.com,bsalomon@google.com,egdaniel@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2337553002
2016-09-12 09:15:53 -07:00
ethannicholas
9b0fe3d125 Turned on SkSL->GLSL compiler
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288033003

Review-Url: https://codereview.chromium.org/2288033003
2016-09-12 08:50:13 -07:00
halcanary
57f744e303 SkPDF/Tests: imporve test coverage.
Also: make sure that all SkPDF unit tests are named SkPDF_* to
make testing changes to SkPDF easier.  Other cleanup.

Add test: SkPDF_pdfa_document to verify that flag in public API
works.

SkPDF_JpegIdentification test: test slightly malformed JPEGs to
verify that all code paths work.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322133003

Review-Url: https://codereview.chromium.org/2322133003
2016-09-09 11:41:59 -07:00
brianosman
de68d6c461 Fix storage of gamut transform matrices in SkColorSpace
We were effectively storing the transpose, which made all of our
operations on individual colors, and our concatenation of matrices
awkward and backwards.

I'm planning to push this further into Ganesh, where I had incorrectly
adjusted to the previous layout, treating colors as row vectors in the
shaders.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324843003

Review-Url: https://codereview.chromium.org/2324843003
2016-09-09 10:36:17 -07:00
caryclark
81a478ca6c Skip adding coincident edges found
during curve intersection if their
ends are nearly the same.

Loosen conic/line intersection point
check.

Detect when coincident points are
unordered. This means that points
a/b/c on one curve may appear in
b/c/a order on the opposite curve.

Restructure addMissing to return
success and return if a coincidence
was added as a parameter.

With this, tiger part a works.
Tiger part b exposes bugs around
tight quads that are nearly coincident
with themselves, and are coincident
with something else.

The greedy coicident matcher
may cause the point order to be
out of sync.

Still working out what to do in
this case.

TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321773002

Review-Url: https://codereview.chromium.org/2321773002
2016-09-09 09:37:57 -07:00
msarett
55bcc8e0af Delete some LUTs from SkColorSpaceXform
No need to keep these around.  In the rare case that these are
needed, we can just go ahead and build them.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2326043002

Review-Url: https://codereview.chromium.org/2326043002
2016-09-09 07:48:05 -07:00
caryclark
c9b90d15df fix fuzzer
Earlier fix aborted coincident loop on wrong condition.
This aborts only when it reaches the end, and then
propagates the error out correctly.

TBR=reed@google.com
BUG=644680, 644684
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2327053002

Review-Url: https://codereview.chromium.org/2327053002
2016-09-09 07:41:36 -07:00
msarett
2ecc35ffa5 Checking for valid colorType, alphaType, colorSpace in SkCodec
* Refactor to share code between SkPngCodec and SkWebpCodec
* Didn't end up sharing with SkJpegCodec but did refactor
  that code a bit
* Disallow conversions to F16 with non-linear color spaces
* Fail to decode if we fail to create a SkColorSpaceXform
  (should be an assert soon).  We used to fallback on a
  legacy decode if we failed to create the transform.
* A bunch of name changes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003

Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9
Review-Url: https://codereview.chromium.org/2319293003
2016-09-08 11:55:16 -07:00
msarett
85c922acec Revert of Checking for valid colorType, alphaType, colorSpace in SkCodec (patchset #2 id:100001 of https://codereview.chromium.org/2319293003/ )
Reason for revert:
Broken perf bots

Original issue's description:
> Checking for valid colorType, alphaType, colorSpace in SkCodec
>
> * Refactor to share code between SkPngCodec and SkWebpCodec
> * Didn't end up sharing with SkJpegCodec but did refactor
>   that code a bit
> * Disallow conversions to F16 with non-linear color spaces
> * Fail to decode if we fail to create a SkColorSpaceXform
>   (should be an assert soon).  We used to fallback on a
>   legacy decode if we failed to create the transform.
> * A bunch of name changes
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003
>
> Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9

TBR=scroggo@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/2328663002
2016-09-08 10:54:34 -07:00
msarett
7a9900d6d3 Checking for valid colorType, alphaType, colorSpace in SkCodec
* Refactor to share code between SkPngCodec and SkWebpCodec
* Didn't end up sharing with SkJpegCodec but did refactor
  that code a bit
* Disallow conversions to F16 with non-linear color spaces
* Fail to decode if we fail to create a SkColorSpaceXform
  (should be an assert soon).  We used to fallback on a
  legacy decode if we failed to create the transform.
* A bunch of name changes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003

Review-Url: https://codereview.chromium.org/2319293003
2016-09-08 10:14:05 -07:00
brianosman
971cd496b9 Cache the inverse matrix on SkColorSpace. Rename xyz() to toXYZ().
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2323003002

Review-Url: https://codereview.chromium.org/2323003002
2016-09-08 10:10:11 -07:00
halcanary
51761d12d0 Tests: DiscardableMemory test no longer relies on global state
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2323013002

Review-Url: https://codereview.chromium.org/2323013002
2016-09-08 08:58:37 -07:00
msarett
48ba2b8550 Rename SkColorSpace::GammaNamed to SkColorSpace::RenderTargetGamma
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293002

Review-Url: https://codereview.chromium.org/2319293002
2016-09-07 18:55:49 -07:00
msarett
600c737b64 Delete SkColorSpace::gammaNamed() from public API
Move fGammaNamed to SkColorSpace_Base.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2318663003

Review-Url: https://codereview.chromium.org/2318663003
2016-09-07 12:03:53 -07:00
msarett
ff2a6c8a70 Use demux API in SkWebpCodec
* Necessary to read ICC profiles
* Will be necessary to implement animation
* Requires consolidated data with length

Doesn't affect decode performance (thought I believe
our performance tests only cover SkStreams with memory
bases).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2311793004

Review-Url: https://codereview.chromium.org/2311793004
2016-09-07 11:23:28 -07:00
bsalomon
b77a907c2f Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002

Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744
Review-Url: https://codereview.chromium.org/2307053002
2016-09-07 10:02:04 -07:00
caryclark
b393a49e5f fix pathops fuzzers
Extreme values trigger asserts that in range
values allow.

Disable asserts and other tests to prevent
extreme values from crashing.

TBR=reed@google.com
BUG=644684. 644680, 644640
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316173002

Review-Url: https://codereview.chromium.org/2316173002
2016-09-07 08:21:09 -07:00
bsalomon
5eb41fdf94 Revert of Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache. (patchset #4 id:60001 of https://codereview.chromium.org/2307053002/ )
Reason for revert:
Causing assertions on bots

Original issue's description:
> Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
>
> Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.
>
> Removes the unused and untested discard flush variation.
>
> Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.
>
> Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
> flush that just occurred.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002
>
> Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744

TBR=robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2312123003
2016-09-06 13:49:32 -07:00
bsalomon
1dbb207bab Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002

Review-Url: https://codereview.chromium.org/2307053002
2016-09-06 12:38:00 -07:00
msarett
47ae5c5d8f Delete SkColorSpace::kUnknown_Named, remove fNamed field
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002

Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e
Review-Url: https://codereview.chromium.org/2302413002
2016-09-06 10:01:48 -07:00
csmartdalton
bf4a8f90c8 Improve usage of window rectangles
* Skips non-AA diff rect elements and replaces them with window
  rectangles.
* Places window rectangles in the interiors of antialiased diff rects.
* Arranges two overlapping window rectangles in a plus shape inside of
  diff rounded rects.
* Enables window rectangles when clearing and generating clip masks.

GTX 960 perf result (with vs. without window rectangles):

                              glinst4                msaa16                 gpu
keymobi_pinterest.skp         0.48 -> 0.17 [ 35%]    2.77 -> 1.49 [ 54%]    0.22 -> 0.16 [ 70%]
keymobi_digg_com.skp          0.42 -> 0.23 [ 55%]    2.34 -> 1.08 [ 46%]    0.25 -> 0.21 [ 83%]
desk_jsfiddlebigcar.skp       0.28 -> 0.16 [ 59%]    1.70 -> 0.96 [ 57%]    0.19 -> 0.14 [ 70%]
top25desk_wordpress.skp       0.45 -> 0.18 [ 40%]    2.78 -> 1.53 [ 55%]    0.21 -> 0.19 [ 94%]
top25desk_weather_com.skp     2.01 -> 1.93 [ 96%]    23.5 -> 2.54 [ 11%]    1.90 -> 1.68 [ 88%]
keymobi_blogger.skp           0.57 -> 0.37 [ 65%]    2.87 -> 1.54 [ 54%]    0.43 -> 0.33 [ 77%]
keymobi_linkedin.skp          0.32 -> 0.17 [ 51%]    1.93 -> 1.04 [ 54%]    0.17 -> 0.15 [ 91%]
keymobi_bing_com_search_...   0.29 -> 0.25 [ 83%]    1.85 -> 1.23 [ 66%]    0.50 -> 0.24 [ 48%]
keymobi_theverge_com_201...   1.00 -> 0.67 [ 68%]    9.46 -> 3.84 [ 41%]    0.72 -> 0.65 [ 90%]
keymobi_sfgate_com_.skp       1.56 -> 1.13 [ 72%]    4.49 -> 2.86 [ 64%]    1.54 -> 1.11 [ 72%]
...
GEOMEAN (All 79 blink skps)   1.04 -> 0.90 [ 86%]    4.22 -> 2.81 [ 67%]    0.95 -> 0.89 [ 94%]

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289363005

Committed: https://skia.googlesource.com/skia/+/db42be9a326c747ff92ed1da8c3536c5b3e8e22b
Review-Url: https://codereview.chromium.org/2289363005
2016-09-06 10:01:07 -07:00
caryclark
ef7cee4bbc provide safe exit for runaway intersections
Curve intersections with extreme numbers may
cause the intersection template code to loop
forever. Detect this by looking for
marking more spans gone than exist, and
return without any intersections found.

TBR=reed@google.com
BUG=643855
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2310113002

Review-Url: https://codereview.chromium.org/2310113002
2016-09-06 09:05:55 -07:00
caryclark
e97fe83972 compare degenerates with tolerance
Conics with very large w values can
be approximated with two straight lines.

This avoids iterating endlessly in an
attempt to create quadratics with unstable
numerics.

Check to see if the first chop generated
a pair of lines within the default
point comparison tolerance.

R=reed@google.com
BUG=643933, 643665
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2312923002

Review-Url: https://codereview.chromium.org/2312923002
2016-09-06 08:54:10 -07:00
caryclark
c3bfcb803a Revert of Improve usage of window rectangles (patchset #9 id:160001 of https://codereview.chromium.org/2289363005/ )
Reason for revert:
broke build. See

https://build.chromium.org/p/client.skia/builders/Perf-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/186

Original issue's description:
> Improve usage of window rectangles
>
> * Skips non-AA diff rect elements and replaces them with window
>   rectangles.
> * Places window rectangles in the interiors of antialiased diff rects.
> * Arranges two overlapping window rectangles in a plus shape inside of
>   diff rounded rects.
> * Enables window rectangles when clearing and generating clip masks.
>
> GTX 960 perf result (with vs. without window rectangles):
>
>                               glinst4                msaa16                 gpu
> keymobi_pinterest.skp         0.48 -> 0.17 [ 35%]    2.77 -> 1.49 [ 54%]    0.22 -> 0.16 [ 70%]
> keymobi_digg_com.skp          0.42 -> 0.23 [ 55%]    2.34 -> 1.08 [ 46%]    0.25 -> 0.21 [ 83%]
> desk_jsfiddlebigcar.skp       0.28 -> 0.16 [ 59%]    1.70 -> 0.96 [ 57%]    0.19 -> 0.14 [ 70%]
> top25desk_wordpress.skp       0.45 -> 0.18 [ 40%]    2.78 -> 1.53 [ 55%]    0.21 -> 0.19 [ 94%]
> top25desk_weather_com.skp     2.01 -> 1.93 [ 96%]    23.5 -> 2.54 [ 11%]    1.90 -> 1.68 [ 88%]
> keymobi_blogger.skp           0.57 -> 0.37 [ 65%]    2.87 -> 1.54 [ 54%]    0.43 -> 0.33 [ 77%]
> keymobi_linkedin.skp          0.32 -> 0.17 [ 51%]    1.93 -> 1.04 [ 54%]    0.17 -> 0.15 [ 91%]
> keymobi_bing_com_search_...   0.29 -> 0.25 [ 83%]    1.85 -> 1.23 [ 66%]    0.50 -> 0.24 [ 48%]
> keymobi_theverge_com_201...   1.00 -> 0.67 [ 68%]    9.46 -> 3.84 [ 41%]    0.72 -> 0.65 [ 90%]
> keymobi_sfgate_com_.skp       1.56 -> 1.13 [ 72%]    4.49 -> 2.86 [ 64%]    1.54 -> 1.11 [ 72%]
> keymobi_ftw_usatoday_com...   0.59 -> 0.34 [ 57%]    2.80 -> 1.54 [ 55%]    1.21 -> 1.20 [ 99%]
> keymobi_shop_mobileweb_e...   0.46 -> 0.32 [ 70%]    2.60 -> 1.26 [ 48%]    0.35 -> 0.34 [ 97%]
> keymobi_cnn_com.skp           0.68 -> 0.42 [ 63%]    3.40 -> 2.10 [ 62%]    0.49 -> 0.45 [ 93%]
> keymobi_plus_google_com_...   0.77 -> 0.46 [ 60%]    4.83 -> 3.56 [ 74%]    0.52 -> 0.46 [ 89%]
> keymobi_wordpress.skp         0.50 -> 0.40 [ 81%]    2.60 -> 1.31 [ 50%]    0.40 -> 0.37 [ 91%]
> keymobi_androidpolice_co...   0.84 -> 0.73 [ 87%]    4.15 -> 2.05 [ 49%]    0.77 -> 0.67 [ 87%]
> keymobi_online_wsj_com_h...   0.55 -> 0.43 [ 78%]    2.91 -> 1.66 [ 57%]    0.45 -> 0.41 [ 90%]
> keymobi_iphone_capitolvo...   1.18 -> 0.96 [ 81%]    6.26 -> 4.96 [ 79%]    0.95 -> 0.92 [ 97%]
> keymobi_wikipedia__1_tab...   0.46 -> 0.41 [ 89%]    2.51 -> 1.24 [ 49%]    0.40 -> 0.38 [ 95%]
> keymobi_wikipedia__1_tab...   0.46 -> 0.42 [ 90%]    2.52 -> 1.25 [ 50%]    0.40 -> 0.38 [ 96%]
> keymobi_boingboing_net.skp    0.62 -> 0.56 [ 90%]    3.15 -> 1.80 [ 57%]    0.61 -> 0.56 [ 92%]
> keymobi_cnn_com_2012_10_...   0.86 -> 0.82 [ 95%]    2.81 -> 1.50 [ 53%]    0.91 -> 0.83 [ 91%]
> top25desk_techcrunch_com...   0.61 -> 0.56 [ 92%]    3.03 -> 1.76 [ 58%]    0.62 -> 0.56 [ 91%]
> top25desk_ebay_com.skp        1.18 -> 1.08 [ 92%]    2.23 -> 1.24 [ 56%]    1.14 -> 1.09 [ 96%]
> desk_css3gradients.skp        0.64 -> 0.61 [ 95%]    2.99 -> 1.54 [ 52%]    0.62 -> 0.61 [ 99%]
> top25desk_blogger.skp         0.61 -> 0.59 [ 96%]    2.50 -> 1.37 [ 55%]    0.60 -> 0.57 [ 95%]
> keymobi_nytimes_com_.skp      0.65 -> 0.64 [ 98%]    2.69 -> 1.42 [ 53%]    0.62 -> 0.59 [ 96%]
> keymobi_wowwiki_com_worl...   0.99 -> 0.92 [ 92%]    3.46 -> 2.06 [ 60%]    0.98 -> 0.95 [ 96%]
> keymobi_cuteoverload_com...   1.37 -> 1.26 [ 92%]    3.24 -> 2.45 [ 76%]    1.38 -> 1.35 [ 98%]
> keymobi_mobile_news_sand...   0.88 -> 0.81 [ 93%]    3.50 -> 2.07 [ 59%]    0.82 -> 0.81 [100%]
> top25desk_linkedin.skp        0.87 -> 0.87 [100%]    2.92 -> 1.73 [ 59%]    0.94 -> 0.86 [ 91%]
> top25desk_docs___1_open_...   1.43 -> 1.36 [ 95%]    1.87 -> 1.42 [ 76%]    0.73 -> 0.66 [ 91%]
> keymobi_reddit_com_r_pro...   0.68 -> 0.66 [ 96%]    2.49 -> 1.23 [ 49%]    0.65 -> 0.66 [102%]
> ...
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289363005
>
> Committed: https://skia.googlesource.com/skia/+/db42be9a326c747ff92ed1da8c3536c5b3e8e22b

TBR=bsalomon@google.com,egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2312173002
2016-09-06 07:09:54 -07:00
reed
5a3c528f56 test picture-ops for savelayer
BUG=skia:5716
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2309623002

Review-Url: https://codereview.chromium.org/2309623002
2016-09-06 06:54:41 -07:00
caryclark
8016b264ce interpolation of coincidence must be local to a single span
Pathops makes up intersections that it doesn't detect directly,
but do exist. For instance, if a is coincident with b, and
b is coincident with c, then for where they overlap
a is coincident with c.

The intersections are made up in different ways. In a few
places, the t values that are detected are interpolated to
guess the t values that represent invented intersections.

The interpolated t is not necessarily linear, but a linear
guess is good enough if the invented t lies between known
t values.

Additionally, improve debugging.

This passes the extended release test suite and additionally
passes the first 17 levels in the tiger test suite;
previously, path ops passed 7 levels.

The tiger suite is composed of 37 levels in increasing
complexity, described by about 300K tests.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300203002

Review-Url: https://codereview.chromium.org/2300203002
2016-09-06 05:59:47 -07:00
mgiuca
008fbd1b8e Revert of Delete SkColorSpace::kUnknown_Named, remove fNamed field (patchset #1 id:20001 of https://codereview.chromium.org/2302413002/ )
Reason for revert:
This CL introduced two static initializers (gAdobeRGB and gSRGB) which are causing a sizes regression on Chromium builders:

https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/24981

Original issue's description:
> Delete SkColorSpace::kUnknown_Named, remove fNamed field
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002
>
> Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e

TBR=reed@google.com,brianosman@google.com,msarett@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:5724

Review-Url: https://codereview.chromium.org/2306313002
2016-09-05 04:58:55 -07:00
msarett
54682e856c Delete SkColorSpace::kUnknown_Named, remove fNamed field
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002

Review-Url: https://codereview.chromium.org/2302413002
2016-09-02 14:25:06 -07:00
csmartdalton
db42be9a32 Improve usage of window rectangles
* Skips non-AA diff rect elements and replaces them with window
  rectangles.
* Places window rectangles in the interiors of antialiased diff rects.
* Arranges two overlapping window rectangles in a plus shape inside of
  diff rounded rects.
* Enables window rectangles when clearing and generating clip masks.

GTX 960 perf result (with vs. without window rectangles):

                              glinst4                msaa16                 gpu
keymobi_pinterest.skp         0.48 -> 0.17 [ 35%]    2.77 -> 1.49 [ 54%]    0.22 -> 0.16 [ 70%]
keymobi_digg_com.skp          0.42 -> 0.23 [ 55%]    2.34 -> 1.08 [ 46%]    0.25 -> 0.21 [ 83%]
desk_jsfiddlebigcar.skp       0.28 -> 0.16 [ 59%]    1.70 -> 0.96 [ 57%]    0.19 -> 0.14 [ 70%]
top25desk_wordpress.skp       0.45 -> 0.18 [ 40%]    2.78 -> 1.53 [ 55%]    0.21 -> 0.19 [ 94%]
top25desk_weather_com.skp     2.01 -> 1.93 [ 96%]    23.5 -> 2.54 [ 11%]    1.90 -> 1.68 [ 88%]
keymobi_blogger.skp           0.57 -> 0.37 [ 65%]    2.87 -> 1.54 [ 54%]    0.43 -> 0.33 [ 77%]
keymobi_linkedin.skp          0.32 -> 0.17 [ 51%]    1.93 -> 1.04 [ 54%]    0.17 -> 0.15 [ 91%]
keymobi_bing_com_search_...   0.29 -> 0.25 [ 83%]    1.85 -> 1.23 [ 66%]    0.50 -> 0.24 [ 48%]
keymobi_theverge_com_201...   1.00 -> 0.67 [ 68%]    9.46 -> 3.84 [ 41%]    0.72 -> 0.65 [ 90%]
keymobi_sfgate_com_.skp       1.56 -> 1.13 [ 72%]    4.49 -> 2.86 [ 64%]    1.54 -> 1.11 [ 72%]
keymobi_ftw_usatoday_com...   0.59 -> 0.34 [ 57%]    2.80 -> 1.54 [ 55%]    1.21 -> 1.20 [ 99%]
keymobi_shop_mobileweb_e...   0.46 -> 0.32 [ 70%]    2.60 -> 1.26 [ 48%]    0.35 -> 0.34 [ 97%]
keymobi_cnn_com.skp           0.68 -> 0.42 [ 63%]    3.40 -> 2.10 [ 62%]    0.49 -> 0.45 [ 93%]
keymobi_plus_google_com_...   0.77 -> 0.46 [ 60%]    4.83 -> 3.56 [ 74%]    0.52 -> 0.46 [ 89%]
keymobi_wordpress.skp         0.50 -> 0.40 [ 81%]    2.60 -> 1.31 [ 50%]    0.40 -> 0.37 [ 91%]
keymobi_androidpolice_co...   0.84 -> 0.73 [ 87%]    4.15 -> 2.05 [ 49%]    0.77 -> 0.67 [ 87%]
keymobi_online_wsj_com_h...   0.55 -> 0.43 [ 78%]    2.91 -> 1.66 [ 57%]    0.45 -> 0.41 [ 90%]
keymobi_iphone_capitolvo...   1.18 -> 0.96 [ 81%]    6.26 -> 4.96 [ 79%]    0.95 -> 0.92 [ 97%]
keymobi_wikipedia__1_tab...   0.46 -> 0.41 [ 89%]    2.51 -> 1.24 [ 49%]    0.40 -> 0.38 [ 95%]
keymobi_wikipedia__1_tab...   0.46 -> 0.42 [ 90%]    2.52 -> 1.25 [ 50%]    0.40 -> 0.38 [ 96%]
keymobi_boingboing_net.skp    0.62 -> 0.56 [ 90%]    3.15 -> 1.80 [ 57%]    0.61 -> 0.56 [ 92%]
keymobi_cnn_com_2012_10_...   0.86 -> 0.82 [ 95%]    2.81 -> 1.50 [ 53%]    0.91 -> 0.83 [ 91%]
top25desk_techcrunch_com...   0.61 -> 0.56 [ 92%]    3.03 -> 1.76 [ 58%]    0.62 -> 0.56 [ 91%]
top25desk_ebay_com.skp        1.18 -> 1.08 [ 92%]    2.23 -> 1.24 [ 56%]    1.14 -> 1.09 [ 96%]
desk_css3gradients.skp        0.64 -> 0.61 [ 95%]    2.99 -> 1.54 [ 52%]    0.62 -> 0.61 [ 99%]
top25desk_blogger.skp         0.61 -> 0.59 [ 96%]    2.50 -> 1.37 [ 55%]    0.60 -> 0.57 [ 95%]
keymobi_nytimes_com_.skp      0.65 -> 0.64 [ 98%]    2.69 -> 1.42 [ 53%]    0.62 -> 0.59 [ 96%]
keymobi_wowwiki_com_worl...   0.99 -> 0.92 [ 92%]    3.46 -> 2.06 [ 60%]    0.98 -> 0.95 [ 96%]
keymobi_cuteoverload_com...   1.37 -> 1.26 [ 92%]    3.24 -> 2.45 [ 76%]    1.38 -> 1.35 [ 98%]
keymobi_mobile_news_sand...   0.88 -> 0.81 [ 93%]    3.50 -> 2.07 [ 59%]    0.82 -> 0.81 [100%]
top25desk_linkedin.skp        0.87 -> 0.87 [100%]    2.92 -> 1.73 [ 59%]    0.94 -> 0.86 [ 91%]
top25desk_docs___1_open_...   1.43 -> 1.36 [ 95%]    1.87 -> 1.42 [ 76%]    0.73 -> 0.66 [ 91%]
keymobi_reddit_com_r_pro...   0.68 -> 0.66 [ 96%]    2.49 -> 1.23 [ 49%]    0.65 -> 0.66 [102%]
...

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289363005

Review-Url: https://codereview.chromium.org/2289363005
2016-09-02 11:36:25 -07:00
halcanary
022c2bd37a SkMakeUnique.h defines skstd::make_unique<T>(Args...)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2293963002

Review-Url: https://codereview.chromium.org/2293963002
2016-09-02 11:29:46 -07:00
caryclark
30b9fdd6a1 pathops coincident work
This is working towards fixing all bugs around simplifying the tiger.

This installment simplifies the point-t intersection list as it is built rather than doing the analysis once the intersections are complete. This avoids getting the list in an inconsistent state and makes coincident checks faster and more stable.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237223002

TBR=reed@google.com
BUG=skia:5131

Review-Url: https://codereview.chromium.org/2237223002
2016-08-31 14:36:30 -07:00
robertphillips
8abb370aca Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids
The idea here is that, for wrapped Proxy objects, we want the uniqueID to reflect that of the wrapped object. For this to work the IDs for the non-wrapped versions can't conflict with GrGpuResource's pool of IDs.

Split off of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2301523003

Review-Url: https://codereview.chromium.org/2301523003
2016-08-31 14:04:06 -07:00
csmartdalton
bde96c6263 Move clip mask generation into GrReducedClip
This is a temporary solution to facilitate window rectangles and make
clip mask generation more accessible for testing. The eventual goal is
to simplify clips and merge GrReducedClip into GrClipStackClip.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263343002

Review-Url: https://codereview.chromium.org/2263343002
2016-08-31 12:54:46 -07:00
halcanary
3d01c62e19 SkPDF: Fix Type3 ToUnicode table.
This seems to fix text extraction on Adobe Reader

  - Registry/Ordering is now set to Skia/SkiaOrdering.
  - Type3 fonts now get a FontDescriptor (force symbolic font).
  - CMapName is now Skia-Identity-SkiaOrdering
  - CMap behaves correctly for single-byte fonts.

Also:
  - SkTestTypeface returns tounicode map for testing.
  - Unit test updated

All PDFs render the same

BUG=skia:5606
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2292303004

Review-Url: https://codereview.chromium.org/2292303004
2016-08-31 12:52:35 -07:00
bsalomon
dc43898bbb Don't purge resources for trivial GrContext flushes
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2298003003

Review-Url: https://codereview.chromium.org/2298003003
2016-08-31 11:53:49 -07:00
cblume
33e0cb5e7f Store mipmap levels in deferred texture image
This is a follow-up to https://codereview.chromium.org/2115023002/ and
https://codereview.chromium.org/2034933003/ which were reverted due to
an access violation and a memory leak, respectively.

When creating the deferred texture image, detect if using medium / high
quality. If so, generate and store mipmaps in the deferred texture
image.

When creating a texture from that be sure to read it back out.

BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2242883004

Review-Url: https://codereview.chromium.org/2242883004
2016-08-30 12:09:23 -07:00
halcanary
4f0a23a8d5 SkTextBlob: Begin implementing Extended TextBlob API
BUG=skia:5434
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2084533004

Review-Url: https://codereview.chromium.org/2084533004
2016-08-30 11:58:33 -07:00
bsalomon
752f6ea78e Remove unneeded variables from ResourceCache test
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2295883002

Review-Url: https://codereview.chromium.org/2295883002
2016-08-30 10:27:20 -07:00
bsalomon
9a44565e99 Remove custom data from GrGpuResource
Chrome is no longer relying on this feature to track mailboxes for textures.

BUG=skia:4134

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2291203002

Review-Url: https://codereview.chromium.org/2291203002
2016-08-30 09:42:30 -07:00
brianosman
0e22eb8e6e Some tests around surface creation and snapshotting with color space
Verify the rules that we're converging on for surfaces:
- For 8888, we only support sRGB-like gamma, or no color space at all.
- For F16, we require a color space, with linear gamma.
- For all other formats, we do not support color spaces.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270823002

Review-Url: https://codereview.chromium.org/2270823002
2016-08-30 07:07:59 -07:00
msarett
9b09cd8372 Add Gray support to SkPNGImageEncoder
BUG=skia:5616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2290843002

Review-Url: https://codereview.chromium.org/2290843002
2016-08-29 14:47:49 -07:00
vjiaoblack
a8eabc4a2a Moved ambient lights out of SkLight's light array
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002

Committed: https://skia.googlesource.com/skia/+/8f98f0aa2d3f7571a890b916c7c4b5ee831e9686
Review-Url: https://codereview.chromium.org/2287553002
2016-08-29 10:22:09 -07:00
vjiaoblack
84cddf6fa7 Revert of Moved ambient lights out of SkLight's light array (patchset #7 id:120001 of https://codereview.chromium.org/2287553002/ )
Reason for revert:
Made Deigo's GM miss their ambient lights

Original issue's description:
> Moved ambient lights out of SkLight's light array
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002
>
> Committed: https://skia.googlesource.com/skia/+/8f98f0aa2d3f7571a890b916c7c4b5ee831e9686

TBR=robertphillips@google.com,djsollen@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/2291663002
2016-08-29 08:38:04 -07:00
vjiaoblack
8f98f0aa2d Moved ambient lights out of SkLight's light array
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002

Review-Url: https://codereview.chromium.org/2287553002
2016-08-29 07:08:52 -07:00
caryclark
79418093c1 if the winding of the top can't be computed, give up
TBR=reed@google.com
BUG=641478
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2283993002

Review-Url: https://codereview.chromium.org/2283993002
2016-08-26 14:24:24 -07:00
halcanary
4871f22777 SkPDF: Glyph validation change
Instead of mapping invaid glyphIDs to zero or maxGlyphID,
don't draw them at all.

Validate glyphs when glyph is written, not ahead of time.

Don't allocate array to copy user-provided glyphs.

Easy early exit from SkPDFDevice::internalDrawText()
    GlyphPositioner::flush() called ~GlyphPositioner()
    SkScopeExit class now exists.

Assume SkTypeface* pointers are now never null in more
places.

precalculate alignmentFactor to clean up code.

SkPDFDevice::updateFont must be called with validated
glyphID.  Skip bad glyphs to make this true.

SkPDFDevice::updateFont always succeeds.

SkPDFFont::GetFontResource always succeeds (preconditions are
asserted).  If GetMetrics fails, don't call GetFontResource.

SkPDFFont::glyphsToPDFFontEncodingCount() becomes
SkPDFFont::countStretch() and is inlined.

SkPDFFont::glyphsToPDFFontEncoding now works one Glyph at a
time and is inlined.

SkPDFFont::noteGlyphUsage() operates one glyph at a time.

Add SkScopeExit.h; also a unit test for it.

SkPostConfig: Fix SK_UNUSED for Win32.

No public API changes.
TBR=reed@google.com

BUG=625995

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278703002

Review-Url: https://codereview.chromium.org/2278703002
2016-08-26 13:17:44 -07:00
bsalomon
164fd9fa46 Fix bounds check in grshape test
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274113004

Review-Url: https://codereview.chromium.org/2274113004
2016-08-26 06:45:06 -07:00
caryclark
29b2563afb path ops stream-lining
The addT() function is a workhorse of pathops.
Make it simpler, removing branches and parameters.

Separate addOpp() into const and modify parts.

Add more debugging that asserts if the function
fails and the data is not extreme (e.g., fuzzer
generated).

TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273293004

Review-Url: https://codereview.chromium.org/2273293004
2016-08-25 11:27:17 -07:00
halcanary
650e20d705 SkPDF: Stop #include PREPROCESSOR_DEFINE pattern
No more:
   #include SK_SFNTLY_SUBSETTER
   #include ZLIB_INCLUDE

Also, rename SK_SFNTLY_SUBSETTER to SK_PDF_USE_SFNTLY
to follow my pattern of prefixing SkPDF-specific defines
with 'SK_PDF_'.

The ZLIB_INCLUDE define is no longer is used by anyone.

TODO: rename Sfntly to something pronounceable.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273343002

Review-Url: https://codereview.chromium.org/2273343002
2016-08-25 09:07:02 -07:00
fmalita
6cf896d7ce Reland: Experimental parsing expression grammar (PEG) template library
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271743002

Committed: https://skia.googlesource.com/skia/+/9d08cbc8c6131ff61a1e71cc5c8cf27841d62b42
Review-Url: https://codereview.chromium.org/2271743002
2016-08-25 08:44:35 -07:00
fmalita
0172e77ad6 Revert of Experimental parsing expression grammar (PEG) template library (patchset #8 id:140001 of https://codereview.chromium.org/2271743002/ )
Reason for revert:
G3 roll & Msan woes.

Original issue's description:
> Experimental parsing expression grammar (PEG) template library
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271743002
>
> Committed: https://skia.googlesource.com/skia/+/9d08cbc8c6131ff61a1e71cc5c8cf27841d62b42

TBR=mtklein@google.com,bungeman@google.com,reed@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/2275943004
2016-08-25 05:50:26 -07:00
fmalita
9d08cbc8c6 Experimental parsing expression grammar (PEG) template library
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271743002

Review-Url: https://codereview.chromium.org/2271743002
2016-08-24 18:23:25 -07:00
bsalomon
a395f7c7a5 Update GrShape test to allow more flexible shape creation.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277483002

Review-Url: https://codereview.chromium.org/2277483002
2016-08-24 17:47:41 -07:00
caryclark
1682612871 mark fuzz test flaky since it may fail on some platforms
NOTRY=true
TBR=bungeman@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277893004

Review-Url: https://codereview.chromium.org/2277893004
2016-08-24 13:00:42 -07:00
ajuma
8c99eabdd9 Fix leak in GrTextureStripAtlasTest
This is a followup to https://codereview.chromium.org/2262233002/,
adding a missing call to GrTextureStripAtlas::unlockRow.

BUG=chromium:637678
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272953003

Review-Url: https://codereview.chromium.org/2272953003
2016-08-24 12:09:12 -07:00
bungeman
e55131c186 s/invertable/invertible
English orthography is often made difficult by poor phonology.

TBR=oxford-english-dictionary,mtklein

Review-Url: https://codereview.chromium.org/2272083002
2016-08-24 12:01:31 -07:00
caryclark
ef4f32ac85 remove point aliases
This removes the notion of keeping track of every different t value
that resolves to the same or a similar point. Other fixes make
this concept unnecessary, and removing it simplifies the code.

This removes an allocation, and speeds up paths with many
overlapping curves.

As a bonus, four fuzzer tests that failed before now succeed.

TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275703003

Review-Url: https://codereview.chromium.org/2275703003
2016-08-24 09:24:18 -07:00
ajuma
95243ebb68 Make GrTextureStripAtlas flush pending IO on newly acquired texture
GrTextureStripAtlas uses its own lock counts to protect against
overwriting its own earlier writes, but that doesn't protect against
IO that was pending when a texture was first acquired.

BUG=chromium:637678
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262233002

Review-Url: https://codereview.chromium.org/2262233002
2016-08-24 08:19:03 -07:00
msarett
9d15dab754 Parse ICC profiles from webps
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269333002

Review-Url: https://codereview.chromium.org/2269333002
2016-08-24 07:36:06 -07:00
msarett
9dc6cf6b88 Fix generic color space xform, ColorSpaceXformTest
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275563002

Review-Url: https://codereview.chromium.org/2275563002
2016-08-23 17:53:06 -07:00
msarett
ae6377c08e Make singleton SkColorSpaces thread safe
SkColorSpaces may be once-ptrs, so we can reuse common color spaces.
This means that they must be thread safe.  SkMatrix44 is not
thread safe because it maintains a mutable type mask.

This CL ensures that we precompute the type mask so we
can use const SkMatrix44's safely.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277463002

Review-Url: https://codereview.chromium.org/2277463002
2016-08-23 14:36:20 -07:00
caryclark
3cebe24682 fix conic path fuzz
The test conic has a very large weight, so it reduces to a pair
of lines. Detect this case rather than subdividing the conic
so much that the answers are meaningless.

R=herb@google.com, reed@google.com
BUG=638223
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268073004

Review-Url: https://codereview.chromium.org/2268073004
2016-08-23 09:41:00 -07:00
mtklein
a2d2f38600 f16<->f32 ftz is an optional thing for speed.
The ARMv8 asm path actually does it right... that should be okay.

My Nexus 5x fails `dm -m _finite_ftz` before this and passes after it.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276533002

TBR=msarett@google.com

Review-Url: https://codereview.chromium.org/2276533002
2016-08-23 08:58:12 -07:00
caryclark
bb51f4a3a7 fix pathops fuzz
Extreme cubics may split so that one half is a point.
Discard this rather than generating a degenerate line.

TBR=reed@google.com
BUG=640025
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276503002

Review-Url: https://codereview.chromium.org/2276503002
2016-08-23 07:38:49 -07:00
mtklein
8ae991e433 Flush denorm half floats to zero.
I think we convinced ourselves that denorms, while a good chunk of half floats,
cover a rather small fraction of the representable range, which is always
close enough to zero to flush.

This makes both paths of the conversion to or from float considerably simpler.

These functions now work for zero-or-normal half floats (excluding infinite, NaN).
I'm not aware of a term for this class so I've called them "ordinary".

A handful of GMs and SKPs draw differently in --config f16, but all imperceptibly.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2256023002

Review-Url: https://codereview.chromium.org/2256023002
2016-08-22 13:20:18 -07:00
msarett
d9015a43cf Fix Equals and serialization for rare pngs
PNGs may contain a gAMA chunk that specifies gamma
values as floats.  If so, we will use these floats
to create an SkColorSpace.

This CL fixes Equals(), serialize(), and
Deserialize() to correctly handle SkColorSpaces
with strange gammas, where we are unable to fall
back on the profile data.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221983002

Review-Url: https://codereview.chromium.org/2221983002
2016-08-22 12:29:32 -07:00
msarett
35bb74b444 Fix color xform width bug when scaling/subsetting
This was not caught by the bots because we don't test
color correct modes with our many image decoding tests
(takes too long).

Adding a unit test.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2247743002

Review-Url: https://codereview.chromium.org/2247743002
2016-08-22 07:41:28 -07:00
fmalita
5122967e60 Add a gradient edge optimization test
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267593002

Review-Url: https://codereview.chromium.org/2267593002
2016-08-22 06:22:28 -07:00
halcanary
e2348ccb47 src/utils/SkBitSet: simplify
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265623002

Review-Url: https://codereview.chromium.org/2265623002
2016-08-19 16:23:23 -07:00
msarett
9da5a5a198 Fix bug, always keep fIsScaleTranslate in correct state
BUG:639179
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263513003

Review-Url: https://codereview.chromium.org/2263513003
2016-08-19 08:38:36 -07:00
caryclark
429428660b fix fuzzes
TBR=reed@google.com
BUG=639157, 638783
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255243003

Review-Url: https://codereview.chromium.org/2255243003
2016-08-19 07:01:33 -07:00
halcanary
530032a18e SkPDF: in-place font subsetting
Motivation: gross code simplification, also no bitset lookups at draw time.

SkPDFFont owns its glyph useage bitset.

SkPDFSubstituteMap goes away.

SkPDFObject interface is simplified.

SkPDFDocument tracks font usage (as hash set), not glyph usage.

SkPDFFont gets a simpler constructor.

SkPDFFont has first and last glyph set in constructor, not adjusted later.

SkPDFFont implementations are simplified.

SkPDFGlyphSet is replaced with simple SkBitSet.

SkPDFFont sizes its SkBitSets based on glyph count.

SkPDFGlyphSetMap goes away.

SkBitSet is now non-copyable.

SkBitSet now how utility methods to match old SkPDFGlyphSet.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2253283004

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Release-GDI-Trybot,Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-GDI-Trybot

Review-Url: https://codereview.chromium.org/2253283004
2016-08-18 14:22:52 -07:00
reed
3aafe111b6 make LayerIter private, and remove skipClip option
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257203002

Review-Url: https://codereview.chromium.org/2257203002
2016-08-18 12:45:34 -07:00
senorblanco
70f5251cc5 Fix assert caused by floating point error in tessellating path renderer.
In rare cases, floating point error causes the tesselator to add the
same Vertex to more than one Poly on the same side. This was not a big
problem when we were allocating new vertices when constructing Polys,
but after https://codereview.chromium.org/2029243002 it causes more serious
issues, since each Edge can only belong to two Polys, and violating this
condition messes up the linked list of Edges used for left & right Polys
and the associated estimated vertex count.

The fix is to simply let the first Poly win, and skip that vertex for
subsequent Polys. Since this only occurs in cases where vertices are very
close to each other, it should have little visual effect.

This is also exercised by Nebraska-StateSeal.svg.

BUG=skia:5636
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259493002

Review-Url: https://codereview.chromium.org/2259493002
2016-08-17 14:56:22 -07:00
brianosman
69c166d2ce Add alphaType() to SkImage
Keep isOpaque as a convenience method -- many places really only need to
know that for optimization purposes (SrcOver -> Src, etc...).

In all the places where we pull data back out or convert to another
object and need to supply an SkImageInfo, we can avoid losing information
about premulness.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250663002

Review-Url: https://codereview.chromium.org/2250663002
2016-08-17 14:01:05 -07:00
bsalomon
6cb807bf99 Simplify adding attributes to GrGeometryProcessor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248323003

Review-Url: https://codereview.chromium.org/2248323003
2016-08-17 11:33:39 -07:00
csmartdalton
28341fad84 Implement difference clip rects with window rectangles
Plumbs the pipeline for window rectangles and uses them for a very
basic implementation of difference clip rects. This puts a common
Blink pattern on fast path, but we will still eventually need to make
more comprehensive use of window rectangles during clipping.

GTX 960 perf result:
                              gpu                     glinst4                 glinst16
desk_jsfiddlebigcar.skp       0.254 -> 0.177 [70%]    0.279 -> 0.197 [71%]    0.577 -> 0.196 [34%]
keymobi_sfgate_com_.skp       0.697 -> 0.513 [74%]    0.766 -> 0.451 [59%]    0.769 -> 0.597 [78%]
keymobi_blogger.skp           0.406 -> 0.314 [77%]    0.436 -> 0.292 [67%]    0.696 -> 0.319 [46%]
desk_pokemonwiki.skp          0.121 -> 0.098 [81%]     0.13 -> 0.105 [81%]    0.216 -> 0.097 [45%]
desk_wikipedia.skp            0.121 -> 0.098 [81%]     0.13 -> 0.104 [80%]    0.199 -> 0.104 [52%]
keymobi_androidpolice_co...   0.443 -> 0.382 [86%]    0.447 -> 0.398 [89%]    0.444 -> 0.396 [89%]
keymobi_booking_com_sear...   1 .15 ->  1.03 [90%]     1.17 ->  1.06 [91%]     1.17 ->  1.05 [90%]
keymobi_theverge_com.skp      0.417 -> 0.396 [95%]    0.426 -> 0.405 [95%]    0.429 ->   0.4 [93%]

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251573002

Review-Url: https://codereview.chromium.org/2251573002
2016-08-17 10:00:22 -07:00
csmartdalton
8d3f92a92b Make GrReducedClip's gen ID only apply to the element list
Renames fGenID to fElementsGenID and designates this value as
undefined when when the element list is empty.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244223004

Review-Url: https://codereview.chromium.org/2244223004
2016-08-17 09:39:38 -07:00
msarett
549ca329cf Modify SkPngCodec to recognize 565 images from the sBIT chunk
Conveniently, SkPngImageEncoder already writes the sBIT chunk
appropriately.

BUG=skia:5616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212563003

Review-Url: https://codereview.chromium.org/2212563003
2016-08-17 08:54:08 -07:00
reed
ff863bc550 move private test for sect_with_horizontal into unittests
BUG=638575
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250353004

Review-Url: https://codereview.chromium.org/2250353004
2016-08-17 07:37:57 -07:00
caryclark
8ccc075a90 fix fuzz
TBR=reed@google.com
BUG=638496
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250413002

Review-Url: https://codereview.chromium.org/2250413002
2016-08-17 06:14:06 -07:00
caryclark
a1b42d91a5 fix fuzz bug
TBR=reed@google.com
BUG=637968, 638002
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250573003

Review-Url: https://codereview.chromium.org/2250573003
2016-08-16 10:25:29 -07:00
mtklein
883c8efae7 SkLiteDL: remove freelisting, add reset() and SKLITEDL_PAGE knob.
We think Android can cache these better than a global freelist allows.
This removes the freelisting but adds reset() to allow reuse.

I took the opportunity to abstract 4096 as a define SKLITEDL_PAGE.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248693004

Review-Url: https://codereview.chromium.org/2248693004
2016-08-16 09:36:18 -07:00
robertphillips
c4d2f90731 Update ComputeBlurredRRectParams to compute all the parameters needed for occluded blurred rrect ninepatch draws
This is split out of: https://codereview.chromium.org/2245653002/ (Start using vertex attributes for nine-patch blurred rrect draws)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248533002

Review-Url: https://codereview.chromium.org/2248533002
2016-08-16 09:30:03 -07:00
msarett
c5064d9c3d Revert of Add regression test (patchset #2 id:20001 of https://codereview.chromium.org/2243143002/ )
Reason for revert:
Nexus 9 and Nexus Player failures.

Original issue's description:
> Add regression test
>
> Original bug fix was in:
> https://codereview.chromium.org/2230163002
>
> BUG:636268
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002
>
> Committed: https://skia.googlesource.com/skia/+/bcae9d3d15d34a59d279c34e187e6101975500c0

TBR=reed@google.com,gogil@stealien.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2243403003
2016-08-16 04:54:19 -07:00
csmartdalton
d211e7875d Convert GrAppliedClip interface to builder style
GrAppliedClip was about at its limit for how many "make" functions it
could have. Window rectangles would push it over the edge. This change
makes it so GrDrawTarget supplies the original draw bounds to the
constructor, and then GrClip adds the various required clipping
techniques.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246113002

Review-Url: https://codereview.chromium.org/2246113002
2016-08-15 11:17:19 -07:00
egdaniel
3fe0327585 Fix 4444 on Vulkan devices who don't support RGBA_4444
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2238563002

Committed: https://skia.googlesource.com/skia/+/637b3bf2b9c10398d823bd015a722842d4f2f971
Review-Url: https://codereview.chromium.org/2238563002
2016-08-15 10:59:17 -07:00
msarett
bcae9d3d15 Add regression test
Original bug fix was in:
https://codereview.chromium.org/2230163002

BUG:636268
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002

Review-Url: https://codereview.chromium.org/2243143002
2016-08-15 09:42:00 -07:00
egdaniel
a95d46b4ac Fix copying of data in vulkan testing texture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248703002

Review-Url: https://codereview.chromium.org/2248703002
2016-08-15 08:06:29 -07:00
vjiaoblack
772b5ee446 Added PointLights to SkLights::Light
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237493002

Review-Url: https://codereview.chromium.org/2237493002
2016-08-12 11:38:47 -07:00
msarett
fbfa258027 Optimized implementation of quickReject()
Impl Overview
(1) Keep the device clip bounds up to date.  This
    requires minimal additional work in a few places
    throughout canvas.
(2) Keep track of if the ctm isScaleTranslate.  Yes,
    there's a function that does this, but it's slow
    to call.
(3) Perform the src->device transform in quick reject,
    then check intersection/nan.

Other Notes:
(1) NaN and intersection checks are performed
    simultaneously.
(2) We no longer quick reject infinity.
(3) Affine and perspective are both handled in the slow
    case.
(4) SkRasterClip::isEmpty() is handled by the intersection
    check.

Performance on Nexus 6P:
93.2ms -> 59.8ms

Overall Android Jank Tests Performance Impact:
Should gain us a ms or two on some tests.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002

Committed: https://skia.googlesource.com/skia/+/d22a817ff57986407facd16af36320fc86ce02da
Review-Url: https://codereview.chromium.org/2225393002
2016-08-12 08:29:08 -07:00
mtklein
5aeb2fa253 Revert of Optimized implementation of quickReject() (patchset #12 id:260001 of https://codereview.chromium.org/2225393002/ )
Reason for revert:
New assert triggering in the Chrome roll,
https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/208750/steps/webkit_unit_tests%20%28with%20patch%29%20on%20Ubuntu-12.04/logs/FrameThrottlingTest.SynchronousLayoutInAnimationFrameCallback

and breaks the SKNX_NO_SIMD bot,
https://codereview.chromium.org/2236363004

Original issue's description:
> Optimized implementation of quickReject()
>
> Impl Overview
> (1) Keep the device clip bounds up to date.  This
>     requires minimal additional work in a few places
>     throughout canvas.
> (2) Keep track of if the ctm isScaleTranslate.  Yes,
>     there's a function that does this, but it's slow
>     to call.
> (3) Perform the src->device transform in quick reject,
>     then check intersection/nan.
>
> Other Notes:
> (1) NaN and intersection checks are performed
>     simultaneously.
> (2) We no longer quick reject infinity.
> (3) Affine and perspective are both handled in the slow
>     case.
> (4) SkRasterClip::isEmpty() is handled by the intersection
>     check.
>
> Performance on Nexus 6P:
> 93.2ms -> 59.8ms
>
> Overall Android Jank Tests Performance Impact:
> Should gain us a ms or two on some tests.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002
>
> Committed: https://skia.googlesource.com/skia/+/d22a817ff57986407facd16af36320fc86ce02da

TBR=reed@google.com,herb@google.com,msarett@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/2231393003
2016-08-12 02:22:33 -07:00
egdaniel
a825d5317c Revert of Fix 4444 on Vulkan devices who don't support RGBA_4444 (patchset #4 id:60001 of https://codereview.chromium.org/2238563002/ )
Reason for revert:
test failing on some gpus

Original issue's description:
> Fix 4444 on Vulkan devices who don't support RGBA_4444
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2238563002
>
> Committed: https://skia.googlesource.com/skia/+/637b3bf2b9c10398d823bd015a722842d4f2f971

TBR=bsalomon@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/2240713003
2016-08-11 16:17:39 -07:00
msarett
d22a817ff5 Optimized implementation of quickReject()
Impl Overview
(1) Keep the device clip bounds up to date.  This
    requires minimal additional work in a few places
    throughout canvas.
(2) Keep track of if the ctm isScaleTranslate.  Yes,
    there's a function that does this, but it's slow
    to call.
(3) Perform the src->device transform in quick reject,
    then check intersection/nan.

Other Notes:
(1) NaN and intersection checks are performed
    simultaneously.
(2) We no longer quick reject infinity.
(3) Affine and perspective are both handled in the slow
    case.
(4) SkRasterClip::isEmpty() is handled by the intersection
    check.

Performance on Nexus 6P:
93.2ms -> 59.8ms

Overall Android Jank Tests Performance Impact:
Should gain us a ms or two on some tests.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002

Review-Url: https://codereview.chromium.org/2225393002
2016-08-11 14:40:04 -07:00
egdaniel
637b3bf2b9 Fix 4444 on Vulkan devices who don't support RGBA_4444
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2238563002

Review-Url: https://codereview.chromium.org/2238563002
2016-08-11 13:44:23 -07:00
caryclark
c6d855f7f3 start working on tiger again
The tiger tests are a suite under development
that exercise many coincident edge cases.

This fixes the case when a duplicate point is not
ignored when the coincident span references the
primary point.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2239803002

Review-Url: https://codereview.chromium.org/2239803002
2016-08-11 11:59:48 -07:00
reed
a9ca05ca5e Deserialize pictures with custom image-deserializer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187613002

Review-Url: https://codereview.chromium.org/2187613002
2016-08-11 03:55:15 -07:00
robertphillips
f5a83e8184 Create blurred RRect mask on GPU (rather than uploading it)
This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)

All blurred rrects using the "analytic" path will change slightly with this CL.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004

Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50
Review-Url: https://codereview.chromium.org/2222083004
2016-08-10 12:00:09 -07:00
csmartdalton
f9635999a4 Add flag for window rectangles to GrRenderTarget
Adds a flag to GrRenderTarget that indicates whether it can be used
with window rectangles. Also attempts to clean up some of the mixed
samples API.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225303002

Review-Url: https://codereview.chromium.org/2225303002
2016-08-10 11:09:07 -07:00
robertphillips
3f0e6945f8 Revert of Create blurred RRect mask on GPU (rather than uploading it) (patchset #5 id:80001 of https://codereview.chromium.org/2222083004/ )
Reason for revert:
No NoGPU bot on commit queue ?

Original issue's description:
> Create blurred RRect mask on GPU (rather than uploading it)
>
> This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)
>
> All blurred rrects using the "analytic" path will change slightly with this CL.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004
>
> Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
> Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2232953002
2016-08-10 08:40:35 -07:00
robertphillips
94b5c5a411 Create blurred RRect mask on GPU (rather than uploading it)
This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)

All blurred rrects using the "analytic" path will change slightly with this CL.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004

Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
Review-Url: https://codereview.chromium.org/2222083004
2016-08-10 07:14:55 -07:00