Commit Graph

3313 Commits

Author SHA1 Message Date
Florin Malita
b632df701d Use SkJSONWriter for viewer UI serialization
+ drop JsonCPP dependency.

Bug: skia:
Change-Id: I81539cea6e495fe6d55d155ae49e7ac4a79faad6
Reviewed-on: https://skia-review.googlesource.com/135628
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-06-19 13:53:00 +00:00
Ben Wagner
f08d1d0ce1 Stop using SkTSwap.
Use std::swap instead. It does not appear that any external user
specializes SkTSwap, but some may still use it. This removes all use in
Skia so that SkTSwap can later be removed in a smaller CL. After that
the <utility> include can be removed from SkTypes.h.

Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753
Reviewed-on: https://skia-review.googlesource.com/135578
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-19 02:06:31 +00:00
Chris Dalton
4da70190aa ccpr: Implement path mask caching
Implement caching as follows:

1) Instead of deleting the mainline ccpr atlas when finished, stash it
   away from flush to flush.

2) On subsequent flushes, check the stashed atlas to see if we can
   reuse any of its cachable paths. Copy reusable paths into 8-bit
   literal coverage atlases and store them in the resource cache.

3) Recycle the stashed atlas texture for the remaining paths in the
   flush.

Bug: skia:
Change-Id: I9b20fbea708646df1df3a5f9c044e2299706b989
Reviewed-on: https://skia-review.googlesource.com/134703
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-06-18 16:14:28 +00:00
Cary Clark
b7a72a5017 fix bookmaker
make deleted constructors private
fix indexing bug that finds private methods

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

Bug: skia:6898
Change-Id: I86c0bafbb7c56131c503054e021ec844731c900d
Reviewed-on: https://skia-review.googlesource.com/135058
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-06-15 09:42:24 +00:00
Cary Clark
a740190722 do not mistake locals for methods
bookmaker parsed xxx(xxx) as a method but in this case
fXxx(xxx) was a local initialization. Look for 'f' followed
by an upper case letter to know the difference.

TBR=csmartdalton@google.com

Bug: skia:6898
Change-Id: Ie0138d9412bc6c06915af81a5b83cbd7e83ebef6
Reviewed-on: https://skia-review.googlesource.com/135041
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-06-14 19:57:34 +00:00
Cary Clark
5538c13906 docs fix external substitutions
explict substitutions are required to distiguish words
that preserve underscores

R=caryclark@google.com

Docs-Preview: https://skia.org/?cl=134841
Bug: skia:6898
Change-Id: Id1a5669c180e03e048de3c0251882bd06b297283
Reviewed-on: https://skia-review.googlesource.com/134841
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-14 16:54:47 +00:00
Hal Canary
c640d0dc96 Revert "Revert "SkTypes: extract SkTo""
This reverts commit fdcfb8b7c2.

> Original change's description:
> > SkTypes: extract SkTo
> >
> > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> > Reviewed-on: https://skia-review.googlesource.com/133620
> > Reviewed-by: Mike Klein <mtklein@google.com>

Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa
Reviewed-on: https://skia-review.googlesource.com/134506
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 14:55:17 +00:00
Robert Phillips
a058b3e919 Revert "Add --gpuThreads support to skpbench.py"
This reverts commit 2f14f21acb.

Reason for revert: python

Original change's description:
> Add --gpuThreads support to skpbench.py
> 
> Change-Id: Ib5c7ed0fd28ebf734168bc0377d643bbddf70e65
> Reviewed-on: https://skia-review.googlesource.com/134601
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I428a8b6d7cf945c8609a36cf5c912d6ebc517201
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/134640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-13 19:02:11 +00:00
Robert Phillips
2f14f21acb Add --gpuThreads support to skpbench.py
Change-Id: Ib5c7ed0fd28ebf734168bc0377d643bbddf70e65
Reviewed-on: https://skia-review.googlesource.com/134601
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-13 18:41:46 +00:00
Robert Phillips
f18c756360 Pull non-substantive changes out of omnibus CL
https://skia-review.googlesource.com/c/skia/+/131500 (Move op memory
storage to GrContext) is still a bit of a monster. Offload the trivial
stuff.

Change-Id: I27eb0c441d08111491b3cfee3b93d260c26c2790
Reviewed-on: https://skia-review.googlesource.com/134501
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-06-13 18:07:58 +00:00
Hal Canary
fdcfb8b7c2 Revert "SkTypes: extract SkTo"
This reverts commit 2a2f675926.

Reason for revert: this appears to be what is holding up the Chrome roll.

Original change's description:
> SkTypes: extract SkTo
>
> Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> Reviewed-on: https://skia-review.googlesource.com/133620
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,halcanary@google.com

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae
Reviewed-on: https://skia-review.googlesource.com/134504
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-13 13:45:47 +00:00
Hal Canary
2a2f675926 SkTypes: extract SkTo
Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
Reviewed-on: https://skia-review.googlesource.com/133620
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-12 15:03:21 +00:00
Cary Clark
efd99cc928 clean up SkPicture include
Get SkPicture.h ready for documenting.

- remove private methods
- move private forward declarations
- name parameters

R=reed@google.com, bsalomon@google.com

Bug: skia:6898
Change-Id: I28829111203d8ae2a4661cf02c99023403aa0df0
Reviewed-on: https://skia-review.googlesource.com/134120
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-06-12 13:56:33 +00:00
Cary Clark
27dddae313 rebase
This reverts commit 32a4910e57.

Reason for revert: SkMatrix::toString use has been removed from flutter
and has been picked up in fuchsia

Additionally some bookmaker changes take into account recent
additions of typedef comments and the generated header comment.

Original change's description:
> Revert "remove toString"
>
> This reverts commit 5191880cbf.
>
> Reason for revert: broke flutter
>
> Original change's description:
> > remove toString
> >
> > toString may have been used by obsolete debugger only
> > find out if that is so
> >
> > R=​brianosman@google.com,bsalomon@google.com
> >
> > Docs-Preview: https://skia.org/?cl=119894
> > Bug:830651
> > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > Reviewed-on: https://skia-review.googlesource.com/119894
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
>
> Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c

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

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

