Commit Graph

21 Commits

Author SHA1 Message Date
Robert Phillips
2af13c135b Reland "Fix compilation w/ "skia_enable_svg = false" (take 2)"
This reverts commit 44b7568c8a.

Reason for revert: Google 3 CL has landed

Original change's description:
> Revert "Fix compilation w/ "skia_enable_svg = false" (take 2)"
>
> This reverts commit 30a6b101f4.
>
> Reason for revert: Maybe blocking G3 roll?
>
> Original change's description:
> > Fix compilation w/ "skia_enable_svg = false" (take 2)
> >
> > Change-Id: I036ae171809af56cc9594704b44705ebd095ec80
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443898
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: Ibee3819e073b04efdf9736058c1f9b288249620c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444216
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

# Not skipping CQ checks because this is a reland.

Change-Id: Idf73d864108067ee1c34e88ee4e5236847abd582
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444501
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-09-01 17:54:08 +00:00
Robert Phillips
44b7568c8a Revert "Fix compilation w/ "skia_enable_svg = false" (take 2)"
This reverts commit 30a6b101f4.

Reason for revert: Maybe blocking G3 roll?

Original change's description:
> Fix compilation w/ "skia_enable_svg = false" (take 2)
>
> Change-Id: I036ae171809af56cc9594704b44705ebd095ec80
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443898
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: Ibee3819e073b04efdf9736058c1f9b288249620c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-31 22:31:00 +00:00
Robert Phillips
30a6b101f4 Fix compilation w/ "skia_enable_svg = false" (take 2)
Change-Id: I036ae171809af56cc9594704b44705ebd095ec80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443898
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-31 18:28:25 +00:00
John Stiles
7bf799956d Reland "Add format-specifier warnings to SkDebugf."
This is a reland of e58831cd95

Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: skia:12143
Change-Id: Id3c0c21436ebd13899908d5ed5d44c42a0e23921
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421918
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-25 17:57:43 +00:00
Tyler Denniston
283dba5785 Revert "Add format-specifier warnings to SkDebugf."
This reverts commit e58831cd95.

Reason for revert: looks like breaking a few build bots

Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-06-25 13:33:10 +00:00
John Stiles
e58831cd95 Add format-specifier warnings to SkDebugf.
This CL fixes up many existing format-specifier violations in Skia.
Note that GCC has a warning for formatting nothing, so existing calls to
`SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
These were apparently meant to be used as a place to set a breakpoint.

Some of our clients also use SkDebug with bad format specifiers, so this
check is currently only enabled when SKIA_IMPLEMENTATION is true.

Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-25 11:05:59 +00:00
Florin Malita
7006e15df5 [svg] Allow clients to pass a custom SkFontMgr
Introduce a Builder helper and plumb the client-provided SkFontMgr for
font resolution.

Also clean up some of the legacy SkSVGDom factories.

Bug: skia:10840
Change-Id: I6e1eabe7c257cb75dfdb5bf67054f93f25769027
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333577
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-11-11 01:51:44 +00:00
Florin Malita
b3418103e9 Reland "[svg] Relocate out of experimental"
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

This reverts commit d6cf56fd34.

TBR=

Change-Id: Ibadd7c8dc0464ec0c27841530ade0c2098305d20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327344
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2020-10-16 02:32:41 +00:00
Robert Phillips
d6cf56fd34 Revert "[svg] Relocate out of experimental"
This reverts commit 6fc4106a9d.

Reason for revert: Blocking the Android roll

Original change's description:
> [svg] Relocate out of experimental
>
> Move the SVG rendering code to modules/svg, and componentize.
> Also split into include/src/utils.
>
> As external clients still reference the old header locations,
> introduce temporary forwarding headers to facilitate the migration.
>
> Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

TBR=fmalita@chromium.org,fmalita@google.com,tdenniston@google.com

Change-Id: I386cf77a15a9e1d392029804abaf937dae53f435
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327342
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-15 18:54:18 +00:00
Florin Malita
6fc4106a9d [svg] Relocate out of experimental
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-15 14:36:06 +00:00
John Stiles
7571f9e490 Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'.
Mechanically updated via Xcode "Replace Regular Expression":

  typedef (.*) INHERITED;
    -->
  using INHERITED = $1;

The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.

Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-03 03:41:26 +00:00
Hal Canary
8a027312cd Samples: add name() virtual
Change-Id: I9b6e39bc7e35346bb73dfe014de1c8daa5a92f2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225428
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-03 17:41:16 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Ben Wagner
b2c4ea6219 Move Views into Sample and Viewer.
What is left of the SkView system is used only by samples or viewer.
As a result, move it out of the Skia source tree and re-organize so it
is a bit easier to understand and use more shared code.

Move samplecode/ClockFaceView.cpp to samplecode/SampleTextEffects.cpp,
sice that's what's actually in it.

Move SkAnimTimer.h to tools/timer, since it's actually shared between gm
and samples.

Change-Id: I55dafd94c64e4f930ddbd19168e0f812af86c455
Reviewed-on: https://skia-review.googlesource.com/146161
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-09 15:25:32 +00:00
Hal Canary
0f66681ff1 BUILD: build when !skia_use_expat
Change-Id: I17a695c64be0e2081ad4937b23038b7ce88ae293
Reviewed-on: https://skia-review.googlesource.com/115988
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-22 20:28:45 +00:00
Brian Salomon
d3b65972aa Mark overridden destructors with 'override' and remove 'virtual'
This silences a new warning in clang 5.0

Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8
Reviewed-on: https://skia-review.googlesource.com/10006
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-22 16:06:18 +00:00
Ben Wagner
bf111d7bc9 Move SkOSPath out of include/core.
It is moved to src/utils. It is almost a tool, but has two uses in
src/ports.

The existing SkOSFile.cpp is left empty for the time being since it is
mentioned in Chromium's BUILD.gn for Skia.

Change-Id: I3bb7f7c4214359eb6ab906bfe76737d20bf1d6c7
Reviewed-on: https://skia-review.googlesource.com/4536
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-08 20:20:15 +00:00
fmalita
e1baa7c105 [SVGDom] Expose intrinsic size info
* expose intrinsic size info on <svg> nodes.

  * tweak the SkSVGDOM constructor to no longer take an container size
    param, but instead default to intrinsic size
  * update clients to call SkSVGDOM::setContainerSize() explicitly, when
    needed

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345533002

Review-Url: https://codereview.chromium.org/2345533002
2016-09-14 12:04:30 -07:00
fmalita
851d68aa56 [SVGDom] Deferred SampleApp parsing
Parse SVG files in onOnceBeforeDraw() rather than ctor, to avoid
front-loading a bunch of work when passed a loarge number of SVGs.

R=stephana@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245993002

Review-Url: https://codereview.chromium.org/2245993002
2016-08-15 07:48:47 -07:00
fmalita
b83cdbcbb0 Show SVG file name in SampleApp title
R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2217483002

Review-Url: https://codereview.chromium.org/2217483002
2016-08-04 08:39:41 -07:00
fmalita
6ceef3dd67 Initial SVG model
A minimal subset needed to render tiger.svg: <svg>, <g>, <path>, 'd', 'fill'/'stroke' (color-only), 'transform'.

R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164193002

Review-Url: https://codereview.chromium.org/2164193002
2016-07-26 18:46:34 -07:00