Commit Graph

3606 Commits

Author SHA1 Message Date
Florin Malita
760a052c1e [sksg] Consolidate Matrix node implementations
Matrix and Matrix44 look almost identical -- consolidate as a template
class.

TBR=
Change-Id: I8f299a6138f190eb18de2e67b051307cf6a33383
Reviewed-on: https://skia-review.googlesource.com/c/182973
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-10 21:50:54 +00:00
Mike Reed
e5f9cfad7b expand flag to include all text-related paint fields
Bug: skia:
Change-Id: I8453a6d607df4902cd05c5c9bc6162feda04ef9c
Reviewed-on: https://skia-review.googlesource.com/c/182969
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-10 20:06:07 +00:00
Brian Salomon
cdd8a0a0e8 Revert "Revert "Reuse GrTexture instances when the same GrBackendTexture is used to""
This reverts commit 426ba463d5.

Bug: skia:8613
Change-Id: Iacaf40549369110aa95015e8d4579ec41db22d13
Reviewed-on: https://skia-review.googlesource.com/c/182963
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-10 17:51:21 +00:00
Brian Osman
707d202245 Make SkAnimTimer support speed control
Really helpful to slow down animated content for debugging, etc...

Bug: skia:
Change-Id: Id22ac555c7926dc858777d3d1be8afac1686407a
Reviewed-on: https://skia-review.googlesource.com/c/182920
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-10 17:38:31 +00:00
Brian Salomon
426ba463d5 Revert "Reuse GrTexture instances when the same GrBackendTexture is used to"
This reverts commit 559c617137.

Reason for revert: breaking things

Original change's description:
> Reuse GrTexture instances when the same GrBackendTexture is used to
> repeatedly fulfill a promise SkImage.
> 
> Bug: skia:8613
> 
> Change-Id: I35c76435d630d2daa034e0c3efb59666bfd6882a
> Reviewed-on: https://skia-review.googlesource.com/c/175820
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I7548809945d0a875fdb9387398bbc45e733c0846
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8613
Reviewed-on: https://skia-review.googlesource.com/c/182960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-10 16:33:11 +00:00
Brian Salomon
559c617137 Reuse GrTexture instances when the same GrBackendTexture is used to
repeatedly fulfill a promise SkImage.

Bug: skia:8613

Change-Id: I35c76435d630d2daa034e0c3efb59666bfd6882a
Reviewed-on: https://skia-review.googlesource.com/c/175820
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-10 16:10:59 +00:00
Brian Osman
207d410d3b Viewer: Add ability to pause timer from GUI and keyboard
Bug: skia:
Change-Id: I1e4991c996cadcdee928efdbc10fc3d7ac820045
Reviewed-on: https://skia-review.googlesource.com/c/182813
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-10 15:38:29 +00:00
Florin Malita
919e209d1a [sksg] 4x4 matrix support
Refactor the scene graph transform hierarchy to support 4x4 matrices:

  * rename current Transform to TransformEffect (operates as a render tree effect)
  * introduce a new Transform abstract base class, to replace current Matrix
  * refactor existing Matrix as a Transform specialization
  * introduce a new Matrix44 Transform specialization
  * refactor the existing composition helper (ComposedMatrix) as Concat,
    a Transform specialization (using composition instead of Matrix inheritance)

Change-Id: Ic3c1b499e10a0a229a7a76d4bef3dbc6a8b49194
Reviewed-on: https://skia-review.googlesource.com/c/182666
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-10 02:06:54 +00:00
Hal Canary
d8deeee891 tools: Remove sk_tool_utils::set_portable_typeface()
Change-Id: I2a87bb1d020bc50d1ca4c3f56382fa4c372d4c7d
Reviewed-on: https://skia-review.googlesource.com/c/182661
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-09 20:35:01 +00:00
Mike Klein
97c7cf16de remove --undefok
I think we originally added this for the bots, back in the good old days
when the bot scripts weren't versioned with Skia.  No bots use this now.

