Commit Graph

596 Commits

Author SHA1 Message Date
Greg Daniel
54bfb18dad Privately include our version of vulkan header file in all our src files.
This should allow clients to include Skia and their vulkan files in any
order. However, it does require that when clients are building their
files that include skia with vulkan, they must have vulkan/vulkan_core.h
on their include path somewhere.

Bug: skia:
Change-Id: I969db396c92127be7c8df754926d175f38b8aafa
Reviewed-on: https://skia-review.googlesource.com/c/172147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-11-26 15:15:44 +00:00
Leon Scroggins III
c41a5f58b2 Generate Android Framework host-side Skia (linux)
Bug: b/118742766

Update gn_to_bp to write an Android.bp file that will build a host-side
Skia library.

Switch some methods from SK_BUILD_FOR_ANDROID to
SK_BUILD_FOR_ANDROID_FRAMEWORK.

Prior reviews were done at ag/5482397.

gn_to_bp.py:
- Run GN twice - once for android and once for linux
- Disable GPU (depends on a to-be-written host side GL target) and HEIF
  (which relies on Android hardware) on linux
  - TODO: Turn on GPU on linux
- Split sources into everywhere, android-only, and linux-only.
  It seems that Android.bp does not allow using the same cpp
  file in multiple targets.
  - note that we currently *only* divide out the sources. The cflags are
    the same (except for a couple manual ones) and include
    directories are mostly the same (again, except for manual ones).
    Android has a "gpu" include directory, which I don't expect to
    make a difference to the linux build, which isn't using GPU (yet).
- Use the same "custom empty" font manager on the host as on Android
- Write separate SkUserConfig files; one for android and one for linux.
  This allows libskia to force libraries that use it to use the right
  defines by setting export_include_dirs.
- Add extra checks to SkUserConfig.h to ensure we have only the
  appropriate SK_BUILD_FOR macro defined
- Add host_supported: true for libskia

gn_to_bp_utils.py:
- Switch SkUserConfig.h from include guards to pragma once so it is
  easier to append to the end. This matches how Android generally
  includes headers.

BUILD.gn:
- Add skia_use_fixed_gamma_text so host build can use the same SK_GAMMA
  defines as the device.

SkPreConfig.h:
- Stop making SK_BUILD_FOR_ANDROID_FRAMEWORK imply SK_BUILD_FOR_ANDROID.
  The host build needs the former defined but not the latter.

SkRegion.cpp/.h:
- Make toString() SK_BUILD_FOR_ANDROID_FRAMEWORK so it can be called on
  the host.

SkCamera.h/.cpp:
- Switch methods to SK_BUILD_FOR_ANDROID_FRAMEWORK so they can be called
  on the host.
- Make getCameraLocation*() const. They are logically const, and this
  allows removing a const_cast + TODO in hwui.

Change-Id: I771f825d06380e01c0488fd1c00df1d8a2454dc0
Reviewed-on: https://skia-review.googlesource.com/c/171231
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-11-19 17:51:32 +00:00
Leon Scroggins III
be85c19a74 Build custom empty SkFontMgr for Android Framework
Bug: b/118742766

The Android Framework does not need SkFontMgr_android*. Switch it to
using SkFontMgr_custom*. This will also be the SkFontMgr to use when
we're building Skia as a host-side library.

BUILD.gn:
- Rename fontmgr_fuchsia to fontmgr_custom_empty so it can be selected
  specifically by the Android Framework build. Default condition is
  unchanged, so fuchsia will still build it.
- Similarly, create a new argument for fontmgr_android and
  fontmgr_custom, so they can be omitted by the Android Framework build.
  Again, default condition is unchanged, so no other builds should be
  affected.

gn_to_bp.py:
- Set the new arguments to build the files we want.

Change-Id: Ic85db8acd64f625b00fe2c9bc451ae8814d97a59
Reviewed-on: https://skia-review.googlesource.com/c/170725
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-11-13 20:17:10 +00:00
Mike Reed
025f783be8 add guard for fuchsia build
Bug: skia:
Change-Id: I3d4ae7c3dbae63001b2fab02d0f153390973f211
Reviewed-on: https://skia-review.googlesource.com/c/170345
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-12 14:32:29 +00:00
Mike Klein
33ad63aa1e work around Flutter/Fuchsia GN problems
Flutter used to depend on GN subtargets, and while it
doesn't any more, the version in Fuchsia still does.

