Commit Graph

6348 Commits

Author SHA1 Message Date
brianosman
e25d71ccbc Gradients are serialized (and can be constructed) as SkColor4f + SkColorSpace
Added gradient shader factories that take SkColor4f + SkColorSpace.
Modified Descriptor to only store SkColor4f + SkColorSpace.
Existing factories make use of helper code to convert SkColor and
forward to the new factories.

Bumped SKP version to handle new gradient serialization format.
I was toying with using half-float when serializing SkColor4f,
despite my aggressive packing of flags, this format is significantly
bigger.

Also added GM to use 4f factories. This GM should (and does)
look identical to the existing gradients GM.

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

Review-Url: https://codereview.chromium.org/2370063002
2016-09-28 11:27:28 -07:00
msarett
7802c3db24 Move toXYZD50() to SkColorSpace_Base
SkColorSpace needs to become more versatile, in order to support
profiles that cannot specified with just a "to XYZ D50" matrix.

This a just first step to clean up the public API.

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

Review-Url: https://codereview.chromium.org/2381553002
2016-09-28 11:15:27 -07:00
brianosman
eec8304714 Added kSRGBLinear_Named color space, along with tests
Gradients (and other shaders) are going to end up serializing this
particular color space very frequently, so we want a shorthand way of
writing it out. I think it's also helpful to have a clearer way of
creating it (vs. NewNamed(kSRGB_Named)->makeLinearGamma()).

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

Review-Url: https://codereview.chromium.org/2377763002
2016-09-27 15:11:47 -07:00
Mike Klein
fc6c37b981 Remove stray semicolons.
Turns out function declarations don't end in semicolons...

BUG=skia:

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

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

Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb
Reviewed-on: https://skia-review.googlesource.com/2720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-09-27 14:04:26 +00:00
brianosman
a99b66d95b Remove outdated comments about pre-sk_sp semantics
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2371603003