Reviewed-on: https://skia-review.googlesource.com/129623
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Docs-Preview: https://skia.org/?cl=133583
Bug: 830651
Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b
Reviewed-on: https://skia-review.googlesource.com/133583
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-08 20:36:53 +00:00
Ben Wagner
d2ae4df90d Add text size override to Viewer.
In some cases issues only happen when the actual requested text size on
a paint is a particular size. Allow overriding the text size on the
paint for such testing.

Change-Id: Ic719ea36ba9d624725d443cbd563283628606f2d
Reviewed-on: https://skia-review.googlesource.com/133446
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-06-08 18:49:04 +00:00
Cary Clark
b94f6da248 fix define comments
add generated comment for includes

R=caryclark@google.com

Docs-Preview: https://skia.org/?cl=132924
Bug: skia:6898
Change-Id: I42034e2753ed079dd0d0e3ae99f976d32ffaf77a
Reviewed-on: https://skia-review.googlesource.com/132924
Reviewed-by: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-06-08 16:31:02 +00:00
Cary Clark
0d225395fa generate SkColor include
bookmaker can now generate SkColor.h
This required adding support for #define, typedef,
global constexpr, and fixing various bugs, like
forward declared structs between comments.

Docs-Preview: https://skia.org/?cl=131260
Bug: skia:6898
TBR=caryclark@google.com
Change-Id: I6bee0c6f5c3a6820b04472a318abde8a2523dbbb
Reviewed-on: https://skia-review.googlesource.com/131260
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-07 14:22:38 +00:00
Cary Clark
3a4a3215f5 fix ops for very close rects
Pathops sorts line intersections to determine which edges to keep.
If the intersections are very short, they may get discarded and the
adjacent edge is used instead.

If a pair of edges are 180 degrees apart, and an adjacent edge is
part of the sort, it is ambiguous whether it is inside or outside
the span. Add logic to look for this and evaluate the original data
rather than the adjacent edge.

In a separate CL, I'll add a specialization for rect/rect ops.

R=halcanary@google.com
Bug: skia:8049
Change-Id: I8d88d5520051d41303ea683e7d6b844f2afa9937
Reviewed-on: https://skia-review.googlesource.com/132661
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-06-06 20:27:34 +00:00
Brian Salomon
7258e97e8e C++14
Change-Id: I4bbf3e5e6d9d4e11e968a0bc88ce43444047a382
Reviewed-on: https://skia-review.googlesource.com/130903
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-04 13:22:49 +00:00
Brian Osman
2b23c4bf31 Dest color space no longer impacts mipmaps or texture sampling
PS5: Removes SkDestinationSurfaceColorMode, tracking of mipmap
mode on GrTexture, sRGB decode state per-texture. Because we
were often choosing sRGB configs for RGB color types, legacy
rendering would then be incorrect (too dark). So...

PS7: Stops ever using sRGB pixel configs when translating
image info or color type. Also removes a bunch of GrCaps bits
and a GrContextOption that are no longer relevant.

PS9: Adjusts surface creation unit test expectations, and
changes the raster rules accordingly.

At this point, sRGB configs are (obviously) going to be broken.

Locally, I ran 8888, gl, and the gbr- versions of both. Across
all GMs x configs, there are 13 diffs. 12 are GMs that create
surfaces with a color-space attached (and thus, the offscreen
is no longer getting sRGB pixel config). The only remainder
constructs an SkPictureImageGenerator, (with an attached color
space) and renders it to the gbr-gl canvas, which triggers a
a tagged surface inside the generator.

Bug: skia:
Change-Id: Ie5edfa157dd799f3121e8173fc4f97f6c8ed6789
Reviewed-on: https://skia-review.googlesource.com/131282
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-01 17:00:26 +00:00
Hal Canary
39ccf5d386 Fix compile when SK_XML undefined
Change-Id: Ia23b07434939acbf544854b94c4b10810c20ae1a
Reviewed-on: https://skia-review.googlesource.com/131221
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-01 14:30:56 +00:00
Florin Malita
911ae4066e [skottie] Remove inPoint/outPoint/frameRate from public API
TBR=
Change-Id: Ice4de3abe350c4570c22e859a36dbd445527fa41
Reviewed-on: https://skia-review.googlesource.com/131300
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-06-01 13:10:15 +00:00
Brian Osman
c7ad40f76f Remove SK_SUPPORT_GPU checks in tool-only code
Most of this is (obviously) not necessary to do, but once
I started, I figured I'd just get it all. Tools (nanobench,
DM, skiaserve), all GMs, benches, and unit tests, plus support
code (command line parsing and config stuff).

This is almost entirely mechanical.

Bug: skia:
Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb
Reviewed-on: https://skia-review.googlesource.com/131153
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-31 18:59:44 +00:00
Robert Phillips
65eb4fba7e Add DDL skpbench bot for just DDL recording time
Change-Id: If75799bfd719ccc47c2064571723e6852c07bfaa
Reviewed-on: https://skia-review.googlesource.com/131144
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-05-31 17:56:26 +00:00
Hal Canary
0390d3e36b skqp: update apk list script
Change-Id: I3e8cfdc246d6f264675b307c1f5004438f3ed8b6
Reviewed-on: https://skia-review.googlesource.com/131142
Reviewed-by: Hal Canary <halcanary@google.com>
2018-05-31 16:46:40 +00:00
Robert Phillips
9619c49942 Add DDL parameters to skpbench.py
This needs to land before https://skia-review.googlesource.com/c/skia/+/130923 (Add a DDL Skpbench bot)

