Commit Graph

2736 Commits

Author SHA1 Message Date
Brian Osman
8b0f265f70 Always include the default path renderer in the chain
This (plus SW) ensures that we can always draw any path. Changed the path
renderer command line flags so that 'default' means everything but CCPR,
and 'All' really means 'every path renderer'.

Bug: skia:
Change-Id: I2801d1c50ab939f23efb4600e0f90e6add2891b7
Reviewed-on: https://skia-review.googlesource.com/40221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 19:37:32 +00:00
Brian Salomon
3416969605 Revert "Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""""
This reverts commit a184ac7e0c.

Change-Id: I2a4a1b713fd998ba33a5f85a34be1645438a7ac9
Reviewed-on: https://skia-review.googlesource.com/39400
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-28 20:02:16 +00:00
Mike Reed
3c2d09f89a change SkRect::growToInclude to take a point instead of x,y
This avoids the dangerous overload problem of

growToInclude(0, 0)

matching to (const SkPoint[], count) rather than growToInclude(x, y)

Bug: skia:
Change-Id: Iaba8b1a579638ff363fde62e4e3004052dd2b2ac
Reviewed-on: https://skia-review.googlesource.com/39501
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-08-28 17:54:06 +00:00
Ben Wagner
a93a14a998 Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 17:48:57 +00:00
Cary Clark
493df1f9f3 try again to fix method links
generate method links from
fiddle names to keep them
consistent and unique.

Docs-Preview: https://skia.org/?cl=38727
Bug: skia:6898
Change-Id: I3434801b46002a3a9095e007d456e9e871307304
Reviewed-on: https://skia-review.googlesource.com/38727
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-08-25 17:32:57 +00:00
Cary Clark
8cc16c7fde fix generated links
qualify bookmaker links to remove
file reference if intra-file and
add class reference if part of
a class

TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=38722
Bug: skia: 6898
Change-Id: Ie0548485a6e3f596efc0f15b819bd5060e983a5b
Reviewed-on: https://skia-review.googlesource.com/38722
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-08-25 16:13:08 +00:00
Brian Salomon
87ae989569 Revert "Threaded generation of software paths"
This reverts commit 76323bc061.

Reason for revert: Breaking NUC bots in threaded gm comparison:

https://chromium-swarm.appspot.com/task?id=382e589753187f10&refresh=10



Original change's description:
> Threaded generation of software paths
> 
> All information needed by the thread is captured by the prepare
> callback object, the lambda captures a pointer to that, and does the
> mask render. Once it's done, it signals the semaphore (also owned by the
> callback). The callback defers the semaphore wait even longer (into the
> ASAP upload), so the odds of waiting for the thread are REALLY low.
> 
> Also did a bunch of cleanup along the way, and put in some trace markers
> so we can monitor how well this is working.
> 
> Traces of a GM that includes GPU and SW path rendering (path-reverse):
> 
> Original:
>     https://screenshot.googleplex.com/f5BG3901tQg.png
> Threaded, with wait in the callback (notice pre flush callback blocking):
>     https://screenshot.googleplex.com/htOSZFE2s04.png
> Current version, with wait deferred to ASAP upload function:
>     https://screenshot.googleplex.com/GHjD0U3C34q.png
> 
> Bug: skia:
> Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790
> Reviewed-on: https://skia-review.googlesource.com/36560
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: Icac0918a3771859f671b69ae07ae0fedd3ebb3db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/38560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-24 21:34:38 +00:00
Cary Clark
f05bddaac3 update canvas doc, primarily readpixels and writepixels
also fixed minor bookmaker bugs so canvas 
include and online docs are (bookmaker detected)
error-free

TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=37840
Bug: skia:
Change-Id: Ifcec9c751105444047c37d89fd984dbd4dfd1913
Reviewed-on: https://skia-review.googlesource.com/37840
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-08-24 18:00:33 +00:00
Brian Osman
76323bc061 Threaded generation of software paths
All information needed by the thread is captured by the prepare
callback object, the lambda captures a pointer to that, and does the
mask render. Once it's done, it signals the semaphore (also owned by the
callback). The callback defers the semaphore wait even longer (into the
ASAP upload), so the odds of waiting for the thread are REALLY low.

Also did a bunch of cleanup along the way, and put in some trace markers
so we can monitor how well this is working.

Traces of a GM that includes GPU and SW path rendering (path-reverse):

Original:
    https://screenshot.googleplex.com/f5BG3901tQg.png
Threaded, with wait in the callback (notice pre flush callback blocking):
    https://screenshot.googleplex.com/htOSZFE2s04.png
Current version, with wait deferred to ASAP upload function:
    https://screenshot.googleplex.com/GHjD0U3C34q.png

Bug: skia:
Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790
Reviewed-on: https://skia-review.googlesource.com/36560
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-24 15:22:57 +00:00
Brian Salomon
a184ac7e0c Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible"""
This reverts commit 20af6d12ee.

