Commit Graph

236 Commits

Author SHA1 Message Date
Robert Phillips
ffaa47e0fe Roll ANGLE
5978e28d3a..0492d44797

Change-Id: I576dc57619434db7f7e3c82f97473b773307df3c
Reviewed-on: https://skia-review.googlesource.com/19447
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-12 16:00:07 +00:00
Leon Scroggins III
33deb7ed4d Make SkCodec more flexible about its required frame
SkCodec sets fRequiredFrame to be the earliest possible frame that a
given frame can depend on. e.g.

- Frame A fills the screen, Keep
- Frame B does not cover A, Keep
- Frame C covers B but not A, and is opaque

Frame C can depend on either A or B. SkCodec already reports that C
depends on A. This CL allows a client of SkCodec to use either A or
B to create C.

Also expose the DisposalMethod. Since any frame between A and C can
be used to create C except for DisposePrevious frames, the client
needs to be able to know the disposal method so they do not try to
use such a frame to create C.

Further, the disposal method can be used to give the client a better
idea whether they will continue to need a frame. (e.g. if frame i is
DisposePrevious and depends on i-1, the client may not want to steal
i-1 to create i, since i+1 may also depend on i-1.)

TODO: Share code for decoding prior frames between GIF and WEBP

Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6
Reviewed-on: https://skia-review.googlesource.com/13722
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-06-07 20:15:17 +00:00
Robert Phillips
56f6e8355a Roll ANGLE
Change-Id: I7383e63a619772a0274a0e687eafd19a8f068bc7
Reviewed-on: https://skia-review.googlesource.com/18487
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-02 18:36:15 +00:00
Wei-Yin Chen (陳威尹)
56a1e6a109 Reduce absolute paths in generated ninja files in skia
BUG=chromium:723856

Change-Id: Ifa065daddfe1d775e843307587e4007ad6dae6d4
Reviewed-on: https://skia-review.googlesource.com/17802
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-24 20:16:55 +00:00
Kevin Lubick
700a79cfc9 Mark SkGifImageReader destructors with override
Very new versions of Clang (5.0 TOT) call out this problem.

Bug: skia:
Change-Id: If90f658f258ca52ebb21e2352fbf3180c41008bd
Reviewed-on: https://skia-review.googlesource.com/17795
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-05-24 12:56:00 +00:00
Leon Scroggins III
557fbbe05b Add animation support to SkWebpCodec
TBR=reed@google.com
(No change to the public API, but changed a header file)

SkWebpCodec:
- Implement onGetFrameCount, onGetFrameInfo, and onGetRepetitionCount
- Respect the alpha reported by libwebp. Although the spec states that
  it is only a hint, the libwebp encoder uses it properly. Respecting
  allows us to draw opaque images faster and decode them to 565. This
  also matches other SkCodecs (and Chromium).
- onGetPixels:
  - Decode the frame requested, recursively decoding required frame if
    necessary
  - When blending with a prior frame, use SkRasterPipeline

SkCodec:
- Move check for negative index to getFrameInfo
- Reset the colorXform if one is not needed

SkCodecAnimation:
- Add new blend enum, for WebP's (and APNG's) non-blending option

SkFrameHolder:
- New base classes for frames and the owner of the frames, allowing
  code sharing between SkWebpCodec and SkGifCodec (particularly for
  determining whether a frame has alpha and what frame it depends on)
- When moving items from SkGIFFrameContext, use Skia conventions (i.e.
  int instead of unsigned)
- Rename "delay time" to "duration", to match e.g. SkFrameInfo::
  fDuration

SkGifImageReader:
- Move pieces to SkFrameHolder, and adapt to changes made in the
  process
- Make setAlphaAndRequiredFrame (now on the base class SkFrameHolder)
  more general to support webp, and add support for frames that do not
  blend
- Change SkGIFFrameContext from a struct to a class, to match how we
  use the distinction elsewhere (i.e. struct is a small object with
  public fields)
- Rework hasTransparentPixel (now hasTransparency, since it returns true
  in some cases where there is not a transparent pixel) to better fit
  with the modified setAlphaAndRequiredFrame. Also be more consistent
  when there is no transparent pixel but no color map.
- Simplify an if condition that was previously simplified in 2d61e717
  but accidentally got reverted in a4db9be6

CodecAnimTest:
- Test new animated webp files
- Rearrange the test to more cleanly print alpha type mismatches for
  the first frame

resources:
- webp-animated.webp
  - animated webp from Chromium