Change-Id: Icdee95d27fb928d0215601e082d056e611eb6202
Reviewed-on: https://skia-review.googlesource.com/c/181980
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2019-01-09 18:15:07 +00:00
Hal Canary
df2d27e0c7 drawText Cleanup, part 2
Change-Id: I6765d623924d12c6eea2c402dd27eade61b73b66
Reviewed-on: https://skia-review.googlesource.com/c/182151
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-01-09 16:01:59 +00:00
Hal Canary
89a644b635 sed s/drawSimpleText/drawString/
for f in $(git grep -l drawSimpleText); do
    sed -i 's/wSimpleText(\([[:alnum:]]\), strlen(\1), kUTF8_SkTextEncoding,/wString(\1,/g' "$f"
    sed -i 's/wSimpleText(\([[:alnum:]]*\)\.c_str(), \1\.size(), kUTF8_SkTextEncoding,/wString(\1,/g' "$f"
done
git checkout @~ include/core/SkCanvas.h samplecode/SampleCusp.cpp
git cl format

Change-Id: Ibc0c3afd30f86465a645fadb26177d61919f57fd
Reviewed-on: https://skia-review.googlesource.com/c/181561
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-01-08 19:50:09 +00:00
Cary Clark
26d173fee7 fix bookmaker
Illustrations calling SkTextUtils::DrawString must pass font
as well as paint.

TBR=reed@google.com,jcgregorio@google.com

Docs-Preview: https://skia.org/?cl=181562
Bug: skia:
Change-Id: I907c1c69026d3dc40282545b492a790b2349a8a0
Reviewed-on: https://skia-review.googlesource.com/c/181562
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-01-07 21:06:29 +00:00
Chris Dalton
351e80cc28 Reland "ccpr: Rework the path cache to support sporadic flushing"
This is a reland of d6fa45472c

Original change's description:
> ccpr: Rework the path cache to support sporadic flushing
> 
> Removes the notion of a stashed atlas that we store from the previous
> flush. Now we just cache every atlas we ever render. Cached atlases
> can either be 16-bit or 8-bit.
> 
> The "reuse" and "animation" cases should both behave exactly the same
> as before: Where before we would copy from the stashed atlas to 8-bit
> atlases, we now copy from a cached 16-bit atlas and then invalidate
> it. Where before we would recycle the stashed atlas's backing texture
> object, we now recycle this same texture object from an invalidated
> 16-bit cached atlas.
> 
> The main difference is that cases like tiled rendering now work. If
> you draw your whole scene in one flush, you still get one big 16-bit
> cached atlas, just like the "stashed atlas" implementation. But if you
> draw your scene in tiles, you now get lots of little cached 16-bit
> atlases, which can be reused and eventually copied to 8-bit atlases.
> 
> Bug: skia:8462
> Change-Id: Ibae65febb948230aaaf1f1361eef9c8f06ebef18
> Reviewed-on: https://skia-review.googlesource.com/c/179991
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: skia:8462
Change-Id: I2f64b0c37e2cd644a202dfc786366dda5d238391
Reviewed-on: https://skia-review.googlesource.com/c/181450
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-01-07 16:14:31 +00:00
Brian Osman
82ebe04caf Reland "Add SkColorSpace factory from 3x3 row-major gamut and transfer function"
Moved named common transfer functions and gamuts to constexpr values in
SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.

Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
new factory with the named values. Multiple clients want a way to
extract named transfer function and gamut - this still doesn't provide
that, but this may be a better path forward for honestly advertising how
SkColorSpace works internally.

Originally landed as:
https://skia.googlesource.com/skia/+/a9549ab31630fc244094e6f1692371cbaf87f666

Re-landing with a new serialization format, but maintaining ability to
load old serialized color spaces, for SKP compatibility.

Bug: skia:
Change-Id: Ib84a6e1cd5d7d9816175773fdbaff2ca32658667
Reviewed-on: https://skia-review.googlesource.com/c/181176
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-05 20:06:51 +00:00
Chris Dalton
2e825a3c5d Revert "ccpr: Rework the path cache to support sporadic flushing"
This reverts commit d6fa45472c.