Performance regressions on Android and Flutter
Change-Id: If70edbe85aa251f298eddf18a89ba2cf56ed94fb
Reviewed-on: https://skia-review.googlesource.com/37340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-22 21:36:40 +00:00
Brian Osman
5929f5c0a5 Add "none" option for --pr, to force software path renderer
There was no way to get this behavior without triggering an error before.

Bug: skia:
Change-Id: Id9cb9090e47226dadad0032f06ec205dd2538dcc
Reviewed-on: https://skia-review.googlesource.com/37001
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-22 17:13:37 +00:00
Brian Salomon
20af6d12ee Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""
This reverts commit ceef4fb5c4.

Bug: skia:
Change-Id: I50b738169b4cf9e06cbe0b5fad0234b506717b66
Reviewed-on: https://skia-review.googlesource.com/36201
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-18 14:37:09 +00:00
Brian Osman
de3b710913 Cache the results of get_pixel_formats_to_try
Choosing pixel formats is quite slow (depending on driver?). We were
doing this once per context, and it added up. On my desktop windows
machine, this saves another 7 seconds in `dm --config gl --src gm`.

Actual times:
  37s -> 30s (not writing PNGs)
  47s -> 39.5s (writing PNGs)

We always called this with MSAA sample count set to zero, so I cleaned
up the code to make that clearer. Also included a comment about the
theoretical risk, although I think that outside of a multi-GPU system,
we're fine.

Bug: skia:
Change-Id: I50927ebfaf6fe8d88a63674427fbf9e06e4ab059
Reviewed-on: https://skia-review.googlesource.com/35763
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-18 13:29:49 +00:00
Brian Salomon
ceef4fb5c4 Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible"
This reverts commit 3fd295550f.

Reason for revert: breaking things

Original change's description:
> Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible
> 
> This op draws a texture rectangle in src over blending with no edge antialiasing. It less powerful than NonAAFillRectOp/GrPaint but has less CPU overhead.
> 
> Change-Id: Ia6107bb67c1c2a83de14c665aff64b0de2750fba
> Reviewed-on: https://skia-review.googlesource.com/33802
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I9cdbeeac15b17d2d6b3385560ed826397c0373c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/36220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-18 13:06:00 +00:00
Brian Salomon
3fd295550f Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible
This op draws a texture rectangle in src over blending with no edge antialiasing. It less powerful than NonAAFillRectOp/GrPaint but has less CPU overhead.

Change-Id: Ia6107bb67c1c2a83de14c665aff64b0de2750fba
Reviewed-on: https://skia-review.googlesource.com/33802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-18 12:47:28 +00:00
Brian Salomon
194db176c9 Add ANGLE support to Viewer on Windows
Change-Id: I97a844b2f289d2518f60a64f94d60551c4530dd4
Reviewed-on: https://skia-review.googlesource.com/35742
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-17 18:58:21 +00:00
Brian Osman
b6f8212bff Optimize the size of our JSON
Catapult (Chrome tracing) has a hard upper limit of 256 MB of JSON data.
This is independent of the number of events, because V8 can't store a
single string longer than that. Before these changes, longer traces
(eg all GL GMs, which was my test case) would be much larger (306 MB).

This CL includes four changes that help to reduce the text size:

1) Offset timestamps (saved 7.3 MB)
2) Limit timestamps and durations to 3 digits (saved 10.7 MB)
3) Shorten thread IDs (saved 7.2 MB)
4) Omit categories from JSON (saved 25.7 MB)

Note that category filtering still works, this just prevents us from
writing the categories to the JSON, which was of limited value.

At this point, my 306 MB file is now 255.3 MB, and loads.

Bug: skia:
Change-Id: Iaafc84025ddd52904f1ce9c1c2e9cbca65113079
Reviewed-on: https://skia-review.googlesource.com/35523
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-17 11:51:26 +00:00
Ravi Mistry
af10923819 Create new set of SVGs
Context is in the below bug

Bug: skia:6918
Change-Id: Ic9048311092bd7e73dd6ee182e79abea79baa07a
Reviewed-on: https://skia-review.googlesource.com/30586
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-08-16 15:42:55 +00:00
Ben Wagner
b4aab9ae6d Replace SkFAIL with SK_ABORT.
SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.

Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-16 15:37:54 +00:00
Brian Osman
c7f2676ba0 Record all trace event data inline, with variable sized entries
Removes the need for strdup with copied strings, paves the way for
more (and richer) payload, and shrinks the average event way down.

Bug: skia:
Change-Id: I9604fe713c34cfc877dce84563af89c579abd65b
Reviewed-on: https://skia-review.googlesource.com/35166
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-16 15:32:44 +00:00
Robert Phillips
4c72b266da Add Chinese fling sample
Change-Id: Id27877c4d816ec83460f50a3a0d9cc0299ea6849
Reviewed-on: https://skia-review.googlesource.com/34780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-16 13:45:57 +00:00
Mike Klein
042357b6ed Add missing #include <stdlib.h>
After turning on exceptions in test tools,
iOS builds of ok started saying atoi() was not declared.

