Commit Graph

29675 Commits

Author SHA1 Message Date
Yuqian Li
2e2d34b612 Revert "Remove the temporary flag SK_NO_ANALYTIC_AA"
This reverts commit dbce07d803.

Reason for revert: need rebaseline in Google3

Original change's description:
> Remove the temporary flag SK_NO_ANALYTIC_AA
> 
> It seems that this temp flag lives for too long...
> 
> Bug: skia:
> Change-Id: I48b49af8b7f372abac88a8cd5440def3791e635a
> Reviewed-on: https://skia-review.googlesource.com/27662
> Reviewed-by: Cary Clark <caryclark@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Yuqian Li <liyuqian@google.com>

TBR=caryclark@google.com,fmalita@chromium.org,liyuqian@google.com,reed@google.com

Change-Id: I35a91923f16f4e1f530fae20599240cde73438b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/27722
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-27 19:49:21 +00:00
Brian Osman
b4d18735ff Remove GrTraceMarker and friends
This has been disabled for almost two years.

Bug: skia:
Change-Id: Idc1dbf2220514947d2ccd91968e6e173d44d1b86
Reviewed-on: https://skia-review.googlesource.com/27740
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-27 19:41:40 +00:00
Yuqian Li
dbce07d803 Remove the temporary flag SK_NO_ANALYTIC_AA
It seems that this temp flag lives for too long...

Bug: skia:
Change-Id: I48b49af8b7f372abac88a8cd5440def3791e635a
Reviewed-on: https://skia-review.googlesource.com/27662
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-27 18:38:33 +00:00
Mike Klein
f1b24e0dec rearrange SkJumper registers on 32-bit x86
There are not many registers on 32-bit x86, and we're using most to pass
Stage function arguments.  This means few are available as temporaries,
and we're forced to hit the stack all the time.  xmm registers are the
most egregious example: we use all 8 registers pass data, leaving none
free as temporaries.

This CL cuts things down pretty dramatically, from passing 5 general
purpose and 8 xmm registers to 2 general purpose and 4 xmm registers.
One of the two general purpose registers is a pointer to space on the
stack where we store all those other values.

Every stage function needs to use the program pointer, so that stays in
a general purpose register.  Almost every stage uses the r,g,b,a
vectors, so they stay in xmm registers.  The rest (destination x,y, the
tail mask, a pointer to tricky constants, and the dr,dg,db,da vectors)
now live on the stack.

The generated code is about 20K smaller and runs about 20% faster.

    $ out/monobench SkRasterPipeline_srgb 200
    Before: 358.784ns
    After:  282.563ns

Change-Id: Icc117af95c1a81c41109984b32e0841022f0d1a6
Reviewed-on: https://skia-review.googlesource.com/27620
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-27 18:33:13 +00:00
Robert Phillips
7311b40efb Make StencilPathArgs hold a GrRenderTargetProxy (rather than a GrRenderTarget)
Again, this will be useful when GrSurface does not have a origin field.

Change-Id: I0c4ef5b441eaf38f3489e8631aced11b11fdb6ac
Reviewed-on: https://skia-review.googlesource.com/27540
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-27 16:42:33 +00:00
Mike Klein
cd924dba04 clean up SK_SUPPORT_LEGACY_WIN32_JUMPER
Change-Id: Icae3c6ce80a0bef097ea1010a4d065cc9d5a4c88
Reviewed-on: https://skia-review.googlesource.com/27560
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-27 16:39:33 +00:00
Brian Salomon
216f2e08f2 Implement GrFragmentProcessor::clone for 6 additional subclasses.
PremulInputFragmentProcessor
UnpremulInputFragmentProcessor
PremulFragmentProcessor
ReplaceInputFragmentProcessor
SeriesFragmentProcessor