Reason for revert: Assertion failures

Original change's description:
> ccpr: Rework the path cache to support sporadic flushing
> 
> Removes the notion of a stashed atlas that we store from the previous
> flush. Now we just cache every atlas we ever render. Cached atlases
> can either be 16-bit or 8-bit.
> 
> The "reuse" and "animation" cases should both behave exactly the same
> as before: Where before we would copy from the stashed atlas to 8-bit
> atlases, we now copy from a cached 16-bit atlas and then invalidate
> it. Where before we would recycle the stashed atlas's backing texture
> object, we now recycle this same texture object from an invalidated
> 16-bit cached atlas.
> 
> The main difference is that cases like tiled rendering now work. If
> you draw your whole scene in one flush, you still get one big 16-bit
> cached atlas, just like the "stashed atlas" implementation. But if you
> draw your scene in tiles, you now get lots of little cached 16-bit
> atlases, which can be reused and eventually copied to 8-bit atlases.
> 
> Bug: skia:8462
> Change-Id: Ibae65febb948230aaaf1f1361eef9c8f06ebef18
> Reviewed-on: https://skia-review.googlesource.com/c/179991
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com

Change-Id: Iad74a14fcb09da12f32b9b78f803b8472a5d60ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8462
Reviewed-on: https://skia-review.googlesource.com/c/181444
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-01-04 22:14:31 +00:00
Chris Dalton
d6fa45472c ccpr: Rework the path cache to support sporadic flushing
Removes the notion of a stashed atlas that we store from the previous
flush. Now we just cache every atlas we ever render. Cached atlases
can either be 16-bit or 8-bit.

The "reuse" and "animation" cases should both behave exactly the same
as before: Where before we would copy from the stashed atlas to 8-bit
atlases, we now copy from a cached 16-bit atlas and then invalidate
it. Where before we would recycle the stashed atlas's backing texture
object, we now recycle this same texture object from an invalidated
16-bit cached atlas.

The main difference is that cases like tiled rendering now work. If
you draw your whole scene in one flush, you still get one big 16-bit
cached atlas, just like the "stashed atlas" implementation. But if you
draw your scene in tiles, you now get lots of little cached 16-bit
atlases, which can be reused and eventually copied to 8-bit atlases.

Bug: skia:8462
Change-Id: Ibae65febb948230aaaf1f1361eef9c8f06ebef18
Reviewed-on: https://skia-review.googlesource.com/c/179991
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-04 20:51:09 +00:00
Brian Osman
d4c7458f64 Revert "Add SkColorSpace factory from 3x3 row-major gamut and transfer function"
This reverts commit a9549ab316.

Reason for revert: SKPs changed?

Original change's description:
> Add SkColorSpace factory from 3x3 row-major gamut and transfer function
> 
> Moved named common transfer functions and gamuts to constexpr values in
> SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.
> 
> Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
> new factory with the named values. Multiple clients want a way to
> extract named transfer function and gamut - this still doesn't provide
> that, but this may be a better path forward for honestly advertising how
> SkColorSpace works internally.
> 
> Bug: skia:
> Change-Id: I9296d67e8f0dab5ceb49869cb3ba24e98a05f3c4
> Reviewed-on: https://skia-review.googlesource.com/c/180360
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,brianosman@google.com,reed@google.com

Change-Id: Ie888f877b3c1dba33e1a8c0f5fa92594628de7fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/181300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-04 17:07:48 +00:00
Brian Osman
18df87ec8b Fix bugs and add features to imgcvt
- The dst_profile data needs to live at least as long as the profile.
- Support converting jpg sources (where pixmap alpha type is kOpaque).
- Add a fallback path that makes the destination profile usable.