Change-Id: I6afb95ae6c353bcc78b42fefd37dcdebe76c4aa1
Reviewed-on: https://skia-review.googlesource.com/c/170340
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-11 12:32:05 +00:00
Florin Malita
a8316554cb [skottie] Make animated image support generally available
Consolidate some helpers under skottie_utils, and update all related
tools to support animated images.

TBR=
Change-Id: If08e97143a11d9a414f3230a49ab4284c508b9d0
Reviewed-on: https://skia-review.googlesource.com/c/169342
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-11-10 19:52:19 +00:00
Nigel Tao
612a65dd8b Merge SkFooAdapterCodec impls into one impl
Bug: skia:
Change-Id: I5071e45979c1bbfc56ad994367a039390e2519f9
Reviewed-on: https://skia-review.googlesource.com/c/169920
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-11-09 14:48:44 +00:00
Mike Klein
54378230f8 Reland "simplify disabling effect deserialization"
This reverts commit 34d7a163a4.

Reason for revert: ok now?

Original change's description:
> Revert "simplify disabling effect deserialization"
>
> This reverts commit 5bbf790b5b.
>
> Reason for revert: flutter GN needs some love
>
> Original change's description:
> > simplify disabling effect deserialization
> >
> > Switch to a simple #define instead of conditional build targets.
> >
> > No one changes skia_enable_effects or skia_enable_effects_imagefilters,
> > so we can merge all that together back into :skia.
> >
> > Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
> > Reviewed-on: https://skia-review.googlesource.com/c/169220
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > Commit-Queue: Mike Klein <mtklein@google.com>
>
> TBR=mtklein@google.com,kjlubick@google.com
>
> Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/169222
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Release-Flutter_Android
Change-Id: I534346c3ef3561a871f1af6df976bfee0b48014a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/169640
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-08 14:26:52 +00:00
Mike Klein
6d1df6d9c1 limit visibility of opts and optional targets
These targets are all implementation details of :skia.

Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Release-Flutter_Android
Change-Id: Ife5c0923bf37363516908e524dbea92be67cb965
Reviewed-on: https://skia-review.googlesource.com/c/169223
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-08 12:03:32 +00:00
Mike Klein
607b0a78c1 baby steps to GN check correctness
re-export optional parts of :skia

Now passing,
    $ gn gen out; gn check out :dm

And we think Flutter too.

Change-Id: I4886c484711cce0c18b24828dc659fbf541a8b87
Reviewed-on: https://skia-review.googlesource.com/c/169343
Reviewed-by: Mehmet Fidanboylu <mehmetf@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 21:53:28 +00:00
Mike Klein
34d7a163a4 Revert "simplify disabling effect deserialization"
This reverts commit 5bbf790b5b.

Reason for revert: flutter GN needs some love

Original change's description:
> simplify disabling effect deserialization
> 
> Switch to a simple #define instead of conditional build targets.
> 
> No one changes skia_enable_effects or skia_enable_effects_imagefilters,
> so we can merge all that together back into :skia.
> 
> Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
> Reviewed-on: https://skia-review.googlesource.com/c/169220
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/169222
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 18:52:19 +00:00
Mike Klein
5bbf790b5b simplify disabling effect deserialization
Switch to a simple #define instead of conditional build targets.

No one changes skia_enable_effects or skia_enable_effects_imagefilters,
so we can merge all that together back into :skia.

Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
Reviewed-on: https://skia-review.googlesource.com/c/169220
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 18:20:23 +00:00
Mike Klein
62cc5f5817 move this define to be with its friends in flutter_defines.gni
I'd like to get to the point where the only Flutter-specific
configuration is defines, in flutter_defines.gni.

Change-Id: Idda141c4dcdb5f18275e29d2ab60bb73bf416d59
Reviewed-on: https://skia-review.googlesource.com/c/169102
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 15:56:55 +00:00
Cary Clark
2da9fb8366 refactor bookmaker
mostly create include files with minimum
content

TBR=caryclark@google.com