Change-Id: I50a6308350fd62c696eedd0fdccd42dd7dfb0d53
Reviewed-on: https://skia-review.googlesource.com/131102
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2018-05-31 13:17:43 +00:00
Cary Clark
89ad31e97c Revert "Reland "remove toString""
This reverts commit 92e37b6d79.

Reason for revert: toString still used by flutter

Original change's description:
> Reland "remove toString"
> 
> This reverts commit 32a4910e57.
> 
> Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia
> 
> Original change's description:
> > Revert "remove toString"
> > 
> > This reverts commit 5191880cbf.
> > 
> > Reason for revert: broke flutter
> > 
> > Original change's description:
> > > remove toString
> > > 
> > > toString may have been used by obsolete debugger only
> > > find out if that is so
> > > 
> > > R=​brianosman@google.com,bsalomon@google.com
> > > 
> > > Docs-Preview: https://skia.org/?cl=119894
> > > Bug:830651
> > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > > Reviewed-on: https://skia-review.googlesource.com/119894
> > > Commit-Queue: Cary Clark <caryclark@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> > 
> > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: 830651
> > Reviewed-on: https://skia-review.googlesource.com/129340
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Cary Clark <caryclark@google.com>
> 
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 830651
> Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34
> Reviewed-on: https://skia-review.googlesource.com/129623
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

Change-Id: Iafc59ffc1b3db67c520ba31bf12d68e1b46c0ea2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 830651
Reviewed-on: https://skia-review.googlesource.com/131082
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-31 12:27:44 +00:00
Cary Clark
92e37b6d79 Reland "remove toString"
This reverts commit 32a4910e57.

Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia

Original change's description:
> Revert "remove toString"
> 
> This reverts commit 5191880cbf.
> 
> Reason for revert: broke flutter
> 
> Original change's description:
> > remove toString
> > 
> > toString may have been used by obsolete debugger only
> > find out if that is so
> > 
> > R=​brianosman@google.com,bsalomon@google.com
> > 
> > Docs-Preview: https://skia.org/?cl=119894
> > Bug:830651
> > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> > Reviewed-on: https://skia-review.googlesource.com/119894
> > Commit-Queue: Cary Clark <caryclark@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org
> 
> Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 830651
> Reviewed-on: https://skia-review.googlesource.com/129340
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Cary Clark <caryclark@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

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

Bug: 830651
Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34
Reviewed-on: https://skia-review.googlesource.com/129623
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-31 11:43:13 +00:00
Ravi Mistry
35b40ce7af Revert "Check for ANGLE's implementation of texture_rectangle"
This reverts commit 00f8866a32.

Reason for revert: Seems to be breaking angle test bots. Eg:
https://chromium-swarm.appspot.com/task?id=3dcb7f58728de610&refresh=10

Original change's description:
> Check for ANGLE's implementation of texture_rectangle
> 
> ANGLE has implemented extension to support for texture_rectangle. Check
> for its existence as well as GL_ARB_texture_rectangle extension.
> 
> Intended to follow up on Chrome side to avoid copy into texture 2d for
> PaintCanvasVideoRenderer.
> 
> Bug: skia:7903
> Change-Id: I450aa7fcd08628831251a9e142fd50719723282d
> Reviewed-on: https://skia-review.googlesource.com/130962
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Weiliang Chen <weiliangc@chromium.org>

TBR=bsalomon@google.com,weiliangc@chromium.org

Change-Id: I9fbf9ff314ffcf3abcc5275bd68124f4b329da21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7903
Reviewed-on: https://skia-review.googlesource.com/131060
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2018-05-30 20:54:49 +00:00
Brian Osman
a15cedbc26 Clean up GPU configs in DM
Remove wide and narrow, adjust remaining configs to match the new CPU
configs, and fix several formatting problems in the help output.

Bug: skia:
Change-Id: I0946ac407d88a922e7f62220e7f4b39ae8c2e469
Reviewed-on: https://skia-review.googlesource.com/131000
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-30 20:10:38 +00:00
Weiliang Chen
00f8866a32 Check for ANGLE's implementation of texture_rectangle
ANGLE has implemented extension to support for texture_rectangle. Check
for its existence as well as GL_ARB_texture_rectangle extension.

Intended to follow up on Chrome side to avoid copy into texture 2d for
PaintCanvasVideoRenderer.

Bug: skia:7903
Change-Id: I450aa7fcd08628831251a9e142fd50719723282d
Reviewed-on: https://skia-review.googlesource.com/130962
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Weiliang Chen <weiliangc@chromium.org>
2018-05-30 20:04:48 +00:00
Cary Clark
137b874855 generate include comments
- formalize how aliases and substitutions work together
- add constexpr, #define, typedef support
- check for correct description order
- write short enum, struct members

R=caryclark@google.com

Docs-Preview: https://skia.org/?cl=129455
Bug: skia:6898
Change-Id: Id60fc2ed02f38a7ba4e5cad5ef493d8c674e6183
Reviewed-on: https://skia-review.googlesource.com/129455
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-05-30 13:46:38 +00:00
Robert Phillips
96601084b3 Add DDL to SKPBench
Most of this CL is just repackaging the promise image and tile
code from ViaDDL for reuse by SKPBench.

Change-Id: Ie5003c36fe85cc5be9639552f9488b8e92dcdbbf
Reviewed-on: https://skia-review.googlesource.com/129805
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-05-30 10:12:08 +00:00
Herb Derby
264182c3f7 Make SkShaper a module
Change-Id: I3709e49ba865f14260660cc07a762b9ac837cb3c
Reviewed-on: https://skia-review.googlesource.com/130602
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-30 04:04:07 +00:00
Brian Osman
b6e035ee08 Enable skcms on skqp
Prelude to skcms becoming non-optional

Change-Id: Ic60ab1b26f3383b08611f62ac2304e32508f9b8a
Reviewed-on: https://skia-review.googlesource.com/130640
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-29 21:38:37 +00:00
Brian Osman
c7611088f0 Implement onDrawDrawable in SkDebugCanvas
It now implements all canvas virtuals, so enable the enforcer.