Bug: skia:
Change-Id: I11c2c7213532f4b6ba38afd45dd6a2afddea0c52
Reviewed-on: https://skia-review.googlesource.com/c/181171
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-04 16:43:07 +00:00
Mike Reed
60a0e87c6c remove blob iterator::applyFontToPaint
Bug: skia:
Change-Id: I4cc66e19ceab7914b8895e23c21860842c9fadbf
Reviewed-on: https://skia-review.googlesource.com/c/181164
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-04 16:11:27 +00:00
Mike Reed
3ae473347e start to change Viewer's filtering to know about fonts
Did not hook-up all of the font flags, but these did not appear to be
"filtered" by viewer, so landing this version for now (to stop assuming
that text-fields are in paint).

Bug: skia:
Change-Id: Id8bdfc12f838b6c3ddc2981aca698d4d80a4c639
Reviewed-on: https://skia-review.googlesource.com/c/181169
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-04 15:39:27 +00:00
Kevin Lubick
13486cbf56 more extra semis
Hopefully with better grepping.

Bug: skia:
Change-Id: I434f2b1fedc2eff2d62cf80b13ebb1bd71a1c8a1
Reviewed-on: https://skia-review.googlesource.com/c/181166
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-01-04 15:35:14 +00:00
Brian Osman
a9549ab316 Add SkColorSpace factory from 3x3 row-major gamut and transfer function
Moved named common transfer functions and gamuts to constexpr values in
SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.

Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
new factory with the named values. Multiple clients want a way to
extract named transfer function and gamut - this still doesn't provide
that, but this may be a better path forward for honestly advertising how
SkColorSpace works internally.

Bug: skia:
Change-Id: I9296d67e8f0dab5ceb49869cb3ba24e98a05f3c4
Reviewed-on: https://skia-review.googlesource.com/c/180360
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-04 14:32:06 +00:00
Mike Reed
89126e4550 use drawSimpleText
Bug: skia:
Change-Id: I4aa6190e66478595a409f93a406fd42f19394302
Reviewed-on: https://skia-review.googlesource.com/c/180927
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-03 18:27:23 +00:00
Mike Reed
919191365b use font instead of paint for text
Bug: skia:
Change-Id: I508ecbd6c4dad41f67f5f2ce6da6c0065dacba6c
Reviewed-on: https://skia-review.googlesource.com/c/180365
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-02 17:45:30 +00:00
Mike Reed
28bd882a1e use font in tool_utils add_to_text_blob()
Bug: skia:
Change-Id: Ie0b56a56bd7a1f67bfaad90d30ac7d0477944a61
Reviewed-on: https://skia-review.googlesource.com/c/179982
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2018-12-23 03:56:05 +00:00
Mike Reed
12a6d452b1 use font for measuring
Bug: skia:
Change-Id: I451c61d5b98cb42440a4eaa889d9404638a72f5c
Reviewed-on: https://skia-review.googlesource.com/c/179980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-22 12:23:07 +00:00
Cary Clark
9d6049a96f fix pathops bug 8380
Paths to intersect have two nearly coincident cubics. Where they
cross, the intersection error makes the curves start at slightly
different points. To sort the intersection, one curve is translated
to the start of the opposite point, moving it from one side to the
other, introducing a winding error.

The fix looks for that error in a very tiny range (enlarging that
range causes other tests that now pass to fail). This fix is very
fragile and points to the need for a better approach than sorting
angles to find winding values, as documented in the bug.

Also renamed some angle functions to show that they operate only
on lines and not general curves.

All tests pass with this fix:
./out/release/pathops_unittest -V -x
./out/debug/pathops_unittest -V -x

TBR=reed@google.com
Bug: skia:8380
Change-Id: I04e53d4c6a96035f661a4c9f31a17055ce13e3eb
Reviewed-on: https://skia-review.googlesource.com/c/179241
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-12-21 19:15:54 +00:00
Mike Reed
38810f3a09 use font for measuring/paths
add get_text_path to sk_tool_utils