Bug: skia:
Change-Id: I3db0f913cc108bd5ef8ec6c3b229eaccc3f25198
Reviewed-on: https://skia-review.googlesource.com/c/167302
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-11-01 13:58:32 +00:00
Kevin Lubick
134be1d9ba [canvaskit] Expose nima animation as POC
Still to come, actually exposing drawVertices, and the
other APIs needed.

Had to re-make all the jsfiddles because of an API change
in a previous CL.

Docs-Preview: https://skia.org/?cl=166444
Bug: skia:
Change-Id: I4d4825f6e7b073d6792ab8d99d5117df860d4815
Reviewed-on: https://skia-review.googlesource.com/c/166444
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-10-30 20:15:28 +00:00
Kevin Lubick
d969932474 Refactor Nima code
There were two copies of a Nima "player" and this moves them out of
samplecode/ and viewer/ to experimental/ where it is a bit more
accessible (e.g. for WebAssembly).

Bug: skia:
Change-Id: I05419a352f0d13d16b462a374578107513eb1243
Reviewed-on: https://skia-review.googlesource.com/c/166441
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-30 19:32:52 +00:00
Leon Scroggins III
e93ec68a52 Reland "New GIF codec; new third_party/wuffs dep"
This reverts commit 7d1c9ec49f.

Bug: skia:8235
Change-Id: I830ba00a87e85c80f7e8583f5dfa105cd60029b2
Reviewed-on: https://skia-review.googlesource.com/c/165301
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-26 13:53:04 +00:00
Brian Osman
7d1c9ec49f Revert "New GIF codec; new third_party/wuffs dep"
This reverts commit 60009388be.

Reason for revert: Breaking Google3 roll.

Original change's description:
> New GIF codec; new third_party/wuffs dep
> 
> Bug: skia:8235
> Change-Id: I883e05bc50c48f822b5ac3884f25ae67d21c94a9
> Reviewed-on: https://skia-review.googlesource.com/c/136940
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=scroggo@google.com,nigeltao@google.com

Change-Id: I515c5144d0475173ce8f854f4f00f59c4655fdc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8235
Reviewed-on: https://skia-review.googlesource.com/c/164903
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-25 13:03:10 +00:00
Nigel Tao
60009388be New GIF codec; new third_party/wuffs dep
Bug: skia:8235
Change-Id: I883e05bc50c48f822b5ac3884f25ae67d21c94a9
Reviewed-on: https://skia-review.googlesource.com/c/136940
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-10-24 20:17:59 +00:00
Mike Klein
42bb3604bc Revert "re-enable effect deserialization for flutter"
This reverts commit 798a713685.

Reason for revert: try again with https://skia-review.googlesource.com/c/skia/+/163543 landed.

Original change's description:
> re-enable effect deserialization for flutter
> 
> I've got to figure this is the cause of the broken flutter roll:
> 
>     [ RUN      ] ParagraphTest.SimpleShadow
>     ../../third_party/skia/src/core/SkWriteBuffer.cpp:238: fatal error: "assert(name)"
>     ./flutter/testing/run_tests.sh: line 11: 13151 Trace/breakpoint trap   (core dumped) out/host_debug_unopt/txt_unittests --font-directory=flutter/third_party/txt/third_party/fonts
> 
> Change-Id: Idffbd203c9f790fd7613153d9f7973c7ad0a87a5
> Reviewed-on: https://skia-review.googlesource.com/c/163541
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: I2d30abb1291920048a12c80ec297c0f7d279532e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/163980
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-19 18:14:15 +00:00
Mike Klein
798a713685 re-enable effect deserialization for flutter
I've got to figure this is the cause of the broken flutter roll:

    [ RUN      ] ParagraphTest.SimpleShadow
    ../../third_party/skia/src/core/SkWriteBuffer.cpp:238: fatal error: "assert(name)"
    ./flutter/testing/run_tests.sh: line 11: 13151 Trace/breakpoint trap   (core dumped) out/host_debug_unopt/txt_unittests --font-directory=flutter/third_party/txt/third_party/fonts

Change-Id: Idffbd203c9f790fd7613153d9f7973c7ad0a87a5
Reviewed-on: https://skia-review.googlesource.com/c/163541
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-18 21:16:35 +00:00
Mike Klein
2ba047972a split out effect deserialization, disable in flutter
I think this ought to cut out a bunch of effects in Flutter,
provided they're not looking to deserialize .skps.