- blendBG.webp
  - new webp file using bits of webp-animated-semitransparent4.webp
    from Chromium
  - tests required frame and alpha when using the non-blending mode
  - frames have the following properties:
    - Frame 0: no alpha, fills screen
    - Frame 1: alpha, fills screen
    - Frame 2: no alpha, fills screen
    - Frame 3: alpha, fills screen, blendBG
    - Frame 4: no alpha, fills screen, blendBG
    - Frame 5: alpha, blendBG
    - Frame 6: covers 4, has alpha, blendBG
  - also used to test decoding to 565 if the new frame data has alpha
    but blends onto an opaque frame

DM.cpp:
- Test animated images to non-native 8888 and unpremul

DMSrcSink.cpp:
- Do not test non-native 8888 decodes to f16 dst
- Test unpremul decodes to f16
- Copy a frame of an animated image prior to drawing, since in unpremul
  mode, the DM code will premultiply first.

Bug: skia: 3315
Change-Id: I4e55ae2ee5bc095b37a743bdcfac644be603b980
Reviewed-on: https://skia-review.googlesource.com/16707
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-05-23 15:28:37 +00:00
Brian Osman
bc262e110a Revert "Remove compressed (ETC1) texture support from Ganesh"
This reverts commit ee26363aaa.

Reason for revert: Failing Google 3 roll.

Original change's description:
> Remove compressed (ETC1) texture support from Ganesh
> 
> Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
> Reviewed-on: https://skia-review.googlesource.com/17456
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie1a57187287e03600a69e374501478e93c41415c
Reviewed-on: https://skia-review.googlesource.com/17527
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-22 20:14:50 +00:00
Robert Phillips
ee26363aaa Remove compressed (ETC1) texture support from Ganesh
Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
Reviewed-on: https://skia-review.googlesource.com/17456
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 18:02:52 +00:00
Greg Daniel
ec6ae52168 Use system Vulkan headers except when no building with vulkan support
We now will always use the system vulkan.h files whenever we are building
with vulkan. With non vulkan builds we use our checked in header to so
that we can get the needed symbols for compiling.

Bug: skia:
Change-Id: I352a3e007b33c575cefcfd6752db0b3b12b86a16
Reviewed-on: https://skia-review.googlesource.com/14270
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-25 18:30:37 +00:00
Greg Daniel
c819e66993 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reland of the reverted cl: https://skia-review.googlesource.com/13804

Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 13:09:27 +00:00
Greg Daniel
5238f994bf Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit 3a3bc42b7d.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> This is a reupload of CL: https://skia-review.googlesource.com/13651
> 
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 14:44:47 +00:00
Greg Daniel
3a3bc42b7d Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 13:58:52 +00:00
Greg Daniel
df07ddd1f0 Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit edbb7d8860.

Reason for revert: breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 01:22:52 +00:00
Greg Daniel
edbb7d8860 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:35:22 +00:00
Leon Scroggins III
249b8e3a2b Switch SkCodec to int for counts and indices
This matches other Skia APIs. size_t was adopted from blink/
GIFImageReader.

Change-Id: Ic83e59f0942f597c4fb834e623acd9886ad483fe
Reviewed-on: https://skia-review.googlesource.com/13274
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Chris Blume <cblume@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-04-17 17:38:35 +00:00
Leon Scroggins III
a4db9be6a2 Correct GIF frame dependencies and track alpha
Add SkCodec::FrameInfo::fAlphaType. The SkImageInfo for the SkCodec
specifies the SkAlphaType for the first frame, but the opacity can vary
from frame to frame.

When determining the required frame, also compute whether a frame has
alpha. Update how we determine the required frame, which had bugs.
(Update a test that had an incorrect required frame as a result.)

Add new test images covering cases that have been fixed:
- randPixelsAnim2.gif
It has the following frames:
A (keep)
B (keep) (subset)
C (disposePrevious) (covers B)
D (any) (does *not* cover B)

B and C depend on A, but D depends on B, since after disposing C, B
should be visible again.

- alphabetAnim.gif
Includes frames which fill the image size, with different disposal
methods and transparencies.

Change-Id: Ie086167711c4cac4931ed8c4ddaeb9c9b0b91fdb
Reviewed-on: https://skia-review.googlesource.com/9810
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-11 15:05:05 +00:00
Leon Scroggins III
2d61e71700 Simplify subset computation in SkGifImageReader
If xOffset or yOffset was not zero, these computations would not
be evaluated anyway, so no need to add zero for these comparisons.