Change-Id: Ic7e97e29ec143f72cd0ea6c6504345133b8f543e
Reviewed-on: https://skia-review.googlesource.com/130560
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-29 20:50:07 +00:00
Brian Osman
65197ff1ac SkDrawCommand cleanup, continued
- Removes all remaining manual memory management

Change-Id: I3e9ed4e186082a13b46a2d2de295cbeb0cf9a449
Reviewed-on: https://skia-review.googlesource.com/130542
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-29 20:44:47 +00:00
Brian Osman
8363be1a00 SkDrawCommand cleanup
- Remove fromJSON factories. These were unused, and many were
  incomplete or incorrect.
- Remove accessor methods (all unused) on command classes.
- Some commands used SkTLazy for optional params, others used
  manually initialized storage + pointer. (A few used strange
  sentinel values like empty rect or identity matrix). Switch
  to SkTLazy everywhere, and use the constructor that takes a
  pointer to simplify initialization in all cases.
- Use RAII for more fields (SkTDArray and sk_sp). There are a
  few of these left in the drawText commands, but that's it.

Change-Id: I34a87ad27c5efe0b94e5ae74b59a99f66a4e4cfa
Reviewed-on: https://skia-review.googlesource.com/130510
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-29 19:22:06 +00:00
Florin Malita
a33447dab9 [skottie] Animation::animationTick() -> Animation::seek()
Replace poorly defined animationTick() with a normalized seek() method.

TBR=
Change-Id: Id2ea17bb426fe86fede0d6c8a3d93236902f10af
Reviewed-on: https://skia-review.googlesource.com/130508
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-05-29 18:58:16 +00:00
Joe Gregorio
8e9810ce0f [fiddle] Init gpu using the GLTestContext.
The previous way was failing with SwiftShader.

Bug: skia:
Change-Id: I6f3937d4d3bc36851476e29be891dc0a38871ef0
Reviewed-on: https://skia-review.googlesource.com/130325
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-29 18:20:46 +00:00
Brian Osman
616f1cb456 Added drawAtlas support to SkDebugCanvas
No serialization yet (like drawVertices, etc...), but should support
capture and playback.

Change-Id: I7b54cc95fb828471a8faa6abd4eaca0ad0d2cb70
Reviewed-on: https://skia-review.googlesource.com/130503
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-29 15:44:35 +00:00
Florin Malita
3d856bdeee [skottie] Relocate to modules/skottie
TBR=
Change-Id: I218d251ca56578a3a7fd4fb86cba9abdc10fb3bd
Reviewed-on: https://skia-review.googlesource.com/130322
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-05-27 02:21:33 +00:00
Florin Malita
3b526b05d6 "Modularize" SkSG
* relocate all SkSG-related files under modules/sksg/
* fix various tidbits to make non-sksg builds possible
* drop obsolete SampleSGInval.cpp

Change-Id: I54e6c5bb1a09f45030fa8d607b3eb3f7cba78957
Reviewed-on: https://skia-review.googlesource.com/130025
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-25 17:11:52 +00:00
Brian Salomon
8a8dd33e18 Make SkImage own its GrContext.
Change-Id: I86577fab5406ae9ad89d87fa971b0db6e0283cb4
Reviewed-on: https://skia-review.googlesource.com/130020
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-05-24 19:34:19 +00:00
Greg Daniel
6ddbafcc89 Move vulkan layout helpers from GrVkMemory to GrVkImage.
Bug: skia:
Change-Id: Iebcf5844a0b469dea1e96e351f91239ff512f708
Reviewed-on: https://skia-review.googlesource.com/129934
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-24 16:58:38 +00:00
Derek Sollenberger
749f621376 Remove "/" from the generated jUnit method names.
The "/" character is not a valid character for method names in the
CTS testing environment and is causing problems with some of the
tooling so we are replacing the "/" with "_".

Bug: b/80096930
Change-Id: Icdf790b0975f7c4205153887ffabaaaa85f07592
Reviewed-on: https://skia-review.googlesource.com/129581
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2018-05-23 15:12:41 +00:00
Ben Wagner
5ec237d933 IWYU for tools/fiddle/egl_context.cpp
There is no reason for this particular file to pull in the massive
fiddle_main.h.

Change-Id: I4ac8fa6195a78ce5adf2890cab694cfb2bd0660c
Reviewed-on: https://skia-review.googlesource.com/129452
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-22 21:26:55 +00:00
Brian Osman
e19e23fa0c Clip to perspective quad in viewer
For GMs that draw content outside the window, this ensures that fake
and real perspective look more similar.

Change-Id: I5fd2372a21a0b6c04cb33ddef4ff53aebda1c43d
Reviewed-on: https://skia-review.googlesource.com/129454
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-05-22 21:26:15 +00:00
Greg Daniel
91dfa3b571 Reland "Move gn setup for vulkan library/headers into their own third_party directory."
This reverts commit 2c2a119f94.

Reason for revert: Relanding with fixes

Original change's description:
> Revert "Move gn setup for vulkan library/headers into their own third_party directory."
> 
> This reverts commit 477094250c.
> 
> Reason for revert:
> I think we know this broke the MoltenVK bots.  It also appears to have broken the Fuchsia roll: https://logs.chromium.org/v/?s=fuchsia%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8945885190914943680%2F%2B%2Fsteps%2Fbuild%2F0%2Fsteps%2Fbuild_fuchsia%2F0%2Fsteps%2Fgn_gen%2F0%2Fstdout
> 
> Original change's description:
> > Move gn setup for vulkan library/headers into their own third_party directory.
> > 
> > Bug: skia:
> > Change-Id: I4605f0d962271efb77bf3c17f1b0daaaddfb51c8
> > Reviewed-on: https://skia-review.googlesource.com/128540
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bungeman@google.com
> 
> Change-Id: I6e41d98e39883eff34424a2f352b0c8adec178db
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/129444
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Bug: skia:
Change-Id: I26b4b1f7196dd1bd8bf2e7641ef741c90c742c81
Reviewed-on: https://skia-review.googlesource.com/129445
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-22 19:08:05 +00:00
Ben Wagner
b918e9865a Remove include/gpu/gl from include paths.
This path is not used as an include path by public.bzl nor by Chromium.
Remove this include path to avoid breaking these clients and generally
make these includes more specific.