Serialization should still work.

Size ought to drop from ~1346880 to 1265506.

Change-Id: I2cd5d7c9b2e890cbe91b02cd00868872f033de5c
Reviewed-on: https://skia-review.googlesource.com/c/163441
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-18 18:54:05 +00:00
Kevin Lubick
32dfdbe1af [canvaskit] Slice out SkPicture
Removes about 120k uncompressed, 40k gzipped

Bug: skia:
Change-Id: I7e0b404f18fc3c6d4ff6b01d2c9bcd657b7d5e07
Reviewed-on: https://skia-review.googlesource.com/c/163246
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-18 14:15:47 +00:00
Kevin Lubick
ca7c297989 Revert "Re-enable NVPR on flutter."
This reverts commit f9c5ca4119.

Reason for revert: The potential root cause of the fucshia roll failure
was removed in https://skia-review.googlesource.com/c/skia/+/162022/11/src/gpu/GrPathRendering_none.cpp

Original change's description:
> Re-enable NVPR on flutter.
> 
> This hopefully fixes fuchsia roll.
> 
> Bug: skia:
> Change-Id: I5c5f28413e45f46e94d54ce75ef5fb19fca32347
> Reviewed-on: https://skia-review.googlesource.com/c/162581
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Iebba700752560b65f20e873910b38be8295e69bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/163122
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-10-17 14:05:21 +00:00
Leon Scroggins III
0b8fcbcfa3 Add fuzzers for SkAndroidCodec & incrementalDecode
Fuzz SkAndroidCodec to help to catch errors in both incrementalDecode
and scanlineDecode. Try a variety of sample sizes, but cap it at 64.
Though sometimes larger sample sizes are used, the lower ones tend to
more common. Also draw the resulting bitmap to verify that we
initialized all pixels.

Independently test incrementalDecode to ensure that it initializes
rowsDecoded.

Change-Id: I20d8a408cd280262fdc62f902a6f04f0f57f5ad2
Reviewed-on: https://skia-review.googlesource.com/c/162025
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-17 12:08:18 +00:00
Greg Daniel
f9c5ca4119 Re-enable NVPR on flutter.
This hopefully fixes fuchsia roll.

Bug: skia:
Change-Id: I5c5f28413e45f46e94d54ce75ef5fb19fca32347
Reviewed-on: https://skia-review.googlesource.com/c/162581
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-16 16:15:47 +00:00
Mike Klein
26a6049beb Flutter also won't need NVPR.
The intersection of devices that Flutter targets
and devices that support NVPR is very slim.

Change-Id: Idcb1278df4895ed253a4c0eb6044c4cc53c68cb8
Reviewed-on: https://skia-review.googlesource.com/c/162100
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-15 15:34:21 +00:00
Kevin Lubick
4bf2c26b93 Remove nvpr from CanvasKit
Saves about 20k uncompressed, 7k compressed.

Bug: skia:
Change-Id: I060c58380f3e3266bca9028ba5ba6aa17ce178dc
Reviewed-on: https://skia-review.googlesource.com/c/161942
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-10-15 14:11:29 +00:00
Mike Klein
36528e91c2 clean up SkPipe
One less SkCanvas subclass to deal with...

Change-Id: I21e81648026be5d732e8d9a28baed55015492a04
Reviewed-on: https://skia-review.googlesource.com/c/161584
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-12 16:50:21 +00:00
Kevin Lubick
93faa6795b Make CCPR optional
This can reduce code size where CCPR is not supported (e.g. WebGL 1.0)

Drops 130k uncompressed, 50k compressed.

Bug: skia:
Change-Id: I8af7e681e1f3520a18e0c0d55e318dcf88206584
Reviewed-on: https://skia-review.googlesource.com/c/161041
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-10 20:20:01 +00:00
Kevin Lubick
f4def34885 Move dumpJSON behind the SK_ENABLE_DUMP_GPU flag
This should trim the code size of a WASM CanvasKit by 10-20KB.