Change-Id: Ided1a6c6b66e12bfd8ee005950443333cc23b830
Reviewed-on: https://skia-review.googlesource.com/26680
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-27 16:32:33 +00:00
Brian Salomon
b133ffe769 Remove Gr1DKernelEffect "helper" class.
Change-Id: I748e49eeacb782fb738c08d5475c442dbce3ad5a
Reviewed-on: https://skia-review.googlesource.com/27500
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-07-27 16:18:33 +00:00
Brian Salomon
164f6ecb84 Implement clone() for 4 additional GrFragmentProcessor subclasses
HighContrastFilterEffect
LumaColorFilterEffect
OverdrawFragmentProcessor
RRectsGaussianEdgeFP

Change-Id: Ie843e025e49dd46e3f75a5f79d399ddd3ceba5cd
Reviewed-on: https://skia-review.googlesource.com/26660
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-27 15:07:13 +00:00
Brian Osman
57bc3ea6fa Expose srgbDecodeDisableSupport in GrCaps
This will allow Flutter to workaround the lack of this extension on a
small number of devices.

Bug: skia:
Change-Id: I46e54aaffc0551a7a17758ebc2016b39bda19abf
Reviewed-on: https://skia-review.googlesource.com/27440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-27 14:18:43 +00:00
Yuqian Li
7d99dad70b Unify DAA and AAA usage decision
Bug: skia:
Change-Id: I2481d872e072fdd638640ef2306aa89c1a1d6d94
Reviewed-on: https://skia-review.googlesource.com/26801
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-07-27 13:51:33 +00:00
Mike Reed
41a930f85b Revert "Revert "Fix SkPathRef deserialization malloc crash""
This reverts commit a4ce4b1f6b.

Fix SkPathRef deserialization malloc crash

If the path says it has more points/verbs/etc than the buffer could
be holding, then resetToSize could try to allocate something huge
and crash.

Bug: skia:
Change-Id: I23b8870e9f74386aca89fb8f9a60d3b452044094
Reviewed-on: https://skia-review.googlesource.com/26805
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-07-27 12:15:03 +00:00
Brian Salomon
6cd51b51d6 Remove GrSingleTextureEffect
Change-Id: I510cc0657f9433b206dc2ab643fa557667263294
Reviewed-on: https://skia-review.googlesource.com/27180
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-07-26 23:31:30 +00:00
Mike Reed
7f97f49a84 remove SK_SUPPORT_LEGACY_CODEC_NEW dead code
Bug: skia:
Change-Id: I59185b8acc00b6df854c613ba29d1002111fcb42
Reviewed-on: https://skia-review.googlesource.com/27240
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-26 22:10:10 +00:00
Mike Klein
154e6dadea factor Engine out of ok core
This makes Engines (task execution strategies: serial, thread, fork)
pluggable just like most of the rest of ok.  It removes the thread and
process limits, as I find myself rarely caring about what they are
exactly.  Instead of limiting to num-cores, we just allow any number of
concurrent threads, and any number of concurrent child processes subject
to OS limitations.

Change-Id: Icef49d86818fe9a4b7380efb60e73e40bc2e6b73
Reviewed-on: https://skia-review.googlesource.com/27140
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-26 21:36:40 +00:00
Robert Phillips
2890fbfe14 Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)
In a future world where GrSurface no longer has an origin it will be
useful for the GrPipeline to be holding the GrRenderTargetProxy (which will
still have an origin).

Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a
Reviewed-on: https://skia-review.googlesource.com/26804
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-26 20:59:00 +00:00
Ethan Nicholas
480c90afc4 moved changes out of autogenerated .cpp file and into source .fp file
Bug: skia:
Change-Id: Ia849b8745d10fe252eee04ae9444b98befac6e76
Reviewed-on: https://skia-review.googlesource.com/26700
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-26 20:47:41 +00:00
Brian Osman
1e09686840 Add --traceMatch argument to filter tracing categories
Bug: skia:
Change-Id: I1449f0f4d7d9ab6225d98c601eafa7461a2a7dde
Reviewed-on: https://skia-review.googlesource.com/27120
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-26 20:12:22 +00:00
Stan Iliev
f695b63841 Don't clamp in GrGLNonlinearColorSpaceXformEffect to support scRGB
Remove color clamp to allow for negative and greater than 1.0
values, when converting to scRGB.