(Split off from CL 9810)

Change-Id: I8481eb257d96766696945cef4eafaff4281fb7d9
Reviewed-on: https://skia-review.googlesource.com/11782
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-04-07 15:04:33 +00:00
Matt Sarett
46a45ba907 Revert "Manual revert: Add support for writing ICC profiles to webp encoder"
This reverts commit 4293a1e5f2.

Reason for revert: Relanding, libwebp updated in Android master

Original change's description:
> Manual revert: Add support for writing ICC profiles to webp encoder
> 
> Bug: skia:
> Change-Id: I4e70bee8c2ea8dbd5ae1e84aa097f5a7e2e62721
> Reviewed-on: https://skia-review.googlesource.com/11444
> Reviewed-by: Matt Sarett <msarett@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I73aa9e8183241ada4ec6451567bce3d3d18995cc
Reviewed-on: https://skia-review.googlesource.com/11523
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-06 20:34:45 +00:00
Matt Sarett
4293a1e5f2 Manual revert: Add support for writing ICC profiles to webp encoder
Bug: skia:
Change-Id: I4e70bee8c2ea8dbd5ae1e84aa097f5a7e2e62721
Reviewed-on: https://skia-review.googlesource.com/11444
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-06 14:43:11 +00:00
Matt Sarett
3dbef9f184 Revert "Revert "Add support for writing ICC profiles to webp encoder""
This reverts commit e87d7781db.

Reason for revert: Not the cause of the crashes.

Original change's description:
> Revert "Add support for writing ICC profiles to webp encoder"
> 
> This reverts commit 0c9d0b4e03.
> 
> Reason for revert: Looks like it's breaking a number of bots.
> 
> Original change's description:
> > Add support for writing ICC profiles to webp encoder
> > 
> > Bug: skia:
> > Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab
> > Reviewed-on: https://skia-review.googlesource.com/10212
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > 
> 
> TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Ic06ad9f19a4d743b34f8d3bd33f171b9d74badcb
> Reviewed-on: https://skia-review.googlesource.com/11408
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 

TBR=jvanverth@google.com,msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I42f6ddefaf87c87b155640950b52a456952130ec
Reviewed-on: https://skia-review.googlesource.com/11410
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-05 22:33:28 +00:00
Jim Van Verth
e87d7781db Revert "Add support for writing ICC profiles to webp encoder"
This reverts commit 0c9d0b4e03.

Reason for revert: Looks like it's breaking a number of bots.

Original change's description:
> Add support for writing ICC profiles to webp encoder
> 
> Bug: skia:
> Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab
> Reviewed-on: https://skia-review.googlesource.com/10212
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,jzern@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic06ad9f19a4d743b34f8d3bd33f171b9d74badcb
Reviewed-on: https://skia-review.googlesource.com/11408
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-04-05 21:56:14 +00:00
Matt Sarett
0c9d0b4e03 Add support for writing ICC profiles to webp encoder
Bug: skia:
Change-Id: If0a8f84ed88da96924370b841f2283c0ff8e32ab
Reviewed-on: https://skia-review.googlesource.com/10212
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-04-05 21:33:14 +00:00
Mike Klein
ec3bdbb639 Turn on x86-specific code when building zlib.
The zlib source we DEPS in for testing has been patched with x86
optimizations, some requring SSE2, some SSE4.2, and some PCLMULQDQ
(between SSE4.2 and AVX).

Might as well turn them on?

zlib actually boils everything down into one do-we-have-everything bit.
That's a little weird... I don't see any real reason not to use
fill_window_sse() on a machine with SSE2 but not SSE4.2.  Whatever.

While tweaking libpng settings is really where it's at to make PNG
encoding faster, this is kind of a nice little cherry on top.  Won't
help people who are using their own zlib, of course.

BUG=skia:6409

Change-Id: I459689069f7559365a66d0d29b33664907704d8e
Reviewed-on: https://skia-review.googlesource.com/10033
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-23 13:36:31 +00:00
Ethan Nicholas
dc3c336c84 fixed missing dependency in spirv-tools/BUILD.gn
Change-Id: Ib0381e2bc10649e62d3fb8ddfc34be46537a2e5b
Reviewed-on: https://skia-review.googlesource.com/9804
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-03-16 16:58:48 +00:00
Ethan Nicholas
a6ae1f7cda wired up SPIR-V validator
Change-Id: I33dfd5e7ea3ea048b88c6db2f14389b16a0af7c8
Reviewed-on: https://skia-review.googlesource.com/9688
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-16 14:42:20 +00:00
Ben Wagner
462c4bd6eb Roll freetype.
08fd250e1a..447a0b6263