Bug: skia:
Change-Id: Ibf0f8596c04e891e8f7cbc2fa4f1d1852f7cb462
Reviewed-on: https://skia-review.googlesource.com/c/159261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-10-05 18:18:30 +00:00
Greg Daniel
b4d895606f Reland "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
This reverts commit a55e214bbe.

Reason for revert:google3 should be fixed now

Original change's description:
> Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
> 
> This reverts commit 55aea84baa.
> 
> Reason for revert: Google3 roll failing like
> 
> third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found
> #include "../../../third_party/vulkan/SkiaVulkan.h"
> 
> 
> Original change's description:
> > Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> > 
> > This reverts commit 684b506f35.
> > 
> > Reason for revert: Chrome change has landed to fix broken chrome roll.
> > 
> > Original change's description:
> > > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> > >
> > > This reverts commit 6e2d607334.
> > >
> > > Reason for revert: chrome roll
> > >
> > > Original change's description:
> > > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> > > >
> > > > This should allow a client to build a skia library that doesn't use vulkan but still
> > > > has all the public headers defined so that they don't have to build two versions of
> > > > their code.
> > > >
> > > > Bug: chromium:862144
> > > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > > > Reviewed-on: https://skia-review.googlesource.com/158661
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
> > >
> > > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: chromium:862144
> > > Reviewed-on: https://skia-review.googlesource.com/c/159000
> > > Reviewed-by: Mike Klein <mtklein@google.com>
> > > Commit-Queue: Mike Klein <mtklein@google.com>
> > 
> > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> > 
> > Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:862144
> > Reviewed-on: https://skia-review.googlesource.com/c/159145
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> 
> Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159155
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I58f7f8ca5281cd5fe0c145c01e9b9465c9b9ec31
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/159260
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-03 18:44:59 +00:00
Mike Klein
a55e214bbe Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
This reverts commit 55aea84baa.

Reason for revert: Google3 roll failing like

third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found
#include "../../../third_party/vulkan/SkiaVulkan.h"


Original change's description:
> Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> 
> This reverts commit 684b506f35.
> 
> Reason for revert: Chrome change has landed to fix broken chrome roll.
> 
> Original change's description:
> > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> >
> > This reverts commit 6e2d607334.
> >
> > Reason for revert: chrome roll
> >
> > Original change's description:
> > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> > >
> > > This should allow a client to build a skia library that doesn't use vulkan but still
> > > has all the public headers defined so that they don't have to build two versions of
> > > their code.
> > >
> > > Bug: chromium:862144
> > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > > Reviewed-on: https://skia-review.googlesource.com/158661
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
> >
> > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:862144
> > Reviewed-on: https://skia-review.googlesource.com/c/159000
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Mike Klein <mtklein@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> 
> Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159145
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159155
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-03 16:34:23 +00:00
Greg Daniel
55aea84baa Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
This reverts commit 684b506f35.

Reason for revert: Chrome change has landed to fix broken chrome roll.

Original change's description:
> Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
>
> This reverts commit 6e2d607334.
>
> Reason for revert: chrome roll
>
> Original change's description:
> > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> >
> > This should allow a client to build a skia library that doesn't use vulkan but still
> > has all the public headers defined so that they don't have to build two versions of
> > their code.
> >
> > Bug: chromium:862144
> > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > Reviewed-on: https://skia-review.googlesource.com/158661
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
>
> Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159000
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159145
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-10-03 13:30:30 +00:00
Mike Klein
684b506f35 Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
This reverts commit 6e2d607334.

Reason for revert: chrome roll

Original change's description:
> Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> 
> This should allow a client to build a skia library that doesn't use vulkan but still
> has all the public headers defined so that they don't have to build two versions of
> their code.
> 
> Bug: chromium:862144
> Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> Reviewed-on: https://skia-review.googlesource.com/158661
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159000
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-02 18:05:54 +00:00
Greg Daniel
6e2d607334 Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
This should allow a client to build a skia library that doesn't use vulkan but still
has all the public headers defined so that they don't have to build two versions of
their code.

Bug: chromium:862144
Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
Reviewed-on: https://skia-review.googlesource.com/158661
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-02 17:41:53 +00:00
Kevin Lubick
cbcff385c1 Have pathkit use libpathkit.a for faster builds
Of note, it is very important for the -DSK_RELEASE/-DSK_DEBUG
to match between libskia.a and the WASM bindings, otherwise
things like SKDEBUGCODE are sometimes compiled in and sometimes
not, which can cause headaches like sizeof() mismatching between
.cpp files and .h files.