Review-Url: https://codereview.chromium.org/2371603003
2016-09-27 03:33:12 -07:00
Mike Reed
403d154591 Revert "Revert "replace Arithmetic xfermode with imagefilter""
This reverts commit 10ff5bfa78.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2680
TBR=
Change-Id: Iac2f4d48d227ff426ccf02b7eae280f382ad3580
Reviewed-on: https://skia-review.googlesource.com/2680
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-09-27 10:33:06 +00:00
mtklein
6a259bfcc8 Revert of My take on SkAlign changes. (patchset #3 id:40001 of https://codereview.chromium.org/2368293002/ )
Reason for revert:
Let's see if reverting this helps the roll.

Original issue's description:
> My take on SkAlign changes.
>
> Like the other change, it makes SkAlignN(x) macros work for pointers, and makes the macros themselves just syntax sugar for SkAlign<N>(x).  We can still decide if we want to sed away the macros independently.
>
> This just does it in a somewhat less repetitive way, and adds some tests.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2368293002
>
> No public API changes.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/e1a5f4e292384046678edc5c1e360b3e13dc118c

TBR=cblume@chromium.org,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/2372083002
2016-09-26 18:20:57 -07:00
Mike Reed
10ff5bfa78 Revert "replace Arithmetic xfermode with imagefilter"
This reverts commit Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4.

Reason for revert: need to guard the no-gpu codepath

Original issue's description:
> replace Arithmetic xfermode with imagefilter
> 
> chrome pre-cl: https://codereview.chromium.org/2369023002/
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2595
> 
> Change-Id: Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4
> Reviewed-on: https://skia-review.googlesource.com/2595
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I761799b594a0379c6bf356e6abc73552c3d19480
Reviewed-on: https://skia-review.googlesource.com/2661
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2016-09-26 20:53:19 +00:00
Mike Reed
0530c88067 replace Arithmetic xfermode with imagefilter
chrome pre-cl: https://codereview.chromium.org/2369023002/

BUG=skia:

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

Change-Id: Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4
Reviewed-on: https://skia-review.googlesource.com/2595
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-09-26 20:00:07 +00:00
mtklein
e1a5f4e292 My take on SkAlign changes.
Like the other change, it makes SkAlignN(x) macros work for pointers, and makes the macros themselves just syntax sugar for SkAlign<N>(x).  We can still decide if we want to sed away the macros independently.

This just does it in a somewhat less repetitive way, and adds some tests.

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

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

Review-Url: https://codereview.chromium.org/2368293002
2016-09-26 10:31:12 -07:00
bsalomon
b58a2b4919 Stop aggregating texture/buffer access objects in GrFragmentProcessor parents.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349243002

Review-Url: https://codereview.chromium.org/2365943003
2016-09-26 06:55:02 -07:00
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
Robert Phillips
49da334086 Add validation of RRects to SkValidatingReadBuffer
This comes from the Skia fuzzer where it is inverting the RRect's rect which causes trouble down the line.

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

Change-Id: I5c34105a47369492d2df99d39a4e29116060ad37
Reviewed-on: https://skia-review.googlesource.com/2591
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-09-23 19:44:57 +00:00
Mike Reed
667a007ab3 change SkXfermodeImageFilter to carry no impl information
BUG=skia:

NOTREECHECKS=True

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

Change-Id: Ibf2dfa7722348ae71a99f1c895de0d2996350e58
Reviewed-on: https://skia-review.googlesource.com/2584
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-09-23 17:13:31 +00: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
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
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
bsalomon
39ef7fb885 Add optional sw generated path coverage mask caching
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335343008

All the bots except the painfully slow windows compiler have finished so,
NOTRY=true

Review-Url: https://codereview.chromium.org/2335343008
2016-09-21 11:16:05 -07:00
reed
669983856d allow clip calls w/o op param, remove unnecessary kReplace ops
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357333002

Review-Url: https://codereview.chromium.org/2357333002
2016-09-21 11:15:07 -07:00
jvanverth
9d54afc38b Support use of non-coherent memory allocations in Vulkan.
BUG=skia:5034
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2348523002

Review-Url: https://codereview.chromium.org/2348523002
2016-09-20 09:20:03 -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
bungeman
1ae0e01acc Split SkFontConfigInterface globals and factory.
Chromium needs to be able to set up their build such that the globals
continue existing but the SkFontMgr::Factory can be defined separately.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2346333002
CQ_INCLUDE_TRYBOTS=master.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/2346333002
2016-09-19 12:13:16 -07:00
csmartdalton
4b5179b74c skpbench
skpbench is a benchmarking suite for skps that aims to generate 100%
repeatable results. The initial commit consists of three parts:

skpbench

A minimalist program whose sole purpose is to open an skp file,
benchmark it on a single config, and exit. No tiling, looping, or
other fanciness is used; it just draws the skp whole into a size-
matched render target and syncs the GPU after each draw.

Limiting the entire process to a single config/skp pair helps to keep
the results repeatable.

skpbench.py

A wrapper to execute the skpbench binary with various configs and skps.
It also monitors the output in order to filter out and re-run results
with an unacceptable stddev.

In the future this script will lock down and monitor clocks and
temperatures.

parseskpbench.py

A utility for parsing skpbench output into a spreadsheet.

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

Review-Url: https://codereview.chromium.org/2341823002
2016-09-19 11:03:58 -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
bungeman
67ac33e1f1 Remove SK_DECLARE_LEGACY_CREATE_FROM_FONTDATA.
This is no longer defined by any users, so remove it.

TBR=reed
This just removes no longer used API.

Review-Url: https://codereview.chromium.org/2345353002
2016-09-16 14:54:16 -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
bsalomon
faf8203ea7 Allow GrCaps access from GrDrawContext
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2348923002

Review-Url: https://codereview.chromium.org/2348923002
2016-09-16 09:53:28 -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
jvanverth
a8370b2c56 Remove old SkGaussianEdgeShader code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345673003
TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2345673003
2016-09-16 09:13:15 -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
robertphillips
f560ef8681 Add staging for removal of SkRRectsGaussianEdgeShader::Make (for Android)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347853002
TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2347853002
2016-09-16 06:17:45 -07:00
bsalomon
6b2552f109 Add GrContextOptions flag to disable distance field path renderer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339213002

Review-Url: https://codereview.chromium.org/2339213002
2016-09-15 13:50:26 -07:00
robertphillips
ec895345e5 Fix color bug in SkRRectsGaussianEdgeShader
Due to the code at the end of emitCode this shader was darker than the SkGaussianEdgeShader on Android.

This CL also removes the unused "pad" parameter.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344963002
NOTREECHECKS=true
TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2344963002
2016-09-15 13:18:15 -07:00
brianosman
b9c5137a1c Add storage and computation of SkColor4f version of gradient stops.
For now, we still only have the SkColor factory, but the Descriptor can
now carry either an SkColor or SkColor4f specified gradient. Base class
constructor automatically populates both forms of color, so that legacy
raster backend will continue to work, and new backend work can operate
directly from the float4 version.

On the GPU side, we have similar logic, but GrGradientEffect only
keeps one version of colors around: SkColor if the destination is
legacy, and SkColor4f (with an optional gamut xform) if the destination
is gamma correct. The 4f colors are already linear, and we gamut xform
them in setData, so gradients are now fully color-correct in sRGB and
F16 modes...

... unless there are more than three stops. Then we use a texture, and
that code path isn't handled yet. We have a few choices here (do we
use an 8-bit sRGB atlas, or just always use F16 linear atlas so we can
share it among both sRGB and wide-gamut rendering). In any case, I'd
like to defer that to a second CL.