Bug: b/62347704
Change-Id: I5b811d5dd464cf3bb126ad435a7d27c4563fdacc
Reviewed-on: https://skia-review.googlesource.com/26862
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-26 19:31:33 +00:00
Ben Wagner
789966d8dd Update Debian GTX960 dimensions to match bot.
Bug: skia:6890
No-Try: true
Change-Id: I7dea98375b4a146ceca74e4b1913cb281a4a3149
Reviewed-on: https://skia-review.googlesource.com/26802
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-07-26 19:22:05 +00:00
Brian Salomon
4331e464d3 Implement GrFragmentProcessor::clone() for lighting and perlin noise classes
Change-Id: I4c6d426f170711a06d833257422092bb4b9de20c
Reviewed-on: https://skia-review.googlesource.com/26945
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-26 19:20:04 +00:00
Brian Salomon
fb7c83a946 Compose and YUV fragment processor clone implementations
Change-Id: If4d9f1aaf0e5939afb5ad5825d7198db18541926
Reviewed-on: https://skia-review.googlesource.com/27060
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-26 18:45:21 +00:00
Mike Reed
a4ce4b1f6b Revert "Fix SkPathRef deserialization malloc crash"
This reverts commit df6660f64e.

Reason for revert: crashing dm on android and windows

Original change's description:
> Fix SkPathRef deserialization malloc crash
> 
> If the path says it has more points/verbs/etc than the buffer could
> be holding, then resetToSize could try to allocate something huge
> and crash.
> 
> Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3
> Reviewed-on: https://skia-review.googlesource.com/24802
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=bungeman@google.com,reed@google.com,enne@chromium.org

Change-Id: I06fa89c05b785652b097ae04e7ebc001a7c176b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/26944
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-26 18:35:01 +00:00
Mike Klein
737149126d Revert "ok, exit() child processes instead of _exit()"
This reverts commit 9ac801c12c.

Reason for revert: breaks threaded mode.

Original change's description:
> ok, exit() child processes instead of _exit()
> 
> We want the atexit() hook to print deferred logs (crash dumps, etc.) only when the main, parent process exits.  Ending the child processes with _exit() instead of exit() avoids calling atexit() hooks, but also global destructors.  This is more complex than we need: we can just print before main() exits.  Only the main, parent process gets there.
> 
> This now runs each child process' global destructors, which makes trace.json "work": we get a trace of whichever child process finishes last.  It's a start.
> 
> Change-Id: I0cc2b12592f0f79e73a43a160b9fd06dba1fee25
> Reviewed-on: https://skia-review.googlesource.com/26800
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@chromium.org,brianosman@google.com

Change-Id: I695dddaab3b5a51e4698bb7222fc723b544a1d64
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/26943
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-07-26 18:31:12 +00:00
Brian Salomon
1a2a7abe96 More GrFragmentProcessor::clone() implementations.
GrSRGBEffect
EllipticalRRectEffect
CircularRRectEffect
GrNonlinearColorSpaceXformEffect
GrDeviceSpaceTextureDecalFragmentProcessor

Change-Id: I701fb7ed36e66414adba2eea73f6eed306691b49
Reviewed-on: https://skia-review.googlesource.com/26942
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-26 17:52:00 +00:00
Adrienne Walker
df6660f64e Fix SkPathRef deserialization malloc crash
If the path says it has more points/verbs/etc than the buffer could
be holding, then resetToSize could try to allocate something huge
and crash.

