Commit Graph

3635 Commits

Author SHA1 Message Date
Ben Wagner
119196ab66 s/geTestSVGTypeface/getTestSVGTypeface
In addition to fixing the typo, this cleans up a few unnecessary calls
into SkTypeface internals.

Change-Id: I101f67053c2db6850d1576de1001998ccf84d2cd
Reviewed-on: https://skia-review.googlesource.com/c/189496
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-05 21:38:35 +00:00
Mike Klein
830ab79b26 disable DAA by default
This turns DAA off by default in Skia and in our tools,
while leaving it able to be turned back on if we want.

(There's at least one bot that does already.)

This setup keeps our default builds matching the behavior
of Chromium, Flutter, Android, Google3, and should prevent
anyone from accidentally falling into it.

Change-Id: Ia85f3dbe69c46cec0dac6b07fb5feb6e8b65d237
Reviewed-on: https://skia-review.googlesource.com/c/189580
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-02-05 17:15:14 +00:00
Greg Daniel
8ce7991242 Add release proc apis to SkSurface::MakeFromBackend* calls.
Bug: skia:
Change-Id: I0e6cd8895c328a89cd0fa50260fe4e8adbff5990
Reviewed-on: https://skia-review.googlesource.com/c/188634
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-05 15:36:14 +00:00
Robert Phillips
9da87e0e98 Rename GrContext::contextPriv to priv
Mechanical. This makes the priv() accessor the same for all the context types.

Change-Id: I40850eb05a33b8d7cc3eabdd42226d24b2ba58aa
Reviewed-on: https://skia-review.googlesource.com/c/189164
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-04 22:13:14 +00:00
Greg Daniel
24d861d8bf Add hardware buffer unit test from old skqp to skia.
This copies the hardware buffer unit test from, which was cherry picked
straight into skqp last year, into Skia proper.

There are not functional changes, but a few of the APIs have been updated
to work with newer Skia.

Bug: skia:
Change-Id: I2d7b2ed8b0b9314ca3e03e703a6a5ac53805275e
Reviewed-on: https://skia-review.googlesource.com/c/188034
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-01-31 17:44:52 +00:00
Brian Salomon
f55e8d5232 Add option to skip intermediate release/fulfill calls for promise images.
SkiaRenderer does not delete promise image textures when they are released
but not done. Refulfilling promise image textures takes a significant amount
of CPU time. This allows us to fulfill each promise image once.

Bug: skia:8736
Change-Id: I7ad7fa9678ed0ec4bb714b71fbf920ab4a845409
Reviewed-on: https://skia-review.googlesource.com/c/188039
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-31 16:24:52 +00:00
Jim Van Verth
d426dd0dd9 Fix screen invalidation on MacOS
Bug: skia:
Change-Id: Ib5c88e78ebdfb4c420335d31807ab069422bf6f3
Reviewed-on: https://skia-review.googlesource.com/c/188033
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-30 19:36:11 +00:00
Jim Van Verth
d24cb80702 Fix up some event handling in MacOS
Bug: skia:
Change-Id: I46a1526cb6622c0ff04dbee9f64febca388f3571
Reviewed-on: https://skia-review.googlesource.com/c/187927
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-01-30 16:03:21 +00:00
Mike Reed
8d0f82408b Some clangtidy fixes
Bug: skia:
Change-Id: I751f93394812bdfab40cd322a23255e18fa2440a
Reviewed-on: https://skia-review.googlesource.com/c/187387
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-28 20:45:16 +00:00
Jim Van Verth
1f086ca625 Switch sk_app to use native window creation on MacOS.
Bug: skia:
Change-Id: I1763aab0b4bdb650128c1fcc3aa3a05d194496ca
Reviewed-on: https://skia-review.googlesource.com/c/186360
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-01-28 20:12:46 +00:00
Brian Osman
d8a90f9be1 Converting more debug code to SkJSONWriter
All of SkDrawCommand / SkDebugCanvas now uses SkJSONWriter.
Also removed the bespoke json generator and pretty-printer
in GrAuditTrail. This was the largest volume of code still
using JsonCPP. (There are other stragglers).

Bug: skia:
Change-Id: I3aee554764689ce50c8e707caf26c76093b9bb8f
Reviewed-on: https://skia-review.googlesource.com/c/187040
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-28 19:06:06 +00:00
Greg Daniel
41f0e28fd5 Add MaxAPIVersion to GrVkBackendContext.
This moves us to the correct way of handling the correct version of
Vulkan that the client wants us to use.

Bug: skia:
Change-Id: I6c7962b5d2d48ae142c6a701c30f5af3801ac99b
Reviewed-on: https://skia-review.googlesource.com/c/187382
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-01-28 19:01:46 +00:00
Brian Salomon
9bc76d96f9 Change the meaning of GrBudgetedType::kUnbudgetedUncacheable.
kUnbudgetedCacheable now means that the resource is never purged
until its unique key is removed.

This fixes an issue where a cached texture for a promise image
might get purged by cache pressure. This in turn could cause
Skia to call the promise image's Fulfill proc multiple times with
no intervening Release calls. The balancing Release calls would
occur, but the policy is that each Fulfill should be balanced by
Release *before* another Fulfill.

Update/add unit tests.

Bug: chromium:922851
Change-Id: I6411e413b3104721ca4bb6e7f07b3b73d14cbcf9
Reviewed-on: https://skia-review.googlesource.com/c/186361
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-25 14:13:00 +00:00
Brian Salomon
aa6ca0a8bf Require explicit GrWrapCacheable specification in more places.
Make all wrapped resources be kUnbudgetedUncacheable except those
created by AHardwareBuffer image generators and as backings for promise
images.

Make all non-wrapped unbudgeted resources be kUnbudgetedUncacheable.

Update unit tests to mostly use GrWrapCacheable::kNo except where they
are testing the distinction.

Update unit tests for new expectations.
Bug: chromium:922851
Change-Id: I4d3bdaa161ffc76390f26334bcb7e2b47dd9319d
Reviewed-on: https://skia-review.googlesource.com/c/185004
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-25 00:29:27 +00:00
Ravi Mistry
722b21ec72 Fix spreadsheets page set for RecreateSKPs bot
Changed the URL and recaptured it's archive.
Also added a wait just in case.

NoTry: true
Bug: skia:8699
Change-Id: I7a829dc5e5156a68f683247b2eac66e90f8f3dad
Reviewed-on: https://skia-review.googlesource.com/c/185882
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-01-23 22:43:36 +00:00
Herb Derby
087fad7900 Add getTypefaceOrDefault and refTypefaceOrDefault
* Remove GetTypefaceOrDefault from SkPaint and SkFont
* Remove RefTypefaceOrDefault from SkPaint and SkFont

Change-Id: I04ae777142c2bdec849508b611b844418bbaedff
Reviewed-on: https://skia-review.googlesource.com/c/185781
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-01-23 18:52:09 +00:00
Michael Ludwig
7545190e32 Add new experimental API for rectangles with per-edge AA control
Also updates GM_draw_quad_set to use this API instead of the
bulk API on GrRenderTargetContext.

Bug: skia:8506
Change-Id: Ia342d83c509f9db69f06f01599c7041c98aabdb6
Reviewed-on: https://skia-review.googlesource.com/c/184488
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-01-23 16:45:01 +00:00
Ben Wagner
9613e45775 Update Viewer for SkFont overrides.
Change-Id: I18871dd6db647b24db08a3e92e0470c5baa5850c
Reviewed-on: https://skia-review.googlesource.com/c/186082
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-01-23 16:38:40 +00:00
Mike Reed
77f94ea72b Move more utils into SkFontPriv, IWYU
Fissioned from https://skia-review.googlesource.com/c/skia/+/185460

Bug: skia:
Change-Id: Iaf980e931c17196f917602fc58fc39ab51e3d248
Reviewed-on: https://skia-review.googlesource.com/c/185840
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-22 22:24:03 +00:00
Hal Canary
02738a86e5 Revert "hide hinting and flag enums with PAINT_FLAGS"
This reverts commit 5d052dac3a.

Reason for revert: BREAKS CHROMIUM ROLL.

https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc?l=49
|   FAILED: obj/third_party/blink/renderer/platform/platform/font_platform_data_win.obj
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(49,29):
|     error: no member named 'kLCDRenderText_Flag' in 'SkPaint'
|     if (text_flags & SkPaint::kLCDRenderText_Flag) {
|                      ~~~~~~~~~^
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(51,36):
|     error: no member named 'kAntiAlias_Flag' in 'SkPaint'
|     } else if (text_flags & SkPaint::kAntiAlias_Flag) {
|                             ~~~~~~~~~^
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(56,52):
|     error: no member named 'kSubpixelText_Flag' in 'SkPaint'
|     font->setSubpixel(SkToBool(text_flags & SkPaint::kSubpixelText_Flag));
|                                             ~~~~~~~~~^
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(64,29):
|     error: no member named 'kAntiAlias_Flag' in 'SkPaint'
|     if (text_flags & SkPaint::kAntiAlias_Flag)
|                      ~~~~~~~~~^
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(85,27):
|     error: no member named 'kAntiAlias_Flag' in 'SkPaint'
|                  ? SkPaint::kAntiAlias_Flag
|                    ~~~~~~~~~^
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(91,35):
|     error: no member named 'kLCDRenderText_Flag' in 'SkPaint'
|                          ? SkPaint::kLCDRenderText_Flag
|                            ~~~~~~~~~^
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(93,27):
|     error: no member named 'kAntiAlias_Flag' in 'SkPaint'
|       text_flags = SkPaint::kAntiAlias_Flag | lcd_flag;
|                    ~~~~~~~~~^
|   ../../third_party/blink/renderer/platform/fonts/win/font_platform_data_win.cc(101,28):
|     error: no member named 'kAntiAlias_Flag' in 'SkPaint'
|       text_flags |= SkPaint::kAntiAlias_Flag;
|                     ~~~~~~~~~^
|   8 errors generated.

Original change's description:
> hide hinting and flag enums with PAINT_FLAGS
> 
> A preflight for https://skia-review.googlesource.com/c/skia/+/185460
> 
> Bug: skia:2664
> Change-Id: I83f7f9cd500e8507b559462835477ba8ae7c11ab
> Reviewed-on: https://skia-review.googlesource.com/c/185540
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I4d1581a7e29267ad459ed31d4885b823fa00066f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:2664
Reviewed-on: https://skia-review.googlesource.com/c/185680
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-21 18:51:39 +00:00
Mike Reed
5d052dac3a hide hinting and flag enums with PAINT_FLAGS
A preflight for https://skia-review.googlesource.com/c/skia/+/185460

Bug: skia:2664
Change-Id: I83f7f9cd500e8507b559462835477ba8ae7c11ab
Reviewed-on: https://skia-review.googlesource.com/c/185540
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-21 15:45:37 +00:00
Hal Canary
3026d4b1b8 SkDocument: use auto for MakeDocument().
A later CL will make this return a unique_ptr<SkDocument>.

Bug: skia:5972
Change-Id: Ie10d6c07d5f2524ecb71d906db0d37427827225d
Reviewed-on: https://skia-review.googlesource.com/c/181660
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-17 19:16:28 +00:00
Hal Canary
6a11fb0a09 SkQP: branching tools updated.
1.  get_gold_export_url.py becomes get_gold_results.py

2.  README_GENERATING_MODELS.md updated with changed and more
    complete instructions.

No-Try: true
Change-Id: I7fb84ad99e3049717ea9a572f8558ed2f73d412c
Reviewed-on: https://skia-review.googlesource.com/c/184600
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-17 15:29:50 +00:00
Brian Osman
a4e4680494 Fix variable shadowing in Viewer's ImGui code
This worked, but was confusing.

Bug: skia:
Change-Id: I9a387f2fc772277086e0f6ce532c834839b5e4dc
Reviewed-on: https://skia-review.googlesource.com/c/184800
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>
2019-01-17 14:52:30 +00:00
Herb Derby
081e6f3754 Rename GrGlyphCache -> GrStrikeCache
Change-Id: Ie6fdcc6ce1f2265783ebb4dcd1b1ce087a296ddf
Reviewed-on: https://skia-review.googlesource.com/c/184500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-01-16 20:15:04 +00:00
Jim Van Verth
1676cb9282 Restore ETC1 compressed texture support.
Brings back GL ETC1 support and adds Vulkan support as well.

Bug: skia:8684
Change-Id: Ie65da0a3172793081f0e4072f161bfb9b14678bc
Reviewed-on: https://skia-review.googlesource.com/c/179724
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-15 19:56:28 +00:00
Brian Salomon
3f4cd774e6 Make SkPromiseImageTexture ref counted.
This makes the API easier to use in Chrome.

It is no longer required to pass the SkPromiseImageTexture to the
release proc.

Bug: skia:
Change-Id: I6636401f6a7915d3ad15e890718638bc91a58cc4
Reviewed-on: https://skia-review.googlesource.com/c/183383
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-14 16:19:01 +00:00
Hal Canary
69802c4704 SkQP: clean up make_universal_apk.py
Now works better when mixing docker and non-docker builds.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP

Change-Id: I968a855ee9e6c9899aaf514d7a19a145bc818a28
Reviewed-on: https://skia-review.googlesource.com/c/183388
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-14 15:22:49 +00:00
Florin Malita
950243df0e Hack up SkShaper to pass additional callback info
- rename LineHandler -> RunHandler (since it gets called per run)
- pass additionl run info:

  * line index
  * cumulative advance
  * ascent/descent/leading

Bug: skia:
Change-Id: Ie848e5a35243088b99989c73fdec44c6a1bdd051
Reviewed-on: https://skia-review.googlesource.com/c/183300
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-11 17:04:26 +00:00
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