Bug: skia:
Change-Id: Id6ef58c44a7c10014a243b36708e0891514f6008
Reviewed-on: https://skia-review.googlesource.com/158341
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-02 13:27:29 +00:00
Stan Iliev
a7a52b9de3 Fix error at run time to load skottie_android.so
Test: Ran Skottie app
Bug: skia:
Change-Id: I2147433018154069a9294ac80dbeb8692ec748cc
Reviewed-on: https://skia-review.googlesource.com/158441
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2018-10-01 20:46:50 +00:00
Mike Klein
60900b55f9 move skpipe to experimental
Nothing's using it except test tools.
I'd like to make that a bit clearer by getting it out of src.

Disabled the fuzzer.

Removed the bench so Android's building nanobench doesn't block this.

Bug: chromium:886713

Change-Id: I761f52c40171c27ff4b699409b32647e84684ec3
Reviewed-on: https://skia-review.googlesource.com/156240
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-09-21 17:20:25 +00:00
Kevin Lubick
217056c048 [CanvasKit] Implement some basic Canvas/Surface things.
drawText is having issues in a release build.  Skottie sometimes
asserts in debug mode. This possibly has something to do with
memory alignment - like https://skia-review.googlesource.com/c/skia/+/155980
helped fix.

Patchset 9 shows off integrating Skia drawing to
an HTML canvas using Ganesh.

To see it locally, set up https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
and then set $EMSDK to be that directory.  Then run

   make clean
   make local-example

and navigate to http://localhost:8000/skia-wasm/example.html

Patchset 20 shows off Skottie animating directly to a Canvas.

Docs-Preview: https://skia.org/?cl=153882
Bug: skia:
Change-Id: I2ad2f4ffac00925ee901982ccbaeb7aa63b1ea23
Reviewed-on: https://skia-review.googlesource.com/153882
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-09-21 12:03:55 +00:00
Florin Malita
268707284d [skottie] GM exercising external font loading
Sets up a fake web font loader which serves a local/resource font to
the sample text animation.

Also rename resources/skotty/skotty_* -> resources/skottie/skottie_*.

Change-Id: I4af5b24fc3cc5c63c78801979f9be56744047134
Reviewed-on: https://skia-review.googlesource.com/155881
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-09-20 19:05:35 +00:00
Hal Canary
23564b9249 SkDocument: Factories now located in SkPDFDocument.h and SkXPSDocument.h
Change-Id: I48e73b27e52511292c2c0bd51ef0168766f53a80
Reviewed-on: https://skia-review.googlesource.com/152780
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-09-20 18:21:07 +00:00
Nigel Tao
81125c5643 Remove duplicate BUILD.gn configuration
There's another `if (skia_llvm_path != "")` about 40 lines down.

Bug: skia:
Change-Id: I490c0972367d0042e5f87868c0640cc106f6f6c2
Reviewed-on: https://skia-review.googlesource.com/154260
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-09-18 19:48:32 +00:00
Kevin Lubick
bc9a1a837d Make fuzz::next overloads more consistent
Some oss-fuzz bugs (like the linked one) would not reproduce
in Skia proper due to the fact that there were subtle overloads
of the various Fuzz::next() methods in FuzzCanvas.cpp that
were pulled in in Skia proper, but not oss-fuzz.

This puts all of them in to FuzzCommon.h and makes the
matrix and rrect ones opt-in (fuzz_matrix, fuzz_rrect).

Additionally, this renames fuzz.cpp -> FuzzMain.cpp so we
can properly include Fuzz.cpp in oss-fuzz without
having two mains.