I don't even want to know.

Change-Id: I52f354a1f25ec042bf2161a4c5dd9276aa25e46a
Reviewed-on: https://skia-review.googlesource.com/34961
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-16 02:19:37 +00:00
Mike Klein
135a1b10fe upstream cr/165303354
The only interesting difference here is that I've just skipped
cd_Documents() on Google3 iOS builds rather than adding a new target to
BUILD.  We don't run the binary so it's kind of moot what directory it'd
run in.

Change-Id: I1994e0283d24bcc505fa9b2b7b58307eafa5be92
Reviewed-on: https://skia-review.googlesource.com/34742
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-15 22:00:57 +00:00
Mike Klein
6dda584128 remove monobench
I'm betting big on ok bench.  This is a forcing function.

Change-Id: I8c359b7d712e16f8f0cbb90591801e0014073288
Reviewed-on: https://skia-review.googlesource.com/33660
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 19:02:56 +00:00
Mike Klein
4f6e271596 ok, add a bench source
This new source acts like other sources (GMs, SKPs) for benchmarks.  It
times multiple samples (controlled by samples=N, default 20), and each
of those samples uses the same strategy as monobench, growing loops
exponentially until it runs for at least 10ms.

When done it prints the fastest and the two slowest samples.  In
practice the 100th percentile sample is very different from the
next slowest due to caching, and the fastest is always interesting.

Because these benchmarks run in whatever execution engine ok has
selected, on non-Windows platforms you have some real control over the
interaction between benchmarks.  In its default "fork" mode each
benchmark runs independently in its own process, so the 100th
percentiles really stand out.  The other modes "thread" and "serial"
work as you'd expect too.

Here's an example where you can see how the different interactions work:

out/ok bench:samples=100 8888 filter:search=text_16_AA fork
    [text_16_AA_WT] 2.32µs  @0  6.23µs  @99 24.3ms  @100
    [text_16_AA_FF] 2.41µs  @0  5.7µs   @99 23.3ms  @100
    [text_16_AA_88] 2.55µs  @0  5.6µs   @99 24.8ms  @100
    [text_16_AA_BK] 1.97µs  @0  5.44µs  @99 23.2ms  @100

out/ok bench:samples=100 8888 filter:search=text_16_AA thread
    [text_16_AA_FF] 2.45µs  @0  23.5µs  @99 24.8ms  @100
    [text_16_AA_WT] 2.52µs  @0  17.8µs  @99 24.7ms  @100
    [text_16_AA_88] 2.55µs  @0  19.7µs  @99 25.1ms  @100
    [text_16_AA_BK] 1.8µs   @0  14.7µs  @99 25.1ms  @100

out/ok bench:samples=100 8888 filter:search=text_16_AA serial
    [text_16_AA_88] 2.35µs  @0  3.53µs  @99 16.7ms  @100
    [text_16_AA_FF] 2.09µs  @0  2.73µs  @99 2.91µs  @100
    [text_16_AA_BK] 1.75µs  @0  2.46µs  @99 2.65µs  @100
    [text_16_AA_WT] 2.1µs   @0  3.16µs  @99 3.17µs  @100

In the first "fork" case all runs are independent and have roughly
the same profile.  "thread" looks similar except you can see them
contending at the 99th percentile.  In "serial", the first bench
warms up the rest, so their 100th percentiles are all much faster.

Change-Id: I01a9f8c54b540221a9f232b271bb8ef3fda2569c
Reviewed-on: https://skia-review.googlesource.com/33585
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-11 15:32:36 +00:00
Mike Klein
c2f876bb8d Replace interp() with clut_{3,4}D stages.
I tried to follow exactly the same strategy as a start.
(Though I did fix the off-by-one dimensions.)

It does rather look like we only need 3D and 4D now
that I've looked at the call sites.

Looks like about a 20% speedup.

Change-Id: I8b1af64750ad1750716ee1ab0767e64591c7206a
Reviewed-on: https://skia-review.googlesource.com/32842
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-10 14:34:35 +00:00
Brian Osman
69fd008199 Added SkJSONWriter
This is a stand-alone helper class for writing properly
structured JSON to an SkWStream. It currently solves two
problems (although this CL only uses it in one context):

1) Performance. Writing out JSON this way is about 10x
faster than using JSONCPP. For the large amounts of data
generated by the tracing system, that's a big win.

2) Makes it easy to emit structured JSON from code that's
not fully centralized. We'd like to spit out JSON that
describes a GrContext, GrGpu, GrCaps, etc... Doing that
with simple string manipulation is complex, and spreads
this logic over all those functions. Using JSONCPP adds
yet another (large) third party library dependency (that
we only build into our own tools right now).

