Commit Graph

908 Commits

Author SHA1 Message Date
Brian Osman
ea176c608f Remove scanlineOrder switch statements that always do the same thing
I think these date back to GIF codec having a third value of this enum
that meant "interlaced" ?

Change-Id: Iaff11a55ad3cff44da2307149991a22447dfe746
Reviewed-on: https://skia-review.googlesource.com/119146
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-06 19:59:44 +00:00
Yuqian Li
ea51393ba9 Revert "Exercise the threaded backend in test bots"
This reverts commit a39991ebd7.

Reason for revert: Random bots timeout

Original change's description:
> Exercise the threaded backend in test bots
> 
> We can't draw everything correctly now, but it's at least not crashing.
> 
> The draw_to_canvas is modified by adding flush because now the raster
> canvas also needs flush like GPU canvases because of the threaded
> backend. (Previously, AndroidCodecSrc vetoed GPU (non-raster) sink
> and that's why it was not crashing.)
> 
> 
> Bug: skia:
> Change-Id: I222d706c33e15326e1b97d6bef6c46b8c35cebfd
> Reviewed-on: https://skia-review.googlesource.com/118886
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>

TBR=kjlubick@google.com,stephana@google.com,liyuqian@google.com

Change-Id: Ib1089d937b6e25cc39d90ad4de35b3a4c406f6b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/119100
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-04-06 16:59:14 +00:00
Yuqian Li
a39991ebd7 Exercise the threaded backend in test bots
We can't draw everything correctly now, but it's at least not crashing.

The draw_to_canvas is modified by adding flush because now the raster
canvas also needs flush like GPU canvases because of the threaded
backend. (Previously, AndroidCodecSrc vetoed GPU (non-raster) sink
and that's why it was not crashing.)


Bug: skia:
Change-Id: I222d706c33e15326e1b97d6bef6c46b8c35cebfd
Reviewed-on: https://skia-review.googlesource.com/118886
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-04-06 14:32:43 +00:00
Ben Wagner
1861e88cad Via*::draw to finish before checking.
Currently Via*::draw checks against the reference
immediately, before the sink is completely finished. This causes
via-gl to fail, since GPUSink::onDraw does not even create the
target pixmap until after drawing the Src into the canvas. This puts off
the actual check against the reference until after the sink is finished,
allowing via-gl to work as expected.

Change-Id: If1a19cc73f184b836e3421a03966db0ee9918fbe
Reviewed-on: https://skia-review.googlesource.com/118627
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-05 16:15:33 +00:00
Robert Phillips
e47f0a0f16 Remove old method of drawing DDL SKPs from DM (in favor of ViaDDL method)
Change-Id: I6bb270d9df1c76b9d2e384abde603cdda91c9bb6
Reviewed-on: https://skia-review.googlesource.com/116550
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-03-28 17:21:24 +00:00
Ben Wagner
6ce482aed4 Remove include/svg from public.bzl includes.
It's strange to include it since public.bzl currently excludes all of
the source files that define the symbols declared in the headers in this
directory.

This also fixes the two files which needed to put some of these includes
behind the SK_XML macro. The public.bzl never defines the SK_XML macro,
so there is no need to ever have the include/svg directory on the
include path, even for DM.

Change-Id: I6cc18908aa16cfc914ed9b7ab174d03a0a242aa4
Reviewed-on: https://skia-review.googlesource.com/116547
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-03-27 16:36:29 +00:00
Robert Phillips
cc47335ded Fix flushing of context in ViaDDL
Change-Id: I9f84f4081861e2789b45787405e0f1a5aa87824d
Reviewed-on: https://skia-review.googlesource.com/116546
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-27 16:02:44 +00:00
Robert Phillips
33f02edb14 Switch DDL rendering to be a Via in DM (take 2)
This will let us also render the GMs via DDLs.

TBR=mtklein@google.com
Change-Id: If7c2460d964822a6decc33cf5e8e685e67923127
Reviewed-on: https://skia-review.googlesource.com/116463
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-27 12:37:44 +00:00
Robert Phillips
f14e833392 Revert "Switch DDL rendering to be a Via in DM"
This reverts commit bd2e2a0caf.

Reason for revert: 

Build-Debian9-Clang-x86_64-Debug-MSAN

In file included from ../../../dm/DMSrcSink.cpp:8:
../../../dm/DMSrcSink.h:548:15: error: private field 'fNumDivisions' is not used [-Werror,-Wunused-private-field]
    const int fNumDivisions;

Original change's description:
> Switch DDL rendering to be a Via in DM
> 
> This will let us also render the GMs via DDLs.
> 
> Change-Id: I866a5af66d737473f4760dbc9d45053460c42e6e
> Reviewed-on: https://skia-review.googlesource.com/116021
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: Ice07c25ab29c57b2efb193c03e5504a2ae1a0743
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/116560
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-26 20:58:14 +00:00
Robert Phillips
bd2e2a0caf Switch DDL rendering to be a Via in DM
This will let us also render the GMs via DDLs.

Change-Id: I866a5af66d737473f4760dbc9d45053460c42e6e
Reviewed-on: https://skia-review.googlesource.com/116021
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-03-26 20:30:33 +00:00
Brian Salomon
49edccd775 Remove legacy SkSurface::MakeFromBackendRenderTarget that does not take SkColorType
Bug: skia:6718
Change-Id: Iefec5be49bf7450426c5ddb668f5525876f8ec2d
Reviewed-on: https://skia-review.googlesource.com/116194
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-23 20:44:50 +00:00
Hal Canary
327ef03a01 dm: fix unused-private-field error when skia_use_expat=false
Change-Id: I309aa420a7900c048c34873ede618f123719823c
Reviewed-on: https://skia-review.googlesource.com/115928
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-03-22 17:39:25 +00:00
Brian Salomon
5fba7ad39a Support GL_RGB textures and render targets.
Bug= skia:7533

Change-Id: Iba30e90dbf2574368b773bb5cf2ebd5219559717
Reviewed-on: https://skia-review.googlesource.com/108188
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-03-22 14:49:44 +00:00
Florin Malita
3fae0f3625 [skottie] Simplify DM output
Tweak the Skottie DM strip to facilitate diffing against Lottie results:

  * remove timestamps
  * remove grid
  * always use 200x200 tiles (and a 1000x1000 bitmap size)

TBR=
Change-Id: I870aaa5e19c44f74ee05a8ce72f32d70a26058ef
Reviewed-on: https://skia-review.googlesource.com/114680
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-03-20 15:08:48 +00:00
Brian Salomon
53706774a7 Remove SkSurface::MakeFromBackendTexture variant that doesn't take SkColorType
Bug: skia:6718
Change-Id: I8289c54ca9a5f89d10dc0b0dfe750d4fd1da0b64
Reviewed-on: https://skia-review.googlesource.com/115102
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-19 20:12:05 +00:00
Greg Daniel
7278d68cac Add DoneProc to Promise Images
This proc will notify the client when we will no longer call fulfill on
their promise image so that can delete any meta data they needed to store
to be able to complete the fulfill requests.

Bug: skia:
Change-Id: Ife1e6845f221c31ce1ae2c0d2ba5e4c8f0203b74
Reviewed-on: https://skia-review.googlesource.com/114092
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-03-16 19:27:46 +00:00
Robert Phillips
7f4419696b Make CreateBackendFormatFromTexture shared code
TBR=bsalomon@google.com
Change-Id: I19e6e6c8dc32ba584738545d443de092e4987a5a
Reviewed-on: https://skia-review.googlesource.com/114374
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-15 16:51:36 +00:00
Robert Phillips
7e6dafdfed Prepare ddl skp rendering for prime time
Change-Id: I87742b8ef043588c4e835ab6ec49b217dd49f829
Reviewed-on: https://skia-review.googlesource.com/114289
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-15 11:48:16 +00:00
Robert Phillips
e4aae34f4f Provide promise images when rendering SKPs w/ DDL
Change-Id: I8014693eefb3c7811a1fc0354ee8441c90c97328
Reviewed-on: https://skia-review.googlesource.com/113213
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-14 15:00:12 +00:00
Leon Scroggins III
0118e9756d Remove calls to computeOutputColor- Type and Space
Bug: b/70846442
Test: I5110881203c000474116a94a48f2afc9a9b62001

These methods were already called by the client. The client may have
further overridden the SkColorType (and therefore the SkColorSpace), so
respect their final decision on both.

Change-Id: Iddcf618e474784b0a000fd516250c44285dacc6b
Reviewed-on: https://skia-review.googlesource.com/114062
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-03-13 15:42:52 +00:00
Brian Salomon
b07fd4d7fb Add GPUSink getters to suppress unused field warnings in no gpu build.
Change-Id: Iab66cf3a8fd1d3008f62d832cdb7f9a65b2077f7
Reviewed-on: https://skia-review.googlesource.com/113420
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-09 19:30:15 +00:00
Brian Salomon
26102cb604 Make GrGpu::deleteTestingOnlyBackendTexture() take const GrBackendTexture&
Change-Id: Ibd00d0dc6d8c73628f26851e102defdbafab149b
Reviewed-on: https://skia-review.googlesource.com/113164
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-09 18:20:40 +00:00
Brian Salomon
f865b05fe5 Add GM configs that test rendering to a GL backend texture and render target
This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now.

Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90
Reviewed-on: https://skia-review.googlesource.com/113305
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-09 16:32:10 +00:00
Robert Phillips
0c4b7b1f2f Move internal calls from GrContext to GrContextPriv
A mechanical bulk move just to get these out of the public API.

TBR=bsalomon@google.com
Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3
Reviewed-on: https://skia-review.googlesource.com/112262
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-06 14:23:45 +00:00
Bryce Thomas
95a7b76a44 dm: support printing specific page of mskp to SVG
Currently with dm, it's possible to convert an .mskp to a multi-page PDF as
follows:

    out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
    --config pdf --verbose

The SVG equivalent partially works, although only outputs the first page:

    out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
    --config svg --verbose

This CL adds support for passing extended options to SVG.  Specifically, the
'page' option , which now determines which page of the source mskp gets
converted to the SVG output.  The new syntax is as follows:

    out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
    --config svg[page=2] --verbose

The `[key=value]` syntax is the same extended options syntax currently used by
dm with --config gpu, e.g. `gpu[api=gl,color=8888]`.

BUG=skia:7601

Change-Id: I3523d79b1cdbbba9e80fd46501331877091bdead
Reviewed-on: https://skia-review.googlesource.com/105404
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-03-02 22:20:19 +00:00
Yuqian Li
b8b6253df6 Add threaded backend sink to DM. Fix a scheduler bug.
The bug is spotted by the new sink. I'd expect more bugs to be revealed
and fixed using the new sink.

Bug: skia:
Change-Id: I6b0c9267079fbd6149004f0ecd55ddb179702588
Reviewed-on: https://skia-review.googlesource.com/109720
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-02-25 16:36:24 +00:00
Florin Malita
1022f74375 [skottie] Nested animation support
Extend composition layers to support referencing external .json
animations ("$"<PATH> syntax).

This is a custom extension (not supported in BM/Lottie).

Also make skottie::Animation ref-counted, to facilitate sharing.

TBR=

Change-Id: I062d031e5868d759f3930dea9b261f9b3ec81684
Reviewed-on: https://skia-review.googlesource.com/109806
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-23 19:15:26 +00:00
Ben Wagner
483c772cfd Add nativeFonts flag to Viewer.
This moves DMFontMgr and several related files which are tightly related
to fonts into tools/fonts, moves some flags around to prevent
duplication, and adds the nativeFonts handling to Viewer.

Change-Id: Id1bdad708a6b74319ac5ac9adfe21025db4ca0b2
Reviewed-on: https://skia-review.googlesource.com/108904
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-21 03:31:14 +00:00
Dongwon Kang
0c7861ff0c Start thread pool in skia_dm on Android.
Android media framework is expected to be run with the background
thread pool for handling binder RPC calls.

Test: skia_dm does not hang with heif files.
Bug: 65463215 Bug: 72869975
Change-Id: I2333d5a13d6145e9468464fa93807851e3a17bc8
Reviewed-on: https://skia-review.googlesource.com/108141
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-02-20 15:31:43 +00:00
Mike Klein
c7278ad1d9 register SIGTERM handler in DM
This should make it clear when we are terminated, and print out our
memory usage on the way out the door.

There's no way to register a handler for SIGKILL, so if we're being cut
down that way, we'll have to restructure DM quite a bit internally to
spawn processes instead of threads.  The parent process should be able
to at least notice that child processes have been SIGKILL'd.

(This would be nice anyway, so one crash doesn't ruin our whole run.)

Here's a demo with a slightly hacked up DM to make the demo easy:

    ~/skia (sig↑1|✔) $ ninja -C out dm; and out/dm
    ninja: Entering directory `out'
    [2/2] link dm
    my pid is 65360

    We have been politely asked to die by Terminated: 15 (15).
    Currently using 11MB RAM, peak 11MB.
    fish: 'and out/dm' terminated by signal SIGTERM (Polite quit request)

Bug: skia:7614

Change-Id: Ie43be78fa766433a9d7cf391d78801d4355e635c
Reviewed-on: https://skia-review.googlesource.com/107720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-02-16 15:46:36 +00:00
Mike Reed
7fcfb62199 move a bunch of helpers from SkImageInfo.h into priv
Bug: skia:
Change-Id: I8c91cfdb89e4f22448d1201d391556fe43d86dca
Reviewed-on: https://skia-review.googlesource.com/105289
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-02-09 20:38:32 +00:00
Brian Salomon
bdecacfbe4 Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""""
This reverts commit 3a2cc2c2ec.

Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version

Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab
Reviewed-on: https://skia-review.googlesource.com/103181
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-03 01:59:59 +00:00
Brian Salomon
3a2cc2c2ec Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""
This reverts commit 5bb82cbecd.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
> 
> This reverts commit 18c52a7b52.
> 
> Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"
> 
> 
> Bug: skia:
> Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
> Reviewed-on: https://skia-review.googlesource.com/102940
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/103220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-03 00:25:20 +00:00
Brian Salomon
5bb82cbecd Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
This reverts commit 18c52a7b52.

Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"


Bug: skia:
Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
Reviewed-on: https://skia-review.googlesource.com/102940
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-02 23:37:59 +00:00
Brian Salomon
18c52a7b52 Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""
This reverts commit d0d7270fcc.

Revert "More sample count cleanup:"

This reverts commit d653cac70e.

Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types"

This reverts commit 85ae7159c9.


Need to understand NVPR perf changes before relanding

Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b
Reviewed-on: https://skia-review.googlesource.com/102780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-02 12:19:52 +00:00
Brian Salomon
d0d7270fcc Revert "Revert "Redefine the meaning of sample counts in GPU backend.""
Fixes gpu config default samples to be 1 and updates config parsing test accordingly.

This reverts commit c1ce2f7966.

Bug: skia:
Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f
Reviewed-on: https://skia-review.googlesource.com/102147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 21:15:39 +00:00
Brian Salomon
c1ce2f7966 Revert "Redefine the meaning of sample counts in GPU backend."
This reverts commit 48825b11ad.

Reason for revert: nanobench

Original change's description:
> Redefine the meaning of sample counts in GPU backend.
> 
> Old: 0  -> nonMSAA
>      1+ -> MSAA
> 
> New:
>      0  -> error/unsupported
>      1  -> nonMSAA
>      2+ -> MSAA
> 
> We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:
> 
> 1) SkSurface factories
> 2) GrBackendRenderTarget constructors
> 3) GrCaps::getSampleCnt()'s requestedCount parameter
> 
> However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.
> 
> This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.
> 
> 
> Bug: skia:
> Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
> Reviewed-on: https://skia-review.googlesource.com/101560
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic257619a8a5ee9ac15419ecf10259e42daed7f82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/102662
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 18:34:40 +00:00
Brian Salomon
48825b11ad Redefine the meaning of sample counts in GPU backend.
Old: 0  -> nonMSAA
     1+ -> MSAA

New:
     0  -> error/unsupported
     1  -> nonMSAA
     2+ -> MSAA

We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:

1) SkSurface factories
2) GrBackendRenderTarget constructors
3) GrCaps::getSampleCnt()'s requestedCount parameter

However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.

This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.


Bug: skia:
Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
Reviewed-on: https://skia-review.googlesource.com/101560
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 18:16:58 +00:00
Mike Klein
ac568a934f 1010102, 101010x, 888x in sw
Same sort of deal as before, now with all three new formats.
While I was at it, I made sure RGBA 8888 and BGRA 8888 both work too.

We don't want the 101010's in lowp, but 888x should be fine.

After looking at the DM images on monitors at work, I decided to
re-enable dither even on 10-bit images.

Looking at the GMs in 888x or 101010x is interesting... I think we must
not be clearing the memory allocated for layers?  Seems like we want to
allocate layers as 8888?

Change-Id: I3a85b4f00877792a6425a7e7eb31eacb04ae9218
Reviewed-on: https://skia-review.googlesource.com/101640
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-30 22:02:20 +00:00
Florin Malita
d3c1b84a6e [skottie] Render DM frames out-of-order
To exercise non-monotonic animator progrssions.

TBR=

Change-Id: I53aead5b11adf59d33c9ca4065976996bd09a1e2
Reviewed-on: https://skia-review.googlesource.com/100900
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-27 18:02:15 +00:00
Mike Klein
c8f740168f remove obsolete DM test configs
ViaSingletonPictures simulates a load pattern that Blink no longer produces.

I don't even remember what Via2ndPic and ViaTwice are meant to test,
but I imagine they're quite obsolete.

There was a lingering reference to ViaMojo, which otherwise doesn't exist.

Bug: skia:7544

Change-Id: I033fd344314054ad66c363e5dbd0a373be188069
Reviewed-on: https://skia-review.googlesource.com/88780
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-26 20:30:40 +00:00
Mike Klein
8f11d4dcaf eliminate SK_BUILD_FOR_WIN32
SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing.

Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007

Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561
Reviewed-on: https://skia-review.googlesource.com/99340
Reviewed-by: Mike Reed <reed@google.com>
2018-01-26 19:52:04 +00:00
Mike Klein
5340b3fc43 allow 4444 sw surfaces
c.f. https://skia-review.googlesource.com/c/skia/+/92681

Change-Id: I0e73ee7fd7b6a6c122121fcaddb7abe2af0b8042
Reviewed-on: https://skia-review.googlesource.com/99301
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-24 19:05:40 +00:00
Florin Malita
54f65c473f Skotty -> Skottie
Change-Id: If8b6516024c69b0fc256208874f6666a4e70e12c
Reviewed-on: https://skia-review.googlesource.com/95241
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-17 14:15:36 +00:00
Mike Klein
515bda6811 support gray8 destinations on CPU
- fill in a couple switches to allow software to rasterize gray8
 - add a gray8 config to DM so we can test it
 - enable this config on some bots

Today we draw gray8 using SkRasterPipeline, loading it as {g,g,g,1}
and storing using the same fixed luma math as SkLumaColorFilter.
One day it'd be nice to use the color space's luma vector if present.

Can we support this on GPU?

Change-Id: I4ee661c8bd5f33f5db2433ffb6e1bc2483af8397
Reviewed-on: https://skia-review.googlesource.com/92681
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-09 22:19:58 +00:00
Florin Malita
df2713c447 [skotty] Minor tools tweaks
* fix "show inval" persistency in SkottySlide
  * add frame-stamp to DM film strip

TBR=
Change-Id: I965b28fa25b4d6ddfa1ddf80f5f9187dff3f943c
Reviewed-on: https://skia-review.googlesource.com/92941
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-09 22:06:48 +00:00
Florin Malita
4932807824 [skotty,sksg] Initial image support
TBR=
Change-Id: Ib3c918b1d746e4f190ae05708681f2d5519afdb2
Reviewed-on: https://skia-review.googlesource.com/91980
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-08 18:11:31 +00:00
Florin Malita
124d5afbff [skotty] Speculative g3 DM build fix
Disable Skotty support in G3 for now.

TBR=
Change-Id: Ic64f62bc21e9d4a531cdfa2495710edc1ba531f8
Reviewed-on: https://skia-review.googlesource.com/90029
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-31 22:20:40 +00:00
Florin Malita
fc043dcd55 [skotty] Add Json DM source
Generates a filmstrip with evenly distributed frames for a Skotty animation.

TBR=
Change-Id: Ia89e0d65d59fd5ab4ef221a231e9b3e0c033828a
Reviewed-on: https://skia-review.googlesource.com/90025
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-31 18:44:29 +00:00
Mike Reed
e7a58321bb make InternalOnly_ functions actually private
Bug: skia:
Change-Id: Id06ad4283a0cd9835b3349c783b705b30435855a
Reviewed-on: https://skia-review.googlesource.com/87980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-20 19:32:36 +00:00