Commit Graph

2660 Commits

Author SHA1 Message Date
Brian Salomon
2ebd0c80a2 Remove option to make GrCoordTransforms apply to device positions.
Adds a device space texture decal effect to use for clipping.

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

Change-Id: Ifcc7617ea87f5a86e301995cba9dfc30a4b0e2c5
Reviewed-on: https://skia-review.googlesource.com/2870
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-03 21:39:33 +00:00
Mike Reed
2cbcd12281 Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"""
This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10.

legacy (100K) skp failure

Original change's description:
> Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
> 
> This reverts commit ce02e71758.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878
> 
> Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
> Reviewed-on: https://skia-review.googlesource.com/2878
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=msarett@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5
Reviewed-on: https://skia-review.googlesource.com/2881
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 21:34:36 +00:00
liyuqian
e60d85597f Add GMs for Analytic Anti-Aliasing
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2386293002

Review-Url: https://codereview.chromium.org/2386293002
2016-10-03 13:49:37 -07:00
Mike Reed
70cdb396eb Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
This reverts commit ce02e71758.

BUG=skia:

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

Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
Reviewed-on: https://skia-review.googlesource.com/2878
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 20:02:20 +00:00
Brian Salomon
a3b45d4f7d Move clip CTM application to SkRasterClip and SkClipStack
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2866

Change-Id: I914a57d6ba128acc457e12586c99ba6766eb940c
Reviewed-on: https://skia-review.googlesource.com/2866
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-10-03 19:32:07 +00:00
Mike Reed
ce02e71758 Revert "replace SkXfermode obj with SkBlendMode enum in paints"
This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> replace SkXfermode obj with SkBlendMode enum in paints
> 
> BUG=skia:5814
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714
> 
> Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
> Reviewed-on: https://skia-review.googlesource.com/2714
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7
Reviewed-on: https://skia-review.googlesource.com/2871
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 18:03:29 +00:00
Brian Osman
6fb592e6af Add color space xform to GrAlphaThresholdFragmentProcessor
Fix imagealphathreshold_surface GM to test gamut conversion.

BUG=skia:

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

Change-Id: Id9aaebe72d1dadc613ef1a8d17d066b51049300f
Reviewed-on: https://skia-review.googlesource.com/2867
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-10-03 17:56:31 +00:00
Mike Reed
0591897548 replace SkXfermode obj with SkBlendMode enum in paints
BUG=skia:5814

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

Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
Reviewed-on: https://skia-review.googlesource.com/2714
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-03 17:17:10 +00:00
Brian Osman
01015fbea1 Fix alpha threshold GM to test with and without crop rect
BUG=skia:

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

Change-Id: I09f24303b2a693a384fb7399c2287ab476f16319
Reviewed-on: https://skia-review.googlesource.com/2864
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-03 16:18:09 +00:00
msarett
71df2d7bc1 Add a src rect to drawImageLattice() API
This will allow us to draw ninepatches directly from an asset
texture without having to upload them individually.

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

Review-Url: https://codereview.chromium.org/2382893002
2016-09-30 12:41:42 -07:00
fmalita
ed38772630 Revert of Fix gamut GM to work w/serialization configs. Remove it from blacklist. (patchset #2 id:20001 of https://codereview.chromium.org/2383513002/ )
Reason for revert:
Valgrind errors:

==2603== Invalid read of size 8
==2603==    at 0xA284E0: SkSurface::getCanvas() (SkSurface_Base.h:108)
==2603==    by 0x4F0B0F: gamut_GM(SkCanvas*) (gamut.cpp:163)
==2603==    by 0x483B77: DM::GMSrc::draw(SkCanvas*) const (DMSrcSink.cpp:69)
==2603==    by 0x485F04: DM::GPUSink::draw(DM::Src const&, SkBitmap*, SkWStream*, SkString*) const (DMSrcSink.cpp:1226)
==2603==    by 0x47E974: dm_main() (DM.cpp:1035)
==2603==    by 0x6652EC4: (below main) (libc-start.c:287)
==2603==  Address 0x20 is not stack'd, malloc'd or (recently) free'd
==2603==

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/1410/steps/test_skia%20on%20Ubuntu/logs/stdio

Original issue's description:
> Fix gamut GM to work w/serialization configs. Remove it from blacklist.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2383513002
>
> Committed: https://skia.googlesource.com/skia/+/e4a17372a188f1dffc3f9c9bcdfbb9860728630b

TBR=reed@google.com,borenet@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/2380313002
2016-09-30 06:14:49 -07:00
brianosman
95e8d0a4ae Remove caching from the draw-atlas GMs. Fixes bugs cycling backends.
When we would change backend or color type in SampleApp, we'd be rendering
from a no-longer-valid image, leading to missing output, etc...

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

Review-Url: https://codereview.chromium.org/2381893004
2016-09-29 13:43:49 -07:00
fmalita
ad7cb810dc Reenable GM:arithmode
Convert to SkXfermodeImageFilter and reenable.

R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2379873003

Review-Url: https://codereview.chromium.org/2379873003
2016-09-29 12:25:26 -07:00
brianosman
e4a17372a1 Fix gamut GM to work w/serialization configs. Remove it from blacklist.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2383513002

Review-Url: https://codereview.chromium.org/2383513002
2016-09-29 07:25:45 -07:00
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
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
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
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
caryclark
414c4295f9 allow conic chop to fail
Fuzzy values may cause the conic chop to fail.

Check to see if the values are all finite, and
require the caller to do the same.

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

Review-Url: https://codereview.chromium.org/2368993002
2016-09-26 11:03:54 -07:00
mtklein
477ba0c18a beziers: I missed an unsequenced moveTo() pair.
TBR=brianosman@google.com
BUG=skia:
NOTREECHECKS=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2369933002

Review-Url: https://codereview.chromium.org/2369933002
2016-09-26 08:18:43 -07:00
mtklein
1c127cc3e1 These calls to SkRandom are not sequenced.
This is why we see two versions of this GM: some compilers evaluate the
rand.nextRangeScalar() calls left to right, others right to left.

Remember this bug?
BUG=skia:3241
(https://codereview.chromium.org/1157943006 fixed hittestpath last year.)

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

Review-Url: https://codereview.chromium.org/2368263002
2016-09-26 06:29:18 -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
brianosman
d454609f62 Support for color-spaces with multi-stop (texture) gradients
Texture is F16 linear, unless that's not supported. In that
case, we pack down to sRGB.

Added more test patches to the gamut GM with many stops,
to test this case. Now they render correctly.

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

Review-Url: https://codereview.chromium.org/2343253002
2016-09-22 12:31:59 -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
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
halcanary
4ecf0d4843 GM: add test for type1 font
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350453002

Review-Url: https://codereview.chromium.org/2350453002
2016-09-20 13:11:01 -07:00
brianosman
3e6cf87b5c Cleanup some sRGB TODOs, mostly around setting GrPaint flags correctly
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358433004

Review-Url: https://codereview.chromium.org/2358433004
2016-09-20 09:56:23 -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
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
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
1dfec74d6b Fix SampleApp compilation with skia_gpu=0
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347593002

Review-Url: https://codereview.chromium.org/2347593002
2016-09-15 07:19:53 -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
brianosman
490452ec47 Add tests for gamma correction of gradient stops to gamma GM
Includes three different cases to exercise different cases in Ganesh.

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

Review-Url: https://codereview.chromium.org/2336973003
2016-09-13 08:24:56 -07:00
robertphillips
f619a7af55 Fixup SkRRectsGaussianEdgeShader's shaders
This fixes some visual artifacts in the original CL.

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

Review-Url: https://codereview.chromium.org/2335783003
2016-09-12 17:25:50 -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
bsalomon
1a1aa93034 Remove unneeded GrGLSLTransformedCoordsArray type
Rename GrGLSLFragmentBuilder::ensureFSCoords2D to ensureCoords2D and make it take an arbitrary GrShaderVar.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324663004

Review-Url: https://codereview.chromium.org/2324663004
2016-09-12 09:30:36 -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
vjiaoblack
b2796fdd9e Added in Radial Shadows
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2311223004

Review-Url: https://codereview.chromium.org/2311223004
2016-09-09 09:22:40 -07:00
robertphillips
05a4cf5959 Add GM/slide to simulate Android-style reveal clip
Hopefully, this will let us play w/ geometric and shader-based solutions.

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

Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0
Review-Url: https://codereview.chromium.org/2316593003
2016-09-08 09:02:44 -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
robertphillips
62e9b145a1 Revert of Add GM/slide to simulate Android-style reveal clip (patchset #6 id:100001 of https://codereview.chromium.org/2316593003/ )
Reason for revert:
Shader compilation failure

Original issue's description:
> Add GM/slide to simulate Android-style reveal clip
>
> Hopefully, this will let us play w/ geometric and shader-based solutions.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003
>
> Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0

TBR=jvanverth@google.com,djsollen@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/2316303002
2016-09-07 11:34:05 -07:00
robertphillips
ffac5c4aae Add GM/slide to simulate Android-style reveal clip
Hopefully, this will let us play w/ geometric and shader-based solutions.

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

Review-Url: https://codereview.chromium.org/2316593003
2016-09-07 10:34:06 -07:00
brianosman
2c4b64e92a New gamut GM, to test gamut conversion in various code-paths
After several different strategies, this one appears to work
well. The basic test:

1) For a variety of drawing techniques, we render fixed size
   rectangles. (Solid colors via paint color, bitmap, etc...)
2) For each method in #1, we render to both an sRGB and
   WideGamutRGB offscreen surface. (AdobeRGB isn't wide enough
   to clearly demonstrate if things are working or not).
3) Use readPixels to fetch the raw (still in wide gamut) pixel
   data, then draw that directly to the final canvas.

So, for each pair of squares, they should look clearly
different. Currently, with the GPU backend, only the bicubic
bitmap paths have that behavior. Adding more test cases (and
fixing the ones that are already incorrect) will be the long
tail of gamut transformation.

Current output (with my other patchset, which fixes all
bitmap draws): https://screenshot.googleplex.com/wsL3x7eCtWE.png

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

Review-Url: https://codereview.chromium.org/2293173002
2016-09-07 07:04:45 -07:00