This went through several revisions. I originally planned
it as a stateful SkString wrapper, so the user could just
build their JSON as a string. That's O(N^2), though,
because SkString grows by a (small) constant amount. Even
using a better growth strategy still means needing RAM
for all the resulting text, which is usually pointless.
This version has a constant memory cost, so writing huge
amounts of JSON to disk (tracing a long DM run can emit
100's of MBs) doesn't stress resources.

Bug: skia:
Change-Id: Ia716524b246db0f97d332da60d2ce9903069e748
Reviewed-on: https://skia-review.googlesource.com/31204
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-08-09 13:46:24 +00:00
Mike Reed
5a625e08f0 add tool_util to compare images
Bug: skia:
Change-Id: I826190aa15cf42a3ca7f3c7d5271ead5b514c116
Reviewed-on: https://skia-review.googlesource.com/32220
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-08-08 20:07:32 +00:00
Mike Reed
bdc3afa577 simplify gm matrices
rm gm that appears to have been there solely for pdf, but we don't use
it for that now.

Bug: skia:
Change-Id: I3cf88db923c2445b7c95dda14da679a594117643
Reviewed-on: https://skia-review.googlesource.com/31760
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-08 12:43:19 +00:00
Yuqian Li
399b3c2a01 Add AAA and DAA toggles to viewer
Bug: skia:
Change-Id: I0ee397d2b2c81a25918cb28be426cf5162da772f
Reviewed-on: https://skia-review.googlesource.com/30561
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-08-07 15:09:59 +00:00
Robert Phillips
6dd8cf144e Remove SkLightingShader and associated classes
Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5
Reviewed-on: https://skia-review.googlesource.com/31140
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-07 13:33:49 +00:00
Cary Clark
4c06f5ee08 fix links and missing constructor
Docs-Preview: https://skia.org/?cl=31145
Bug: skia: 6898
Change-Id: Ic94a15551f3683d9de5d3bda53394d2efce0d6a4
Reviewed-on: https://skia-review.googlesource.com/31145
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-08-04 17:25:24 +00:00
Cary Clark
bad5ad7d60 canvas include checkpoint
All fixes to bookmaker to allow creating SkCanvas.h

Docs-Preview: https://skia.org/?cl=29022
TBR=caryclark@google.com
Bug: skia: 6898
Change-Id: If10638fbc77cfe680f21868c97f9c0643b87ebf9
Reviewed-on: https://skia-review.googlesource.com/29022
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-08-03 21:36:08 +00:00
Yuqian Li
49fd5d5b74 Disable Delta AA for MSVC for now
Perf showed that DAA is slow with MSVC. Disable it until I find
out why.

Bug: skia:
Change-Id: If30c24e97fa42e3a7ce143a1b1d06e4a3f278d13
TBR: mtklein@google.com
Reviewed-on: https://skia-review.googlesource.com/30584
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-08-03 17:26:27 +00:00
Brian Osman
b6705c2536 Add support for object creation/snapshot/deletion events
- Bring back some previously deleted macros and helper types.
- Automatically inject base_type information into snapshot events,
  to allow simpler tracking of polymorphic object types.
- Fix JSON formatting of pointer values (they were serializing as bool).

Bug: skia:
Change-Id: Iac7803f72ce5396ffd2fbcb5a36d76745c5e3f3e
Reviewed-on: https://skia-review.googlesource.com/28220
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-03 17:10:08 +00:00
Ravi Mistry
698edfecef Chromium lkgr is no longer updated. Use lkcr
Bug: skia:6916
Change-Id: I16badf80c3b34e517b8baab161150c9434f325aa
Reviewed-on: https://skia-review.googlesource.com/30100
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-08-03 12:41:36 +00:00
Ravi Mistry
0d056ba473 Update webpages_playback.py to use the new Golang impl of WPRs
NoTry: true
Bug: skia:6901
Change-Id: I1a0dc706f9494c261c2f609df81a37cc60970fdd
Reviewed-on: https://skia-review.googlesource.com/30060
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-08-02 16:56:16 +00:00
Mike Klein
c722f79b6c clang on windows support
1) Run python bin/fetch-clang-win
2) Set clang_win = "../bin/clang_win"
3) ???
4) Profit

Most changes here are to pass the right -mfoo flags to Clang
to enable advanced instruction sets, or fixed warning-as-errors.

BUG=skia:2679

Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921
Reviewed-on: https://skia-review.googlesource.com/28740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-31 18:39:23 +00:00
Cary Clark
579985ce4f fix self references
try removing self references in method definitions.
If this creates awkward wording, it can always be allowed
in another CL. Also tighten rules for identifying function
references in include comments.

R=briansoman@google.com, caryclark@google.com
TBR=reed@google.com
Bug: skia:6898
Change-Id: I1a0e6b2a76dacfe71d134deb4589fb74e6611a03
Reviewed-on: https://skia-review.googlesource.com/28624
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-07-31 16:49:12 +00:00
Cary Clark
1eace2db48 fix capitalization
Fix 'arcs' at sentence start to Arcs.
This fix corrected other capitalizations as well,
and exposed some mis-capitalizations in the bmh
doc.