Change-Id: I5406cd19cb7484c2cc1e24dc01bd37671f2456ec
Reviewed-on: https://skia-review.googlesource.com/9689
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-03-15 14:16:22 +00:00
Matthew Leibowitz
3150ec6be9 Added support for building for tvOS
This change is just to add support for building for tvOS.
It is exactly the same as iOS, just using a different SDK.

I had to change the two lines for libjpeg-turbo so that
it will run for both tvOS and iOS.

BUG=skia:

Change-Id: I6ae5fc4257df74c0f321e5d2d71584f6a52ec3a6
Reviewed-on: https://skia-review.googlesource.com/9660
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-14 22:55:04 +00:00
Matt Sarett
b733320ab1 Delete yasm config files
These aren't currently being used.

Our clients typically compile libjpeg-turbo themselves and use their
own yasm to build the .asm files.

For the libjpeg-turbo that we use to test, we don't compile the
.asm optimizations.  Maybe we should do this...  But while we don't
there is no need for the yasm config files.

BUG=skia:

Change-Id: I903a47ce444b6740b32fe8d99472c4d959058f7b
Reviewed-on: https://skia-review.googlesource.com/9238
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-04 21:54:29 +00:00
Mike Klein
e459afd6ce Strengthen is_official_build, update docs.
This makes is_official_build turn off all development targets and
features in Skia, including building third-party dependencies from
source.

This will intentionally break some external users, who will find
themselves no longer able to find third-party headers or link against
third-party libraries.  These users have been building with our testing
third-party dependencies unknowingly.  They'll need to either explicitly
turn back on building each dependency from source
(skia_use_system_foo=false) or disable that dependency entirely
(skia_use_foo=false).

is_skia_standalone is now basically !is_official_build, so I've
propagated that through, removing is_skia_standalone.  In a few places
we were using it as a stand-in for defined(ndk), so I've just written
defined(ndk) there.  Duh.