Bug: skia:
Change-Id: I45426bc018cd8a5a0309fd6a73adb30755e8155a
Reviewed-on: https://skia-review.googlesource.com/c/179847
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-12-21 17:36:02 +00:00
Mike Reed
1332743dcc remove overrides of (dead) onDrawTextRSXform
Bug: skia:
Change-Id: Iebfe7bd322849e73a0e84c1b04ac0f4c922fb746
Reviewed-on: https://skia-review.googlesource.com/c/179561
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2018-12-20 22:52:35 +00:00
Mike Reed
42786e2892 remove some dead debugger command types
Bug: skia:
Change-Id: Ib629fdc688e7279510c616b871a0fb5e929cadc9
Reviewed-on: https://skia-review.googlesource.com/c/179562
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-20 20:00:00 +00:00
Mike Reed
30cf62bf48 add rsxform runs to textblobs
Bug: skia:
Change-Id: I72a1921a0300dfdac567e25acbdf20cc168ac0be
Reviewed-on: https://skia-review.googlesource.com/c/175834
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-20 16:46:09 +00:00
Brian Salomon
f05e6d3a46 Remove superfluous budgeted params and member related to SkImage_GpuBase
The proxy/proxies in the SkImage_GpuBase subclasses already track
whether they're budgeted.

The parameters are sometimes redundantly stating the known budgeted
status of the proxy. Other times they are an illusion of control as
the value doesn't actually affected the budgeting of the proxy/proxies.

Change-Id: Ic2b12fbbed653fca1ec1910eeab686de69782834
Reviewed-on: https://skia-review.googlesource.com/c/179402
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-20 15:58:55 +00:00
Brian Salomon
8d2abe9a6c Manual ANGLE roll to ffda3e2985f18f4ff6e3778af8b9715109b21ad0
720ca44976..ffda3e2985

Change-Id: I30d421c35f6e844166c69dfb837006f46281a23f
Reviewed-on: https://skia-review.googlesource.com/c/179246
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2018-12-19 21:16:02 +00:00
Ethan Nicholas
92e01cfc82 added SPIR-V persistent cache support for Vulkan
Bug: skia:
Change-Id: Iec9053655f6ec2cc49a90c4b686995feaff6e488
Reviewed-on: https://skia-review.googlesource.com/c/178923
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-12-19 18:42:18 +00:00
Mike Reed
148b7fd3ad add saveBehind to canvas
Bug: skia:
Change-Id: I62e48b116b2d7efef585d4f465441f24ae4d2b29
Reviewed-on: https://skia-review.googlesource.com/c/177892
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-19 14:44:09 +00:00
Hal Canary
6d7f9d6f28 SkQP: experimental docker script cleanup, try 2
No-Try: true
Change-Id: Icc62d2d6b0f35de757022fc7fdde1f748658c060
Reviewed-on: https://skia-review.googlesource.com/c/178925
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-12-19 03:25:42 +00:00
Hal Canary
35cc6d7e39 SkQP: experimental docker script cleanup
No-Try: true
Change-Id: I9acecd7c20dac0de0b660e183fcbe3e44ae07715
Reviewed-on: https://skia-review.googlesource.com/c/178922
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-12-18 14:04:31 +00:00
Ben Wagner
7cbb7a11ab Add another NVIDIA LSAN suppression.
Change-Id: Ied919cacc0fde26b75a12b469bc4850d6f8a2f40
Reviewed-on: https://skia-review.googlesource.com/c/177804
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2018-12-14 19:48:38 +00:00
Brian Salomon
f391d0f771 Reduce the number of backend->pixelconfig GrCaps virtuals.
Moves method to get GrBackendFormat from GrBackendTexture from GrCaps
to GrBackendTexture so that a GrContext is not required.

Uses kUnknown_GrPixelConfig as failure return from GrCaps functions
rather than an GrPixelConfig* out param and bool result.

Having the texture type be part of GrBackendFormat made removing the
GrCaps function that goes from GrBackendRenderTarget to GrPixelConfig
awkward so that was left alone for now.