Change-Id: I40e8db87e4f61abb23217281ab0365c6af222fa3
Reviewed-on: https://skia-review.googlesource.com/24802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-26 17:49:09 +00:00
Brian Salomon
fcc527b2c9 Implement clone for 4 additional GrFragmentProcessors.
GrConfigConversionEffect
GrConstColorProcessor
GrConvexPolyEffect
AARectEffect

Change-Id: I3b103ed045db0825fc193ee7d6e61c8fe8e5c634
Reviewed-on: https://skia-review.googlesource.com/26842
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-26 16:57:39 +00:00
Yuqian Li
e82a10bb18 Use ifdef instead of ifndef
Bug: skia:
Change-Id: I9f86f71247379713ffaf14e5c704c2ac4c6f9cbd
Reviewed-on: https://skia-review.googlesource.com/26861
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-26 16:14:49 +00:00
Hal Canary
b4bd5ef99c SkPDF: Use DeviceGray for alpha masks.
See https://groups.google.com/forum/#!topic/pdf-dev/qmdjg3w7D8E

BUG=chromium:742058
Change-Id: Ia8c204a92cb2b9fc33fab60826a95e359db65f08
Reviewed-on: https://skia-review.googlesource.com/26822
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-07-26 16:13:29 +00:00
Yuqian Li
d902042c73 Fix viewer state that has empty state/option
If the value or option is empty (as was for kInstancedRenderingStateName),
our Android Java application will throw exception and skip the remaining
state objects. That would result in missing "Softkeys" and "FPS" for Raster
backend in Android Viewer app.

Bug: skia:
Change-Id: I6f600bbb94509ca5389eac2d681304a00427ecdb
Reviewed-on: https://skia-review.googlesource.com/26527
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-26 16:05:19 +00:00
Mike Reed
847068ce83 add Make factory to SkMemoryStream (simplify call-sites)
Bug: skia:6888
Change-Id: Ia4e432673ed089a91229697c8dde0489f220000d
Reviewed-on: https://skia-review.googlesource.com/26884
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-26 15:59:49 +00:00
Cary Clark
50fa3ff138 generated documentation for SkPaint
I've uploaded SkPaint.h as written by bookmaker.

I'm looking for feedback about the style and
content of this generated documentation.

One bug I know about: Doxygen has long comments before enum and
struct members, and short comments on the same line as those 
members. If the documentation mixes these, the result looks
confusing. Still thinking about how to handle this.

Thanks for looking

Change-Id: I815825dbd4408542e6f4108538199a303399b5d2
Reviewed-on: https://skia-review.googlesource.com/23061
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-07-26 15:32:59 +00:00
Mike Reed
1cf276ec59 remove codec-api flag
Bug: skia:6888
Change-Id: I069fd71f7f058171667f25207a1e72ef3f694350
Reviewed-on: https://skia-review.googlesource.com/26885
Reviewed-by: Mike Reed <reed@google.com>
2017-07-26 15:16:44 +00:00
Brian Osman
5e035ca5dd Normalize canvas tracing
Only trace the non-virtual entry points, and only the last such function
on any chain before dispatching to the onXXX virtual.

Cuts down on nested event chatter, and adds in events for several draw
functions that had no tracing at all.

Bug: skia:
Change-Id: I89648769d4c900e27159e4f51af889347fc0f196
Reviewed-on: https://skia-review.googlesource.com/26900
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-07-26 15:02:39 +00:00
Yuqian Li
68dd2a2dcd Further reduce stack size according to -fstack-usage
It seems that google3 is using -fstack-usage to determine whether
we exceed 16k.

Bug: skia:
Change-Id: I259ff7fc0e6614dde83eb340f0a17efbc52ebf57
Reviewed-on: https://skia-review.googlesource.com/26940
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-26 15:00:29 +00:00
Brian Osman
39c08ac3be Automatically prepend "disabled-by-default-" to TRACE categories
Ensures that all Skia events are disabled by default in Chrome, and
eliminates redundant typing.