Change-Id: I9391d38d5241870086bf47cb8e49146736dc4ded
Reviewed-on: https://skia-review.googlesource.com/129561
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-22 18:37:25 +00:00
Ben Wagner
d90cd3b279 Revert "Revert "IWYU for tests starting with 'D'.""
This reverts commit edf8449d2c.

Change-Id: Ibeedd9965855b3ccfe44486d15307bf3da15fd9c
Reviewed-on: https://skia-review.googlesource.com/129516
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-22 17:12:35 +00:00
Mike Klein
edf8449d2c Revert "IWYU for tests starting with 'D'."
This reverts commit b5f2897ab5.

Reason for revert: looks like this broke the build for DM in Google3.  Need more include dirs there?

Original change's description:
> IWYU for tests starting with 'D'.
> 
> Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d
> Reviewed-on: https://skia-review.googlesource.com/129319
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=bsalomon@google.com,bungeman@google.com,herb@google.com

Change-Id: I01aac7dae6114685a0652cbde3defccc8a42caea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/129443
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-22 12:23:15 +00:00
Ben Wagner
b5f2897ab5 IWYU for tests starting with 'D'.
Change-Id: I9189e4b56ce1635b627119733447c2ed4220753d
Reviewed-on: https://skia-review.googlesource.com/129319
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-21 19:34:48 +00:00
Cary Clark
4dc5a45405 remove defines and add commas
Preparation for generating bookmaker files for all remaining
interfaces

Standardize enum and enum classes by including a comma after
the last entry.

Replace flatten-related #define in public interfaces
with their equivalent.

The motivation is to give documentation something to refer to.

An alternative would be to move part or all of this out of the
public interface; something I can work on in a follow-up CL.

R=reed@google.com,bsalomon@google.com

Bug: skia:6898
Change-Id: I4b865f6ec3d8f5d31e50448fef7d2714510302f0
Reviewed-on: https://skia-review.googlesource.com/129312
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-05-21 17:33:39 +00:00
Cary Clark
32a4910e57 Revert "remove toString"
This reverts commit 5191880cbf.

Reason for revert: broke flutter

Original change's description:
> remove toString
> 
> toString may have been used by obsolete debugger only
> find out if that is so
> 
> R=​brianosman@google.com,bsalomon@google.com
> 
> Docs-Preview: https://skia.org/?cl=119894
> Bug:830651
> Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
> Reviewed-on: https://skia-review.googlesource.com/119894
> Commit-Queue: Cary Clark <caryclark@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 830651
Reviewed-on: https://skia-review.googlesource.com/129340
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-05-20 23:15:48 +00:00
Cary Clark
5191880cbf remove toString
toString may have been used by obsolete debugger only
find out if that is so

R=brianosman@google.com,bsalomon@google.com

Docs-Preview: https://skia.org/?cl=119894
Bug:830651
Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd
Reviewed-on: https://skia-review.googlesource.com/119894
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-05-20 21:16:37 +00:00
Brian Osman
78a764860b Add drawBitmapLattice to SkDebugCanvas
One more step to full coverage of SkCanvas API. (Also, it would be nice
to implement fromJSON for both lattice types, I'll attempt that in a
follow up CL).

Change-Id: I5fe55ca90b7859e40f5e8ec83bc12b7938674b60
Reviewed-on: https://skia-review.googlesource.com/129245
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-20 18:18:06 +00:00
Ravi Mistry
da17f1e7df Omit "espn" from key_mobile_sites_smooth in RecreateSKPs bot
We already have a espn page set in Skia. Removing it from the chromium page
set does not lose us coverage.

NoTry: true
Bug: skia:7917
Change-Id: Ie5456ee7f8053ad904eb858eddfe564e3781249a
Reviewed-on: https://skia-review.googlesource.com/129303
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2018-05-20 14:53:16 +00:00
Ben Wagner
255ab8d9a5 Make SkStream readers report failure.
This also fixes an issue noticed while making this change where
SkFontDescriptor improperly round trips negative axis values.

Change-Id: Iacc5929a185659dcacc18c802c4908e4f34c6899
Reviewed-on: https://skia-review.googlesource.com/128341
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-05-18 15:06:24 +00:00
Joe Gregorio
26171e8927 [skiaserver] Start loading html/css/js from https://debugger-assets.skia.org.
Also clean up quoting and fix a hard-coded URL to https://debugger.skia.org.

Bug: skia:
Change-Id: I31283f3769c81a138d82c03214f005c7fb82c5b2
Reviewed-on: https://skia-review.googlesource.com/129164
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2018-05-18 14:10:14 +00:00
Cary Clark
ffb3d688b0 Color Documentation
- treat Color, ARGB, etc as things not requiring definitions
- fix links to Anti-alias, RGB-565
- finish everything marked incomplete, color and elsewhere
- add #Code blocks for #Typedef

R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=128547
Bug: skia:6898
Change-Id: Icf12fe70bc2bf1a8b1a5b31380b2454610949f23
Reviewed-on: https://skia-review.googlesource.com/128547
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-05-17 16:45:13 +00:00
Jim Van Verth
cbeae03cae Fix check for valid proxies returned by AtlasManager.
Also renames a lot of variables to make it clearer that getProxies()
returns the number of instantiated proxies, not the number of all
proxies.

Bug: skia:
Change-Id: Ifbc910cbd6635dccdb4e7f0df2e69a0f341130af
Reviewed-on: https://skia-review.googlesource.com/128660
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-05-16 19:28:32 +00:00
Ravi Mistry
02faa2b992 Fix capitalization of "twitter" in RecreateSKPs bot
Case has suddenly started to matter.