This change does fix the non-texture gradients in the gamut GM.

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

Review-Url: https://codereview.chromium.org/2337313002
2016-09-15 11:09:45 -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
reed
39eaf5f9fd add helpers for using SkData with picture serialization
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2341693004

TBR=

Review-Url: https://codereview.chromium.org/2341693004
2016-09-15 07:19:35 -07:00
mtklein
c518a76105 Clean up unused SkPictureRecorder::optimizeFor()
Don't worry about the failing Shield bot... unrelated experiment.  It's failing at head.

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

NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2340133002
2016-09-15 04:43:03 -07:00
jvanverth
c20c0c0925 Switch default for SkGaussianBlurShader radius size.
One step towards removing the 6.2 radius entirely.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333403002
TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2333403002
2016-09-14 07:04:49 -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
msarett
f7eb6fc71a Implement Fill() for incomplete decodes to RGBA_F16
Before this patch, we would hit an SkASSERT(false).

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

Review-Url: https://codereview.chromium.org/2335203002
2016-09-13 09:04:11 -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
brianosman
5a7ae7e337 Gamut transformation of the paint color in Ganesh
Conversion from sRGB to destination gamut is going to be very common,
so I'm caching that xform (if there is one) on the draw context.

Results verified in the gamut GM (two more boxes correct).

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

Review-Url: https://codereview.chromium.org/2330553003
2016-09-12 12:07:25 -07:00
robertphillips
2af83ac4f6 Add shader-based GaussianEdgeShader for reveal case
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321713004

Review-Url: https://codereview.chromium.org/2321713004
2016-09-12 12:02:16 -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
bsalomon
7312ff87f6 Remove ability to skip coord transform comparison in pipeline comparison.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316413003

Review-Url: https://codereview.chromium.org/2316413003
2016-09-12 08:55:38 -07:00
brianosman
5192475bd8 Two changes:
1. Remove special premul handling from gamut xform code

Alpha is a constant, so the gamut transformation results remain unchanged
(it distributes across the linear matrix multiply).

2. Use SkMatrix44 rather than array of floats

Preserves semantic intention, and makes upcoming code (where we transform
colors on the CPU by that matrix) simpler.

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

Review-Url: https://codereview.chromium.org/2329553002
2016-09-12 08:50:19 -07:00