R=brianosman@google.com
TBR=reed@google.com
Bug: skia:
Change-Id: I4d51388556f7e8ff868a9236ce76745915560327
Reviewed-on: https://skia-review.googlesource.com/28241
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-07-31 12:12:02 +00:00
Yuqian Li
93fe0ccd24 Enable delta AA by default
The earlier CL doesn't change the flag definition so it's not
turned on yet.

Bug: skia:
Change-Id: Id278ae5fc27d703ab7f6628bed95093d32cd7d0b
TBR: caryclark@google.com, fmalita@chromium.org
Reviewed-on: https://skia-review.googlesource.com/28161
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2017-07-29 18:14:50 +00:00
Cary Clark
0edfbb7824 fix output header in bookmaker
change underscore to space if needed
remove bmh_ prefix

TBR=caryclark@google.com
Bug: skia:
Change-Id: I9d4d29c7ff91d9d29bf8740d163724f371e5e211
Reviewed-on: https://skia-review.googlesource.com/28044
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-07-28 19:56:14 +00:00
Cary Clark
8032b983fa bookmaker initial checkin
bookmaker is a tool that generates documentation
backends from a canonical markup. Documentation for
bookmaker itself is evolving at docs/usingBookmaker.bmh,
which is visible online at skia.org/user/api/bmh_usingBookmaker

Change-Id: Ic76ddf29134895b5c2ebfbc84603e40ff08caf09
Reviewed-on: https://skia-review.googlesource.com/28000
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-07-28 15:30:38 +00:00
Ben Wagner
713195071d Remove internal use of SkTypeface::Style.
Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f
Reviewed-on: https://skia-review.googlesource.com/27760
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-07-27 21:30:45 +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
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
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
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
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
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
Mike Reed
ede7bac43f use unique_ptr for codec factories
Will need guards for android (at least)

Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-25 15:35:23 +00:00
Greg Daniel
02611d9afd Add Make[backend] calls for creating GrContexts
Docs-Preview: https://skia.org/?cl=26369
Bug: skia:
Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550
Reviewed-on: https://skia-review.googlesource.com/26369
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-25 14:33:03 +00:00
Mike Klein
b323a5ed1f sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNC
Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6
Reviewed-on: https://skia-review.googlesource.com/26361
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-24 20:02:07 +00:00
Mike Klein
3bf0042caa ok, basic tracing support
This doesn't do anything in the default process-per-task mode, because
those child tasks exit using _exit(), which doesn't trigger the event
tracer destructor to flush.

I don't remember exactly why I exit with _exit(), so I'm going to have
to follow up on that.  But written this way as I think I'm at least
initializing the tracing in the right place for each process for the
future.

In threaded (-j -1) and serial (-j 0) modes, everything seems to work
great.

I'm also thinking I might add a tracer like the SkDebugf tracer but
using ok_log(), which handles interlaced logging from concurrent tasks
better than vanilla SkDebugf.

Example:
    ninja -C out ok; and out/ok gm 8888 filter:search=fontmgr_bounds trace -j -1

Change-Id: Ia3cdad930ce65e6fd12fa74f3fb00894e35138d3
Reviewed-on: https://skia-review.googlesource.com/26350
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-24 19:22:05 +00:00
Mike Klein
1431e5ea69 ok, do not print time or memory use for skipped tests
Change-Id: I6feb4924ab67e1da08f923315ef6d3a580881b23
Reviewed-on: https://skia-review.googlesource.com/26340
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-24 17:37:56 +00:00
Brian Osman
bc8150feef Faster, thread-safe implementation
Bug: skia:
Change-Id: I401c5a9885c348aa424ab07b094acecddb209490
Reviewed-on: https://skia-review.googlesource.com/25860
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-24 17:13:05 +00:00
Mike Klein
fd51b2ba45 add suggested decode color type to colorspaceinfo
E.g.