NoTry: true
Bug: skia:7917
Change-Id: I6020622bd12481a2ac291caf565632451a3c8da5
Reviewed-on: https://skia-review.googlesource.com/128480
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2018-05-16 15:01:54 +00:00
Cary Clark
682c58da48 Documentation refresh
- add links to types within methods
- add check to see that all references and definitions match
- add style to tables to make them easier to read
- use https everywhere
- remove trailing spaces
- move overview inside class
- split class and struct in summary tables
- add missing #Line
- clean up SkImageInfo constant documentation
- work on SkColor documentation
- allow common phrases to take different parameters
- add more flexibility to generated tables
- tighten token parent requirements
- generalize deprecated and example interfaces
- detect inner constructors

R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=121799
Bug: skia:6898
Change-Id: Ia75a23740b80259460916890b310e2a9f024962a
Reviewed-on: https://skia-review.googlesource.com/121799
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-05-16 11:35:24 +00:00
Chris Dalton
6a0e54e479 Add a vknostencils config
Bug: skia:
Change-Id: Id4781799ba0b30b01a60788afc235fd6134516cf
Reviewed-on: https://skia-review.googlesource.com/128380
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-05-15 21:57:53 +00:00
Mike Reed
81f60ecd9c Allow slides/gms to extend the UI
Bug: skia:
Change-Id: Ia5971d827e6e05ab6cc30af3105b3b32ee691a34
Reviewed-on: https://skia-review.googlesource.com/128321
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-05-15 14:29:43 +00:00
Brian Salomon
c7fe0f708c Make GrCaps and GrShaderCaps private.
Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps().

Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866
Reviewed-on: https://skia-review.googlesource.com/127389
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-05-11 14:47:27 +00:00
Ben Wagner
99a78dcb1a Add all SkPaint::Flags to Viewer app.
Originally a change to add just one more, turned into adding all of
them.

Change-Id: Ibd6b6cab75d5a018744661038cfccdb50470c234
Reviewed-on: https://skia-review.googlesource.com/127134
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-05-10 13:46:35 +00:00
Hal Canary
46cc3dabaf Revert "Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode""
This reverts commit 97c1108607.

Change-Id: Ic3c6addc64ced39766bbee3e10b4d88faf61ba2f
Reviewed-on: https://skia-review.googlesource.com/127021
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-05-09 18:00:35 +00:00
Greg Daniel
97c1108607 Revert "SkAdvancedTypefaceMetrics: factor out GlyphToUnicode"
This reverts commit 1c2bcd8b14.

Reason for revert: breaking chrome roll

Original change's description:
> SkAdvancedTypefaceMetrics: factor out GlyphToUnicode
> 
> Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63
> Reviewed-on: https://skia-review.googlesource.com/126507
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=halcanary@google.com,bungeman@google.com,reed@google.com

Change-Id: Ib1ff8484ffd09cdb88d461ac00745aa32c191124
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/127000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-09 15:36:06 +00:00
Hal Canary
1c2bcd8b14 SkAdvancedTypefaceMetrics: factor out GlyphToUnicode
Change-Id: Iedce8c1ea2c405d5ab64ccac353970d5cd2b9d63
Reviewed-on: https://skia-review.googlesource.com/126507
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-05-09 14:24:45 +00:00
Florin Malita
38792ce0f8 Add a single-file viewer option
Pass --file/-f to open a single file for viewing.

Change-Id: Ida168765ed6a5c7d76df1a8298bfe658d39d0196
Reviewed-on: https://skia-review.googlesource.com/126761
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-05-08 15:58:44 +00:00
Florin Malita
4e9e325725 [viewer] Avoid per-frame json UI updates
The reason we push Json updates for every frame is to support the
Android FPS meter - which happens to require the native FPS meter for
updates.

Instead of supporting two meters:

1) scale up the native FPS widget on Android (1.5x)

2) remove the Android widget

3) stop calling updateUIState() from onPaint()

Change-Id: Ica8109869035b2f885743a7e38b50688b69fa5e4
Reviewed-on: https://skia-review.googlesource.com/126621
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-05-07 21:30:27 +00:00
Ben Wagner
cb1393585e Allow finer rotation in Viewer app.
It turns out the ImGui sliders don't use the format string just for
display but also to modify the potential values. Change the format
string for rotation to three decimal places to match zoom.

Change-Id: I5f8d675a18687d67c2f19b03aa4c19c3ae094415
Reviewed-on: https://skia-review.googlesource.com/125960
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-05-04 19:09:08 +00:00
Florin Malita
87ccf33f15 [skottie] Disable on Android Framework builds
Make Skottie truly optional (own flag), and disable in framework builds
(to unblock landing the RapidJson refactoring).

Change-Id: I4611f915e43fe11c1f6754ab4a9f63e45af2f8d3
Reviewed-on: https://skia-review.googlesource.com/125872
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-04 18:36:03 +00:00
Brian Salomon
ec54539d39 Make RenderDoc work automatically with GLX viewer
Change-Id: I19769924882c2790cfc862373d6f26508b410eee
Reviewed-on: https://skia-review.googlesource.com/125871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-05-04 16:27:13 +00:00
Brian Osman
de81a21f32 Remove colorspaceinfo
We prefer skcms iccdump, and colorspaceinfo was relying on
soon-to-be-deleted internals of SkColorSpace.

Bug: skia:
Change-Id: I06f6e0365f1f6840339aaf2fb02a7c5aab43b39d
Reviewed-on: https://skia-review.googlesource.com/125748
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-05-03 19:12:02 +00:00
Yuqian Li
737b9a9d48 Remove legacy guard flags
Bug: skia:
Change-Id: I3b526f2caec6766faea72cdc89550f50e17c71d2
Reviewed-on: https://skia-review.googlesource.com/125746
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-05-03 18:48:32 +00:00
Chris Dalton
3a67b8e46b Add support for building with MoltenVK
Bug: skia:
Change-Id: If55785d7fcc6e2c92c961ac390700add874c8d6d
Reviewed-on: https://skia-review.googlesource.com/125601
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-05-03 16:26:01 +00:00
Yuqian Li
9127ea3488 Add name field to calmbench json
This should let perf.skia.org get the "name" keyword instead of "test".