Change-Id: If9be0f898c538be4a7b24022b6011f63441a0317
Reviewed-on: https://skia-review.googlesource.com/c/175991
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-14 17:12:36 +00:00
Mike Reed
34c9b6d63e start removing legacy paint calls
Bug: skia:
Change-Id: I2a5c98c65e587015beb0ed6f6d5bcf5a3a1b69a2
Reviewed-on: https://skia-review.googlesource.com/c/177066
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-12 21:21:42 +00:00
Cary Clark
05c1dcfd35 fix bookmaker
add error handling if bmh has #Populate
but include has been marked deprecated

TBR=reed@google.com

Bug: skia:
Change-Id: I1a577bbf95ebe4f5fe46ea2c6a1e1f10f6b8e684
Reviewed-on: https://skia-review.googlesource.com/c/177062
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-12-12 19:03:18 +00:00
Florin Malita
9867f61160 SkShaper per-line callback
Tweak SkShaper to call out for each line, instead of bundling everything
as a text blob.

Change-Id: Ic522f88afcf31cefd873dc8b5cde1ac2e107c64f
Reviewed-on: https://skia-review.googlesource.com/c/176592
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-12-12 17:54:12 +00:00
Kevin Lubick
ddd0a333f4 [canvaskit] Allow users to load their own fonts
Instead of using the test font(s), now ship with a small
(100k) Monospace font. This can be disabled by:
    compile.sh no_font ...

This saves about 350k (164k gzipped) in binary size.

Bug: skia:
Change-Id: I195e3b35bea86d0f096066c1c6a44a4b602571f3
Reviewed-on: https://skia-review.googlesource.com/c/176580
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-12-12 15:40:08 +00:00
Mike Klein
ad64873750 run clang-tidy on headers too
Without -header-filter='.*' clang-tidy only checks the .cpp file.

Change-Id: Ib49081faa2ddf20222dfeb15841cf2b812c22462
Reviewed-on: https://skia-review.googlesource.com/c/176967
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-12 15:26:22 +00:00
Mike Klein
21840ed430 restrict -Werror to runs of clang-tidy.sh
Android runs clang-tidy with a different set of checks
that override our choices in .clang-tidy.

Change-Id: I95d92bb9b61bc5f94fe2bb8bff382edd876d2594
Reviewed-on: https://skia-review.googlesource.com/c/176962
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-12-12 14:29:50 +00:00
Greg Daniel
54200e4025 Move vulkan headers from third_party to include/third_party.
Bug: skia:
Change-Id: I7174c6da075c0fd3d6238a5556439f42d6b97659
Reviewed-on: https://skia-review.googlesource.com/c/176680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-12 14:16:43 +00:00
Brian Salomon
9f7d9a2776 Revert "Move some Gr headers from include/gpu to include/private and src/gpu."
This reverts commit 3bdc3f5f9c.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Move some Gr headers from include/gpu to include/private and src/gpu.
> 
> Bug: skia:
> Change-Id: I341dd3bff63cc99d3be830e21673073645a9cfec
> Reviewed-on: https://skia-review.googlesource.com/c/176220
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia7082f66abb969b20dd5d1f12c3c8d09cd84c241
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/176587
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-11 19:01:41 +00:00
Mike Klein
1688507f83 Try out clang-tidy, starting with bugprone-use-after-move
- add drop-in clang-tidy cxx wrapper
 - get build clean for bugprone-use-after-move

The wrapper can be used by setting

   cxx = "/path/to/skia/tools/clang-tidy.sh"

in GN.

Change-Id: Idbba911e23bd6ef7530b08fd31906b92c1c1b28c
Reviewed-on: https://skia-review.googlesource.com/c/176523
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-11 17:28:19 +00:00
Michael Ludwig
72ab3461b7 Consolidate stroke-rect ops and use GrFillRectOp instead of GrNonAA/AARectOp
Bug: skia:
Change-Id: Iee57bc970a026de2ad5a0758153e9cbb20753fa1
Reviewed-on: https://skia-review.googlesource.com/c/173105
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-11 16:33:35 +00:00