Bug: oss-fuzz:10378
Change-Id: I6cf9afb471781b9fadb689482109a1e5662358b5
Reviewed-on: https://skia-review.googlesource.com/154900
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-17 19:20:51 +00:00
Chinmay Garde
d92d035e00 Allow users of Skia to optionally link against X11 and GL on Linux.
Change-Id: Id46986c0c7865d1877766e1584550e0b9e1af6c2
Reviewed-on: https://skia-review.googlesource.com/154803
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-17 19:15:49 +00:00
Florin Malita
bfe876a598 [skottie] Enable skotte_tool on Mac builds
TBR=
Change-Id: I6896c6d52c7f85e5c967920340f873b3f1daf4b3
Reviewed-on: https://skia-review.googlesource.com/151160
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-09-02 16:54:52 +00:00
Herb Derby
33ac15e452 Add an empty typeface for testing
Change-Id: I091389fcc41b9eb5002ae0d005360249b51884d9
Reviewed-on: https://skia-review.googlesource.com/150137
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-08-29 17:27:21 +00:00
Leon Scroggins III
36f7e3298e Reland "Switch SkCodec to use skcms plus fixes""
This reverts commit 83988edfd3.

The CTS failure was actually due to another CL.

TBR=brianosman@google.com
TBR=djsollen@google.com

Bug: skia:6839
Bug: skia:8052
Bug: skia:8278
Change-Id: Id9f152ec2c66467d90f49df223cb9b7c168ac2ac
Reviewed-on: https://skia-review.googlesource.com/149483
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-08-27 16:16:14 +00:00
Leon Scroggins
83988edfd3 Revert "Reland "Switch SkCodec to use skcms" plus fixes"
This reverts commit 49894f450f.

Reason for revert: Breaking a CTS test on the Android roll:

java.lang.AssertionError: expected:<67043583> but was:<50266367>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at android.graphics.cts.BitmapColorSpaceTest.verifyGetPixel(BitmapColorSpaceTest.java:301)
	at android.graphics.cts.BitmapColorSpaceTest.inColorSpaceP3ToSRGB(BitmapColorSpaceTest.java:612)

Expected: 3FF00FF Actual: 2FF00FF

Original change's description:
> Reland "Switch SkCodec to use skcms" plus fixes
> 
> This reverts commit 33d5394d08,
> relanding 81886e8f94 as well as
> "Fix CMYK handling in JPEG codec" (commit
> f8ae5ce20c)
> 
> Add a test based on the CTS test that failed in the original commit.
> purple-displayprofile.png is the image used in the CTS test, with the
> Android license.
> 
> This also adds a fix for SkAndroidCodec, ensuring that we continue to
> use a wide gamut SkColorSpace for images that do not have a numerical
> transfer function and have a wide gamut. This includes a test, with
> wide-gamut.png, which was created with Photoshop and the profile
> "sRGB_Calibrated_Homogeneous.icc" from the skcms tree.
> 
> Bug: skia:6839
> Bug: skia:8052
> Bug: skia:8278
> 
> TBR=djsollen@google.com
> As with the original, no API change
> 
> Change-Id: I4e5bba6a3151f9dc6491e8eda73d4de0535bd692
> Reviewed-on: https://skia-review.googlesource.com/149043
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=djsollen@google.com,mtklein@google.com,scroggo@google.com,brianosman@google.com

Change-Id: Ie71e1fecc26de8225d2fe603765c1e1e0d738634
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6839, skia:8052, skia:8278
Reviewed-on: https://skia-review.googlesource.com/149262
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-08-24 21:41:37 +00:00
Leon Scroggins III
49894f450f Reland "Switch SkCodec to use skcms" plus fixes
This reverts commit 33d5394d08,
relanding 81886e8f94 as well as
"Fix CMYK handling in JPEG codec" (commit
f8ae5ce20c)

Add a test based on the CTS test that failed in the original commit.
purple-displayprofile.png is the image used in the CTS test, with the
Android license.

This also adds a fix for SkAndroidCodec, ensuring that we continue to
use a wide gamut SkColorSpace for images that do not have a numerical
transfer function and have a wide gamut. This includes a test, with
wide-gamut.png, which was created with Photoshop and the profile
"sRGB_Calibrated_Homogeneous.icc" from the skcms tree.

Bug: skia:6839
Bug: skia:8052
Bug: skia:8278

TBR=djsollen@google.com
As with the original, no API change

Change-Id: I4e5bba6a3151f9dc6491e8eda73d4de0535bd692
Reviewed-on: https://skia-review.googlesource.com/149043
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-08-24 17:46:25 +00:00