Bug: skia:7816
Change-Id: Icb2e9f7c6109a0cfb06499ee58f9fd0cc834e5c3
Reviewed-on: https://skia-review.googlesource.com/125540
Auto-Submit: Yuqian Li <liyuqian@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2018-05-03 15:18:02 +00:00
Ben Wagner
20fa1e94a0 Update SkRandomScalerContext to handle mask filters.
SkRandomScalarContext would apply all path and mask filters twice, once
on the proxy and once to itself.

This also changes the SkScalerContext mask generation in anticipation of
removing the mask format overrides.

This also changes the textblobrandomfont test to fix the line spacing
and emoji handling.

Change-Id: Ib2a633d49ccb801a1849dd982185f44c1d2ea85f
Reviewed-on: https://skia-review.googlesource.com/124644
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-05-03 01:00:08 +00:00
Brian Osman
805a727d26 Add toggle for 'real' vs. 'fake' perspective in Viewer
Real perspective draws content with perspective applied. Fake
perspective rasterizes in ortho, then stretches the image by the
perspective matrix.

Change-Id: I738cd379f9a58b965469ef8a57fb2dfd597fda10
Reviewed-on: https://skia-review.googlesource.com/125442
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-05-02 20:09:38 +00:00
Khushal
38a0843688 fonts: Reland push font remoting.
This relands the following changes:
1) https://skia-review.googlesource.com/c/skia/+/120283
2) https://skia-review.googlesource.com/c/skia/+/125029
3) https://skia-review.googlesource.com/c/skia/+/125140

The original changes had to be reverted due to a memory leak in
SkBaseDevice from SkTextBlobCacheDiffCanvas. This has been addressed by
https://skia-review.googlesource.com/c/skia/+/125160

TBR=herb@google.com

Bug: skia:7515, 831354
Change-Id: I73f4fcb1c397f31bf01553ff48c71ed2d6dd0770
Reviewed-on: https://skia-review.googlesource.com/125326
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
2018-05-02 18:39:31 +00:00
Herb Derby
fcac00f2f1 Reland "Remove devKerning"
This is a reland of c86c5c0144

Original change's description:
> Remove devKerning
> 
> Dev kerning is not supported by any scalers. This is
> mostly removed. The remaining fields fRsbDelta and
> fLsbDelta are kept to keep Android compiling.
> 
> Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
> Reviewed-on: https://skia-review.googlesource.com/124921
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: Ibf5fac5f1442c7e62392d5146ad460da27b10d5c
Reviewed-on: https://skia-review.googlesource.com/125300
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-02 15:15:08 +00:00
Herb Derby
efe39bcfb8 Take sk_sp<SkDevice> instead of SkDevice*
Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680
Reviewed-on: https://skia-review.googlesource.com/125160
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Herb Derby <herb@google.com>
2018-05-02 14:46:17 +00:00
Mike Klein
8a232023e1 Revert "fonts: Set up remote glyph caching to push fonts."
This reverts commit 101d56359a.

Reason for revert: 5 of 5

Original change's description:
> fonts: Set up remote glyph caching to push fonts.
> 
> Currently the SkStrikeClient is designed to pull fonts from the server
> on demand, and to pre-fetch a batched request by analyzing the ops using
> a SkTextBlobCacheDiffCanvas. This change modifies the design to support
> a push based model, where the server pushes fonts required by the client
> and sets up the requisite SkGlyphCaches on the client prior to
> rasterizing the ops.
> 
> This model still relies on the SkTextBlobCacheDiffCanvas for analyzing
> the glyphs required for rasterizing an op. The glyph caches required for
> raster are locked and missing glyphs to be sent to the client are tracked
> by the SkStrikeServer. The embedder can serialize this font data at any
> point, but must ensure that this data is deserialized by the
> SkStrikeClient at the remote end, before rasterizing any ops analyzed
> prior to serialization. Any refs on the caches are released once the
> font data is serialized by the server.
> 
> The locking of glyph caches relies on the embedder providing discardable
> handles. These handles can be created on the server and serialized to be
> sent to the client, and map to an instance of SkGlyphCache. This allows
> the server to control the lifetime of the caches on the client.
> 
> Bug: skia:7515
> Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b
> Reviewed-on: https://skia-review.googlesource.com/120283
> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=mtklein@google.com,herb@google.com,khushalsagar@chromium.org

Change-Id: If72caf968ddcbf70b8b9d71782a2339a118ed202
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7515
Reviewed-on: https://skia-review.googlesource.com/125264
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-02 13:55:08 +00:00
Mike Klein
c76e26a6bb Revert "Remove devKerning"
This reverts commit c86c5c0144.

Reason for revert: 4 of 5

Original change's description:
> Remove devKerning
> 
> Dev kerning is not supported by any scalers. This is
> mostly removed. The remaining fields fRsbDelta and
> fLsbDelta are kept to keep Android compiling.
> 
> Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
> Reviewed-on: https://skia-review.googlesource.com/124921
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=bungeman@google.com,herb@google.com,reed@google.com

Change-Id: If865f702868192a1b72cd811baa996dd1282bbce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/125263
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-02 13:54:54 +00:00
Herb Derby
c86c5c0144 Remove devKerning
Dev kerning is not supported by any scalers. This is
mostly removed. The remaining fields fRsbDelta and
fLsbDelta are kept to keep Android compiling.

Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
Reviewed-on: https://skia-review.googlesource.com/124921
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-01 21:12:15 +00:00
Khushal
101d56359a fonts: Set up remote glyph caching to push fonts.
Currently the SkStrikeClient is designed to pull fonts from the server
on demand, and to pre-fetch a batched request by analyzing the ops using
a SkTextBlobCacheDiffCanvas. This change modifies the design to support
a push based model, where the server pushes fonts required by the client
and sets up the requisite SkGlyphCaches on the client prior to
rasterizing the ops.