~/skia (decode-as|✚1…) $ ninja -C out/ colorspaceinfo; and out/colorspaceinfo --input ~/Downloads/prophoto.png
    ninja: Entering directory `out/'
    [2/2] link colorspaceinfo
    SkCodec would naturally decode as colorType=RGBA_8888
    Color Profile Description:
    "Google/Skia/215028B4833C240E0583AFE600C80A79"
    ...

Change-Id: Id36efadaa84e9ffa5d67153e074be8a8426b6c42
Reviewed-on: https://skia-review.googlesource.com/26140
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-24 15:57:29 +00:00
Mike Reed
71f867c229 have resources return unique_ptr for stream
Bug: skia:
Change-Id: I649f4435d06704a5a581a481fe3c46b6ec677baf
Reviewed-on: https://skia-review.googlesource.com/26041
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-23 18:24:24 +00:00
Brian Osman
de6e5bf33f Tracing cleanup and bugfixes
TraceID was unused, remove it.

Simplify casting logic by using the same union helper as the macros.
This fixes a bug that was present in the bool handling - we were
treating the union value as a pointer, so we were dereferencing
random stack memory. Luckily it never crashes, we did get the wrong
values for bools.

Bug: skia:
Change-Id: I15d44756214f34c1f6479980d9a487ac7f3d8f6c
Reviewed-on: https://skia-review.googlesource.com/25801
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-21 20:57:27 +00:00
Ben Wagner
219f3622ba Add strikeout font metrics.
This also updates create_test_font so that it can be built, compiles,
and uses SkFontStyle instead of SkTypeface::Style.

BUG=b/63669723

Change-Id: I6eb0f851853f4721cf8e5052255b5b6750c3257f
Reviewed-on: https://skia-review.googlesource.com/24740
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-07-21 18:59:05 +00:00
Brian Osman
65e4c614f0 Add category support to JSON and SkDebugf tracing
Bug: skia:
Change-Id: I4d0bdb9d954e49b79ace0552d7b74b36a512c00d
Reviewed-on: https://skia-review.googlesource.com/25642
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-21 16:38:23 +00:00
Brian Osman
53136aa93f First stab at JSON event tracer
Not yet thread safe (so it forces threading off).
Builds JSON on the fly, so overhead is certainly bad.
Plan to fix all of that, but this at least "works".

There is now one tracing flag: 'trace'.
- 'debugf' installs the SkDebugf tracer.
- 'atrace' installs the Android ATrace tracer.
- Any other value is interpreted as a filename, and
  produces a JSON file for chrome://tracing.

All three modes work in DM, nanobench, and Viewer.

Bug: skia:
Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364
Reviewed-on: https://skia-review.googlesource.com/24781
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-20 20:11:22 +00:00
Mike Klein
45c16fa82c convert over to 2d-mode
[√] convert all stages to use SkJumper_MemoryCtx / be 2d-compatible
 [√] convert compile to 2d also, remove 1d run/compile
 [√] convert all call sites
 [√] no diffs

Change-Id: I3b806eb8fe0c3ec043359616409f7cd1211a1e43
Reviewed-on: https://skia-review.googlesource.com/24263
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-07-20 19:50:32 +00:00
Brian Salomon
d17f6584df Remove GrBackendTextureDesc
Change-Id: I2b123d1782400e97ab2ce2f11e3e3d325a13e6c8
Reviewed-on: https://skia-review.googlesource.com/24748
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-20 00:21:18 +00:00
Greg Daniel
81e7bf8d6d Update gpu caps for valid sample counts.
Instead of query and maxSampleCount and using that to cap, we now have
each config store its supported values and when requested returns either
the next highest or equal supported value, or if non the max config supported.

Bug: skia:
Change-Id: I8802d44c13b3b1703ee54a7e69b82102d4b8dc2d
Reviewed-on: https://skia-review.googlesource.com/24302
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-19 19:13:25 +00:00
Brian Salomon
e5b399ee69 Remove GrLegacyMeshDrawOp and GrPipelineBuilder
Change-Id: Ib301a0e7d4b4c4f05417d28862017307949748c9
Reviewed-on: https://skia-review.googlesource.com/23584
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-19 18:16:05 +00:00
Brian Salomon
dcbb9d90db Add SkDebugf trace event handler.
Also adds more trace events to GPU backend.

Change-Id: Ifa5f0cd4b1fd582f0cc30d37d9e6414dc498c75d
Reviewed-on: https://skia-review.googlesource.com/24622
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-19 15:41:34 +00:00
Brian Salomon
fc26f3ca5f Remove GrAnalyticRectOp, the last legacy GrMeshDrawOp
Change-Id: I2b8d1f4c1585af4a157d269a526874bccc74ac81
Reviewed-on: https://skia-review.googlesource.com/23484
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-19 15:21:05 +00:00
Brian Salomon
44acb5b09b Revert "Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp""
This reverts commit e3e9628ecf.

Adds blendmode_mask_* benchs to blacklist for Chromecast.
Otherwise a clean revert of the revert.

Bug: skia:
Change-Id: I9f64ae55804fa4aad97c1785834281039570c56c
Reviewed-on: https://skia-review.googlesource.com/24409
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-19 12:17:34 +00:00
Ravi Mistry
863ffef385 Do not move over webpage archives, they are needed for capturing SKPs
NoTry: true
Bug: skia:6850
Change-Id: I35ac2c10ae58561ab5424033d9bb5e14b75c526f
Reviewed-on: https://skia-review.googlesource.com/24327
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-07-18 17:29:14 +00:00
Mike Reed
086a427b0c guard references to SkColorTable
Bug: skia:6828
Change-Id: I0c8c78e70b118f51cb59dc45675e4ddcd4776108
Reviewed-on: https://skia-review.googlesource.com/24260
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-07-18 15:50:43 +00:00
Mike Reed
262b319dcd Index8 is dead, remove guarded code
Needs google3 to be updated before this can land.

Bug: skia:6828
Change-Id: I2c16be13c6937ffa48768cc24f9f980171c824d6
Reviewed-on: https://skia-review.googlesource.com/23940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-17 20:37:28 +00:00
Brian Salomon
ce5ee602ed Add support for GL 565 and 4444 configs to test tools
Change-Id: I395e3387df44cf5370fef6ab73db73228225622f
Reviewed-on: https://skia-review.googlesource.com/23946
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-17 17:09:08 +00:00
Brian Salomon
e3e9628ecf Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp"
This reverts commit 434a58ab5f.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Make GrAtlasTextOp a non-legacy GrMeshDrawOp
> 
> Change-Id: Ib9eaf149100b0ccecf1c18a755263f2579b8e6f6
> Reviewed-on: https://skia-review.googlesource.com/23482
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=jvanverth@google.com,bsalomon@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I7fd8503b4e0c297b2cfaf979545354aa58d1f989
Reviewed-on: https://skia-review.googlesource.com/23760
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-17 13:08:38 +00:00
Chris Dalton
1a325d25b9 Coverage counting path renderer
Initial implementation of a GPU path renderer that draws antialiased
paths by counting coverage in an offscreen buffer.

Initially disabled until it has had time to soak.

Bug: skia:
Change-Id: I003d8cfdf8dc62641581b5ea2dc4f0aa00108df6
Reviewed-on: https://skia-review.googlesource.com/21541
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-14 21:45:35 +00:00
Brian Salomon
434a58ab5f Make GrAtlasTextOp a non-legacy GrMeshDrawOp
Change-Id: Ib9eaf149100b0ccecf1c18a755263f2579b8e6f6
Reviewed-on: https://skia-review.googlesource.com/23482
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-14 20:24:15 +00:00
Greg Daniel
2811aa25f1 Add metal config to tools
Bug: skia:
Change-Id: I84dbd56c17d4856496af4491f340ec560e29c8a6
Reviewed-on: https://skia-review.googlesource.com/23200
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-14 13:57:34 +00:00
Brian Salomon
b295573c93 Move GrAALinearizingConvexPathRenderer off GrLegacyMeshDrawOp
Change-Id: I7d3c4053d4a833215371d77de683964cef317a5c
Reviewed-on: https://skia-review.googlesource.com/20460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-13 21:52:14 +00:00
Greg Daniel
b76a72a659 Add support for creating a GrContext backed by Metal.
Also adds the support code to allow our TestContext to create a Metal
backend.

Bug: skia:
Change-Id: Ia850687019d79b897bb16e2c151f4f8526721ad9
Reviewed-on: https://skia-review.googlesource.com/22644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-13 21:29:33 +00:00
Brian Salomon
ee3e0bacc8 Make DefaultPathOp a non-legacy GrMeshDrawOp
Change-Id: I9abc795e7c3aca7c129faee48190be749c6dc159
Reviewed-on: https://skia-review.googlesource.com/23101
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-13 21:09:14 +00:00
Brian Salomon
c2f425440a Make GrDrawVerticesOp a non-legacy GrMeshDrawOp
Change-Id: I0e1e6815ed41764115bc84a5967b3da3be4ce147
Reviewed-on: https://skia-review.googlesource.com/22722
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-13 20:39:53 +00:00
Brian Salomon
0088f94817 Make GrDrawAtlasOp a non-legacy GrMeshDrawOp
Change-Id: I4d517855dbe3ee6894d7d457e0fc4488f204300c
Reviewed-on: https://skia-review.googlesource.com/22542
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-13 18:39:23 +00:00
Brian Salomon
0596909b05 Make ShadowRRectOp a non-legacy GrMeshDrawOp
This also removes the ability to have an arbitrary GrPaint with this op and as a consequence simplifies the op and its GrGeometryProcessor.

Change-Id: I19cc1c6f73a47e8925fc826291aad42e9423164d
Reviewed-on: https://skia-review.googlesource.com/22380
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-07-13 15:46:32 +00:00
Mike Reed
580501382f Guard to remove kIndex_8_SkColorType
Bug: skia:6828
Change-Id: Ia942a36abb18213184f8d436555a658270d97d47
Reviewed-on: https://skia-review.googlesource.com/22721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-07-13 10:44:42 +00:00
Brian Salomon
f0366326cc Make RegionOp a non-legacy GrMeshDrawOp
Also add a test factory function.

Change-Id: I612973312824a4ba358965ce8378160a980b86fa
Reviewed-on: https://skia-review.googlesource.com/22213
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-13 00:45:51 +00:00
Greg Daniel
6b7e0e2c74 Add arc support to gpu Obj c++ code
This is mainly for getting ready to start adding lots of metal backend code.
I've also update the "gpu tools" target to require ARC with involved updating
one IOS file in there.

Bug: skia:
Change-Id: Ied22e8fe7532445cc274efb529e3450654a6614b
Reviewed-on: https://skia-review.googlesource.com/22484
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-12 20:49:32 +00:00
Brian Osman
80a82dff82 On Windows, always re-create window for GL or Vulkan
On at least one machine, I've seen SetPixelFormat fail after Vulkan was
used to render to a window, preventing us from creating a GL context.
This is ham-fisted, but solves the problem.

Bug: skia:
Change-Id: I76d0cb26e181304846aa06109c1af768f8363a18
Reviewed-on: https://skia-review.googlesource.com/22740
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-12 20:31:38 +00:00
Brian Salomon
98222ac41d Revert "Revert "Make DashOp a non-legacy GrMeshDrawOp.""
This reverts commit beae8a9faa.

Clean revert of revert.

Change-Id: Ibb486bf3411ed347b560fc110a2cfbb0e0caa4f2
Reviewed-on: https://skia-review.googlesource.com/22730
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-12 20:25:46 +00:00
Mike Reed
304a07c6c9 remove references to kIndex_8_SkColorType from our tools/tests
Bug: skia:6828
Change-Id: Ib5049c28c11b7320bece20f5a0a886de8b2a4343
Reviewed-on: https://skia-review.googlesource.com/22728
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-12 20:25:44 +00:00
Brian Salomon
beae8a9faa Revert "Make DashOp a non-legacy GrMeshDrawOp."
This reverts commit ebb38256c6.

Reason for revert: Assertions on ANGLE bots

Original change's description:
> Make DashOp a non-legacy GrMeshDrawOp.
> 
> Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab
> Reviewed-on: https://skia-review.googlesource.com/22210
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I886a0bd75221f05d737d8b27c6b3d8d6cce5573c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-12 16:59:04 +00:00
Mike Reed
6409f84fc3 Revert "Revert "Change image encode api to return sk_sp""
This reverts commit 64778d9f27.

Bug: skia:
Change-Id: I779515ff1e16a40c33890a4bac7a8a07171aadfe
Reviewed-on: https://skia-review.googlesource.com/22261
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-12 15:44:35 +00:00
Brian Salomon
ebb38256c6 Make DashOp a non-legacy GrMeshDrawOp.
Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab
Reviewed-on: https://skia-review.googlesource.com/22210
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-12 15:44:33 +00:00
Brian Salomon
febbd23eb7 Make SmallPathOp a non-legacy GrMeshDrawOp
Change-Id: I7fd0739d7bae9176e816772b3aed54528c4fa576
Reviewed-on: https://skia-review.googlesource.com/21865
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-07-12 13:13:35 +00:00
Mike Reed
64778d9f27 Revert "Change image encode api to return sk_sp"
This reverts commit dc799550e2.

Reason for revert: need to fix sites in Document_none

Original change's description:
> Change image encode api to return sk_sp
> 
> Bug: skia:
> Change-Id: I238289bc630be27795cb1384955dd6e887597c05
> Reviewed-on: https://skia-review.googlesource.com/22208
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=scroggo@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Id7f67027e5f1405a60fdbde29863cdf8daef0cb7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22280
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-11 16:00:32 +00:00
Mike Reed
dc799550e2 Change image encode api to return sk_sp
Bug: skia:
Change-Id: I238289bc630be27795cb1384955dd6e887597c05
Reviewed-on: https://skia-review.googlesource.com/22208
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-07-11 15:43:21 +00:00
Brian Salomon
9530f7ebf5 Revert "Revert "Make TessellatingPathOp be a non-legacy GrMeshDrawOp""
This reverts commit 7343c197fc.

The initial revert was because the random test factory was choosing msaa as the aatype when the render target was not msaa, triggering and assert.

Bug: skia:
Change-Id: I1bfec86492b69af1101c65d249140af804c16684
Reviewed-on: https://skia-review.googlesource.com/22203
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-11 15:29:32 +00:00
Brian Salomon
815486c42f Convert NonAALatticeOp to non-legacy GrMeshDrawOp.
Also adds a test factory and fixes a bug in the lattice iter validator where it compared each div value against the start rather than the previous div.

Bug: skia:
Change-Id: I30e9ddfcbaab7829a2f646ad851f99d1e518ab4a
Reviewed-on: https://skia-review.googlesource.com/21871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-11 13:39:21 +00:00
Hal Canary
a8565e502d ICC: SkICCGetColorProfileTag supports special cases
Special cases:
  - "sRGB"
  - "AdobeRGB"
  - "DCI-P3"
  - "Linear Transfer with sRGB Gamut"
  - "2.2 Transfer with sRGB Gamut"
  - "sRGB Transfer with DCI-P3 Gamut"
  - "Linear Transfer with DCI-P3 Gamut"
  - "sRGB Transfer with Rec-BT-2020 Gamut"
  - "Linear Transfer with Rec-BT-2020 Gamut"

tools/colorspaceinfo now prints out the Tag.

Also: constants representing gSRGB_TransferFn, g2Dot2_TransferFn, and
gLinear_TransferFn, gDCIP3_TransferFn.

BUG=skia:6720
Change-Id: I92a3f9db9d744d3ec366e4e59afd759ba043c235
Reviewed-on: https://skia-review.googlesource.com/20225
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-07-10 17:08:28 +00:00