gn_to_bp:

    is_offical_build's new strength also makes gn_to_bp.py simpler to
    write.  In spirit, Android builds are official Skia builds that also
    build DM and nanobench.

    It seems that SkJumper (src/jumper/*) is (unintentionally) enabled
    on Android.  Switching to an is_official_build would have disabled
    that.  But as that accidental launch seems to have gone fine, I've
    kept it explicitly enabled.

    In the end, no changes to Android.bp or its SkUserConfig.h.

The -Mini builder no longer needs to explicitly disable tools.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73
Reviewed-on: https://skia-review.googlesource.com/9190
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-03 15:41:24 +00:00
Ben Wagner
fc497343cb Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: Id7cae439e795b8c9586394f11359fb7fe55e1c0b
Reviewed-on: https://skia-review.googlesource.com/8861
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-24 16:59:05 +00:00
Ben Wagner
97043299cb Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 0f3d0c37db.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
> 
> Allow users to query a typeface's position in variation design space.
> 
> Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
> Reviewed-on: https://skia-review.googlesource.com/8684
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=bungeman@google.com,reed@google.com,reviews@skia.org,drott@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I484fe52c1f89e7b6d0024dcabf7c59d0e8b5b5e7
Reviewed-on: https://skia-review.googlesource.com/8929
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-23 20:48:53 +00:00
bungeman
0f3d0c37db Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
Reviewed-on: https://skia-review.googlesource.com/8684
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-23 18:41:57 +00:00
Ben Wagner
7d07d46638 Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 87e7f820f7.

Reason for revert: Failed a test on Mac

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
> 
> Allow users to query a typeface's position in variation design space.
> 
> Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198
> Reviewed-on: https://skia-review.googlesource.com/7130
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=bungeman@google.com,reed@google.com,reviews@skia.org,drott@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia65792083642dbe9333a62eb75d162931b57cffd
Reviewed-on: https://skia-review.googlesource.com/8670
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-17 18:39:09 +00:00
Ben Wagner
87e7f820f7 Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198
Reviewed-on: https://skia-review.googlesource.com/7130
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-17 18:05:47 +00:00
Herb Derby
3bf12c60e2 Remove third_party/ktx from Skia.
Change-Id: I3a1f68b0528f8789af5ccc0704b0a68fe14f52d3
Reviewed-on: https://skia-review.googlesource.com/8319
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-16 20:03:46 +00:00
scroggo
1e532d3ad3 Update libwebp to 0.6.0
Corresponds with Android change
https://android-review.googlesource.com/#/c/326439/

"this version includes encoder and performance improvements"

Update build file
* Many files have been renamed from
    src/<subdir>/<name>.c
      to
    src/<subdir>/<name>_<subdir>.c

* Build new files (*_msa.c, *_neon.c, predictor_enc.c)

This should fix issue 5876, which was caused by a compiler bug.
With the added NEON implementation, we will no longer trigger
the bug.

BUG=skia:5876

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Debug-iOS

Review-Url: https://codereview.chromium.org/2689283007
2017-02-16 05:57:41 -08:00
Matt Sarett
9119de64aa Update libjpeg-turbo to 1.5.1, enable arithmetic decoding
BUG=skia:4710

Change-Id: Idac44f7bdf140f1288bc1538f28ab1a4e1ccaae6
Reviewed-on: https://skia-review.googlesource.com/8274
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-02-13 15:36:42 +00:00
Brian Osman
79086b94ed Integrate the ImGui library with viewer
Code and docs are at: https://github.com/ocornut/imgui

ImGui is an open source immediate mode GUI library that's
lightweight and fairly simply to integrate. Widget functions
return their state, and the library emits vertex and index
data to render everything. It's got a huge set of built-in
widgets and really robust layout control.

For the initial integration, I had to fix up event handling
in the viewer's app framework (to get mouse wheel and more
keys, etc...).

The new viewer 'Debug' window is toggled with the space bar.
For this change, I've added one feature to that window: the
slide picker. It's got a list of all slides, with filtering
support, and the ability to click to switch slides.

I also included the ImGui 'Demo' window (toggled with 'g').
This is nicely laid out, and includes examples of pretty
much everything the library can do. It also serves as good
documentation - find something that looks like what you want,
and then go look at the corresponding code (all of it is in
imgui_demo.cpp).

I have other CLs with other features (like directly editing
the primaries of the working color space), but I wanted to
land this chunk first, then start adding more features.

Other than adding new debugging features, there are few
more outstanding work items:

1) Raster doesn't render the GUI correctly, due to non-
invertible pos -> UV matrices. Florin is working on that.
2) Touch inputs aren't being routed yet, so the GUI isn't
usable on Android yet. Might also be tough to work with,
given the size.
3) ImGui has clipboard integration (that's why it wants
the C, X, and V keys), but we need to wire it up to the
OS' clipboard functions.
4) Draw commands can carry a void* payload to support
drawing images (using whatever mechanism the engine has).
I'd like to set that up (probably using SkImage*), which
makes it really easy to add visualization of off-screen
images in GMs, etc...

BUG=skia:

Change-Id: Iac2a63e37228d33141cb55b7e4d60bf11b7e9ae1
Reviewed-on: https://skia-review.googlesource.com/7702
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-10 19:17:03 +00:00
Herb Derby
5881e82060 Remove dep from ktx to SkTextureCompressor.
If this breaks anything in google3 revert it.

Change-Id: I35eb588e753a6fad78c1255556daae145533c801
Reviewed-on: https://skia-review.googlesource.com/8275
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-02-09 22:10:16 +00:00
Hal Canary
6d75d119dc harfbuzz 1.3.0 → 1.4.2
Change-Id: I0c2f050c70755523abfbe98c17e90a90ecbedff5
Reviewed-on: https://skia-review.googlesource.com/8113
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-02-07 16:01:57 +00:00
Mike Klein
94151daec4 Remove unused files in third_party/libsdl.
Change-Id: I44c95341e7bc631322a9802bce3fdc5a0e8c4bb5
Reviewed-on: https://skia-review.googlesource.com/8066
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-02-06 18:25:22 +00:00
Leon Scroggins III
e4ba1059dd GIF: Only report a frame after knowing dependency
Previously, getFrameInfo might report a frame that was truncated prior
to setting its requiredFrame. As a result, fRequiredFrame may be
different depending on how much data has already been received.

If there is a local color table, do not report the frame until the
color table has been received, since that is used to determine
fRequiredFrame. If there is no local color table, set fRequiredFrame
and report the frame after reading the header.

Add a test.

Replace make_from_resource with GetResourceAsData

Change-Id: I1b697f766c1d0e1e12ab2ae1d27167af5193395d
Reviewed-on: https://skia-review.googlesource.com/7756
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-01-30 21:22:29 +00:00
Leon Scroggins III
6ccd2cabaa Generate Android build targets for dm and nanobench
Generate targets for dm and nanobench from ninja and add them to the
generated Android.bp file.

Remove nanobenchAndroid and SkAndroidSDKCanvas. These rely on HWUI
internals and are currently unused.

Update gyp file references to removed files, just in case.

Change-Id: Ic6ae18a70bfd0c33804e7996d077f2081dfdfe07
Reviewed-on: https://skia-review.googlesource.com/7635
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-01-27 20:02:23 +00:00
Ethan Nicholas
ab23acf4fa Revert "Update libwebp to 0.6.0-pre"
This reverts commit e2f6ffbf49.

Reason for revert:

iOS build failures, see https://luci-milo.appspot.com/swarming/task/33e5e02cf8419d10/steps/build_iOSShell/0/stdout

Original change's description:
> Update libwebp to 0.6.0-pre
> 
> Corresponds with Android change
> https://android-review.googlesource.com/#/c/326439/
> 
> "this prerelease snapshot includes encoder and performance
> improvements"
> 
> Update build file
> * Many files have been renamed from
>     src/<subdir>/<name>.c
>       to
>     src/<subdir>/<name>_<subdir>.c
> 
> * Build new files (*_msa.c, *_neon.c, predictor_enc.c)
> 
> This should fix issue 5876, which was caused by a compiler bug.
> With the added NEON implementation, we will no longer trigger
> the bug.
> 
> BUG=skia:5876
> 
> Change-Id: I0fcce4362ee70138547b1d23aa9ef537a4126e73
> Reviewed-on: https://skia-review.googlesource.com/7376
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:5876

Change-Id: Ib81f63861d9f1c6936bd7f790b5e16a9544a4df0
Reviewed-on: https://skia-review.googlesource.com/7420
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-01-23 20:47:46 +00:00
Leon Scroggins III
e2f6ffbf49 Update libwebp to 0.6.0-pre
Corresponds with Android change
https://android-review.googlesource.com/#/c/326439/

"this prerelease snapshot includes encoder and performance
improvements"

Update build file
* Many files have been renamed from
    src/<subdir>/<name>.c
      to
    src/<subdir>/<name>_<subdir>.c

* Build new files (*_msa.c, *_neon.c, predictor_enc.c)

This should fix issue 5876, which was caused by a compiler bug.
With the added NEON implementation, we will no longer trigger
the bug.

BUG=skia:5876

Change-Id: I0fcce4362ee70138547b1d23aa9ef537a4126e73
Reviewed-on: https://skia-review.googlesource.com/7376
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-01-23 20:23:59 +00:00
Hal Canary
95e3c058ef SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).

  * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h

  * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"

Revert "Revert 'SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h'"
This reverts commit c456b73fef.

Change-Id: Ie2c1a17c20134b8ceab85a68b3ae3e61c24fbaab
Reviewed-on: https://skia-review.googlesource.com/6886
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-11 18:55:34 +00:00
Kevin Lubick
c456b73fef Revert "SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h"
This reverts commit a5494f1170.

Reason for revert: Broke Google3

Original change's description:
> SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
> 
>   * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).
> 
>   * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h
> 
>   * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"
> 
> Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88
> Reviewed-on: https://skia-review.googlesource.com/4543
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
> 

TBR=halcanary@google.com,bungeman@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie8bd176121c3ee83c110d66c0d0ac65e09bfc9c5
Reviewed-on: https://skia-review.googlesource.com/6884
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2017-01-11 17:22:12 +00:00
Hal Canary
a5494f1170 SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).

  * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h

  * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"

Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88
Reviewed-on: https://skia-review.googlesource.com/4543
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-11 15:36:45 +00:00
Brian Osman
21d742dbaf Get latest ANGLE as of January 6, 2017
Also add ANGLE ES3 predefined configs.

BUG=skia:
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE

Change-Id: Ib7394afa961da1afe91c6dfefe08528273d3087c
Reviewed-on: https://skia-review.googlesource.com/6698
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-11 15:12:40 +00:00
Mike Klein
c0a7a08359 remove xbyak experiment
SkSplicer is better.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I014ec0e9fb00a8a4694d442e672c65402621dc67
Reviewed-on: https://skia-review.googlesource.com/6830
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-10 16:25:10 +00:00