This model still relies on the SkTextBlobCacheDiffCanvas for analyzing
the glyphs required for rasterizing an op. The glyph caches required for
raster are locked and missing glyphs to be sent to the client are tracked
by the SkStrikeServer. The embedder can serialize this font data at any
point, but must ensure that this data is deserialized by the
SkStrikeClient at the remote end, before rasterizing any ops analyzed
prior to serialization. Any refs on the caches are released once the
font data is serialized by the server.

The locking of glyph caches relies on the embedder providing discardable
handles. These handles can be created on the server and serialized to be
sent to the client, and map to an instance of SkGlyphCache. This allows
the server to control the lifetime of the caches on the client.

Bug: skia:7515
Change-Id: Id39f346b47b60899778404bbd0429ee811d0e53b
Reviewed-on: https://skia-review.googlesource.com/120283
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2018-05-01 18:15:15 +00:00
Chris Dalton
117d9729c1 skpbench: Add support for Pixel 2
Bug: skia:
Change-Id: Ic0901ca84bf8e3fda29b3bd7a0504396445ca0f4
Reviewed-on: https://skia-review.googlesource.com/124282
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-30 15:29:13 +00:00
Florin Malita
6eb85a1cf1 [skottie] Show load stats in SkottieSlide
TBR=
Change-Id: Ie3a1036d9a90cb16d2795134c453759aeff06e3c
Reviewed-on: https://skia-review.googlesource.com/124461
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-04-30 15:19:03 +00:00
Yuqian Li
58b90f7f17 Raise exceptions from child threads to the main thread
Bug: skia:7883
Change-Id: Ia71550b94867588c124e93eac347c67e35aa48e8
Reviewed-on: https://skia-review.googlesource.com/124380
Auto-Submit: Yuqian Li <liyuqian@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2018-04-30 11:42:09 +00:00
Brian Osman
bdaf97bdb8 Rotate about the slide center, and before perspective
This causes rotation to happen in the perspective plane, which is
more (?) interesting/useful.

Change-Id: If57a81de6662591be67cb68f0278f71038ac8d40
Reviewed-on: https://skia-review.googlesource.com/124160
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-26 20:52:43 +00:00
Brian Osman
9bb47cf0ff Add perspective support (rect to rect) to Viewer
Change-Id: I312d5b3e6b7f37a3a7bfd5561bcdb31b43e207b8
Reviewed-on: https://skia-review.googlesource.com/123934
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2018-04-26 20:21:23 +00:00
Cary Clark
d98f78cd01 alternative no anonymous enums
Anonymous enums play havoc with documentation;
there's no name to refer to. It may be that all
enums may either be named or replaced with constexpr
without breaking anything. Try replacing all
anonymous enums in include/core to see what happens.

This names SkCanvas::SaveLayerFlagsSet but leaves
SkCanvas::SaveLayerFlags as a uint32_t, to reduce
risk as compared to review.skia.org/123584.

There's also some chance that external linkage will
break if some client refers to anonymous enum in a way
that could require its address: see
https://stackoverflow.com/questions/22867654/enum-vs-constexpr-for-actual-static-constants-inside-classes
(This CL does not require definitions + declarations)

Brought bookmaker docs in line with this change.
This also tripped over missing code in bookmaker
handling constexpr so added that as well.

R=reed@google.com,bsalomon@google.com

Docs-Preview: https://skia.org/?cl=123920
Docs-Preview: https://skia.org/?cl=123584
Bug: skia:6898
Change-Id: I14a342edcfd59e139ef9e4501f562417c4c60391
Reviewed-on: https://skia-review.googlesource.com/123920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-26 17:11:53 +00:00
Chris Dalton
218c29453f Remove the MSAA path renderer
Bug: skia:
Change-Id: Ib18bede613c8d27fd6326f655dc2d638e35870ff
Reviewed-on: https://skia-review.googlesource.com/123726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-25 19:59:59 +00:00
Adrienne Walker
6f719aeeae Add CheckGeneratedFiles recipe check for gpu workarounds
Followup to https://skia-review.googlesource.com/122800

Bug: chromium: 829614
Change-Id: Idde753e0f8943290208625ba5b6332a5fdc07184
Reviewed-on: https://skia-review.googlesource.com/123536
Commit-Queue: Adrienne Walker <enne@chromium.org>
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
2018-04-25 19:26:27 +00:00
Hal Canary
fd9bcabca1 sk_tools/Resources: optional SK_TOOLS_REQUIRE_RESOURCES flag
BUG=skia:7842
Change-Id: I1ce7d12308cd8ee101163d73dfc79f2d2155c632
Reviewed-on: https://skia-review.googlesource.com/123425
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-04-24 18:08:06 +00:00
Ben Wagner
d02a74d649 Add Transform section to viewer tools window.
This adds sliders for Zoom and Rotate.

Change-Id: Ie568e5381d76bd5a457760e2d6224e42e64c7f16
Reviewed-on: https://skia-review.googlesource.com/123027
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-23 17:21:30 +00:00
Ben Wagner
7a3c6748f3 Backspace opens slide picker (not paint) in viewer.
A recent change added the "Paint" section to the viewer tools window. The
code around forcing the slide picker open when the backspace key was
pressed was inadvertantly separated from the slide picker section, so
now the paint section is confusingly held open instead. This changes the
logic so that the slide picker is once again the target of backspace.

Change-Id: Ibfcb78bb0a1e2bdbb2ccce54b38e8206e0303753
Reviewed-on: https://skia-review.googlesource.com/122949
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-23 14:57:00 +00:00