Bug: skia:
Change-Id: I289c5e5a01084fcf4cccf512da65a4727f4aeca2
Reviewed-on: https://skia-review.googlesource.com/26880
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-07-26 14:22:19 +00:00
Mike Klein
9ac801c12c ok, exit() child processes instead of _exit()
We want the atexit() hook to print deferred logs (crash dumps, etc.) only when the main, parent process exits.  Ending the child processes with _exit() instead of exit() avoids calling atexit() hooks, but also global destructors.  This is more complex than we need: we can just print before main() exits.  Only the main, parent process gets there.

This now runs each child process' global destructors, which makes trace.json "work": we get a trace of whichever child process finishes last.  It's a start.

Change-Id: I0cc2b12592f0f79e73a43a160b9fd06dba1fee25
Reviewed-on: https://skia-review.googlesource.com/26800
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-26 13:19:49 +00:00
Yuqian Li
bb2c14e4b7 Further reduce google3 stack size
It seems that the compiler added the stack size of two "if" branches,
rather than get the max of them...

Bug: skia:
Change-Id: Idf6b47cafd84c9a53a7b8dafb38f815e08094100
Reviewed-on: https://skia-review.googlesource.com/26780
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-26 13:13:29 +00:00
Brian Osman
a9340ba980 Tracing macro cleanup continued
- Remove one especially chatty event, and one pointless test
- Use TRACE_FUNC everywhere, rather than manual strings

Bug: skia:
Change-Id: Icb795294009150ca9a260436738d79546a733337
Reviewed-on: https://skia-review.googlesource.com/26701
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-26 12:58:59 +00:00
Mike Klein
7a0ba1c132 guard SkTableColorFilter against out-of-range inputs
I was going to be clever here and only clamp when we
know the inputs are out of range, but this filter is
rare and slow enough that I think I'd rather it just
be super paranoid safe.

The test crashes without this fix and passes with it.

Change-Id: I4e17aad2b5c1e96180ce8d73b97bee746cf985c2
Reviewed-on: https://skia-review.googlesource.com/26702
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-26 12:55:09 +00:00
Yuqian Li
103611d4c7 Fix flutter and g3 build
Replace deprecated function call and reduce stack usage in g3

Bug: skia:
Change-Id: Ib49ccecef4711c92ea2e62e772d98c0f5097e30d
TBR: reed@google.com, caryclark@google.com
Reviewed-on: https://skia-review.googlesource.com/26565
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-26 04:48:09 +00:00
Yuqian Li
df60e369a8 New analytic AA scan converter using delta (I call it DAA for now)
DAA is:

1. Much simpler than AAA.
   SkScan_AAAPath.cpp is about 1700 lines.
   SkScan_DAAPath.cpp is about 300 lines.
   The whole DAA CL is only about 800 lines.

2. Much faster than AAA for complicated paths.
   The speedup applies to GL backend (including ccpr)!
   Here's the frame time of 'SampleApp --slide Chart' on macbook pro:
     AAA-raster: 33ms
     DAA-raster: 21ms
     AAA-gl:     30ms
     DAA-gl:     20ms
     AAA-ccpr:   18ms
     DAA-ccpr:   12ms
   My linux desktop doesn't have SSE3 so the speedup is smaller
   (~25% for Chart). I believe that DAA is so fast that I can enable
   it for any paths (AAA is not enabled by default for complicated
   paths because it is slow; hence our older supersampling scan
   converter is used for stroking on Chart for AAA-xxx config.)

3. The SkCoverageDelta is suitable for threaded backend with
   out-of-order concurrent scan conversion as commented in the source
   code. Maybe we can also just send deltas to GPU.

4. Similar to most analytic path renderers, the quality is on the best
   ground-truth level, unless there are intersections within a pixel.
   The intersections look good to my eyes although theoretically that
   could be arbitrary far from the ground truth (see my AAA slides).

5. For simple paths, such as circle, triangle, rrect, etc., DAA is
   slower than AAA. But DAA is faster than our older supersampling
   scan converter in most cases. As those simple paths usually don't
   constitute the bottleneck of a picture (skp or svg), I strongly
   recommend use DAA.

6. DAA also heavily favors blitMask so it may work quite well with
   SkRasterPipeline and SkRasterPipelineBlitter.

Finally, please check https://skia-review.googlesource.com/c/22420/
which accelerate DAA by specializing blitCoverageDeltas for
SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%)
speedup. But I couldn't figure out how to reduce the duplicate code
so I don't intend to land it.

Bug: skia:
Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c
Reviewed-on: https://skia-review.googlesource.com/19666
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-25 21:55:19 +00:00
Greg Daniel
3f475d9482 Update CrossContext Image test to fix memory leak
Bug: skia:
Change-Id: I8c0abf16d5eb366cdc5296f8df9f33cc0e8f4cc4
Reviewed-on: https://skia-review.googlesource.com/26662
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-25 20:52:59 +00:00
Brian Salomon
ffc2ec46da Implement clone() for GrDisplacementEffect
This also adds copy constructors for:
GrTextureDomain
GrFragmentProcessor::TextureSampler
GrCoordTransform
Change-Id: I23cb85113e236f8b6fd1d91163c80d2a41931691
Reviewed-on: https://skia-review.googlesource.com/26621
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-25 19:25:41 +00:00
Mike Reed
816afd83f4 fix legacy compile
Bug: skia:
Change-Id: I81953c3c980ef88b168b3a9f9ce94445d0a61218
Reviewed-on: https://skia-review.googlesource.com/26623
Reviewed-by: Mike Reed <reed@google.com>
2017-07-25 19:07:23 +00:00
Florin Malita
5127fcba57 Always postConcat() pipeline gradient matrices
In order to unblock https://skia-review.googlesource.com/c/26564 &
https://skia-review.googlesource.com/c/26427, switch all impls to use a
single/atomic postConcat for the gradient matrix.

This is much easier to guard than the changes above.

Change-Id: Ib72dbc7b5a56a96390f4468fd12caf8b6a0e46ef
Reviewed-on: https://skia-review.googlesource.com/26620
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-07-25 18:36:39 +00:00
Stan Iliev
4ed9ae4b23 Improve GrGLNonlinearColorSpaceXformEffect to support scRGB
Improve GrGLNonlinearColorSpaceXformEffect to correctly implement
scRGB transfer function and allow for negative colors.
Relax SkSurface_Gpu::Valid to allow kRGBA_half_GrPixelConfig
render target without a color space needed for legacy blending on
Android.

Bug: b/62347704
Change-Id: Ibc6144e69c26cdbdcbf29348c4f612fb6b639e01
Reviewed-on: https://skia-review.googlesource.com/26143
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-25 18:34:01 +00:00
Mike Klein
c47f223d14 rename new GM
Our new srgb_color_filter (in gm/srgb_color_filter.cpp) is awfully
similar to the existing srgb_colorfilter (in gm/srgb.cpp).

Let's rename the new one.

Change-Id: I8c7816c377cc4342388be51632353882a1bc5241
Reviewed-on: https://skia-review.googlesource.com/26525
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-25 18:09:30 +00:00
Mike Klein
159db0a6a1 rough clamped tracking in SkRasterPipeline
This should make srgb_color_filter draw correctly in software.
Previously the Rec2020 block would overflow.

Change-Id: Ied4516728039e54214886d55bba92662beee9a26
Reviewed-on: https://skia-review.googlesource.com/26562
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-25 17:42:58 +00:00
Robert Phillips
066f020bb6 Reduce dependence on GrSurface's origin field (take 3)
TBR=bsalomon@google.com

Change-Id: I8c95c6774897dbd87e3c5c87d92f75c5b64d4e76
Reviewed-on: https://skia-review.googlesource.com/26424
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-25 17:34:29 +00:00