Commit Graph

431 Commits

Author SHA1 Message Date
fmalita
95573e4865 Fix SVG flag iOS linking
TBR=mtklein@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344533002

Review-Url: https://codereview.chromium.org/2344533002
2016-09-14 09:05:43 -07:00
csmartdalton
6270e558c3 Add ContextOptions field to SkCommandLineConfigGpu
Reduces duplicate code by computing the ContextOptions in one spot.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337163002

Review-Url: https://codereview.chromium.org/2337163002
2016-09-13 10:41:50 -07:00
reed
54dc4878b0 add pipecanvas
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201323003

Review-Url: https://codereview.chromium.org/2201323003
2016-09-13 08:09:45 -07:00
reed
42943c8aa9 change SkStreams to work with sk_sp<SkData> instead of SkData*
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002

Review-Url: https://codereview.chromium.org/2333713002
2016-09-12 12:01:44 -07:00
brianosman
0e22eb8e6e Some tests around surface creation and snapshotting with color space
Verify the rules that we're converging on for surfaces:
- For 8888, we only support sRGB-like gamma, or no color space at all.
- For F16, we require a color space, with linear gamma.
- For all other formats, we do not support color spaces.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270823002

Review-Url: https://codereview.chromium.org/2270823002
2016-08-30 07:07:59 -07:00
mtklein
9c5052f16b SkLite*
SkLiteRecorder, a new SkCanvas, fills out SkLiteDL, a new SkDrawable.

This SkDrawable is a display list similar to SkRecord and SkBigPicture / SkRecordedDrawable, but with a few new design points inspired by Android and slimming paint:

  1) SkLiteDL is structured as one big contiguous array rather than the two layer structure of SkRecord.  This trades away flexibility and large-op-count performance for better data locality for small to medium size pictures.

  2) We keep a global freelist of SkLiteDLs, both reusing the SkLiteDL struct itself and its contiguous byte array.  This keeps the expected number of mallocs per display list allocation <1 (really, ~0) for cyclical use cases.

These two together mean recording is faster.  Measuring against the code we use at head, SkLiteRecorder trends about ~3x faster across various size pictures, matching speed at 0 draws and beating the special-case 1-draw pictures we have today.  (I.e. we won't need those special case implementations anymore, because they're slower than this new generic code.)  This new strategy records 10 drawRects() in about the same time the old strategy took for 2.

This strategy stays the winner until at least 500 drawRect()s on my laptop, where I stopped checking.

A simpler alternative to freelisting is also possible (but not implemented here), where we allow the client to manually reset() an SkLiteDL for reuse when its refcnt is 1.  That's essentially what we're doing with the freelist, except tracking what's available for reuse globally instead of making the client do it.

This code is not fully capable yet, but most of the key design points are there.  The internal structure of SkLiteDL is the area I expect to be most volatile (anything involving Op), but its interface and the whole of SkLiteRecorder ought to be just about done.

You can run nanobench --match picture_overhead as a demo.  Everything it exercises is fully fleshed out, so what it tests is an apples-to-apples comparison as far as recording costs go.  I have not yet compared playback performance.

It should be simple to wrap this into an SkPicture subclass if we want.

I won't start proposing we replace anything old with anything new quite yet until I have more ducks in a row, but this does look pretty promising (similar to the SkRecord over old SkPicture change a couple years ago) and I'd like to land, experiment, iterate, especially with an eye toward Android.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2213333002

Review-Url: https://codereview.chromium.org/2213333002
2016-08-06 12:51:51 -07:00
msarett
b8d1aac87a Create a separate src for colorspace tests
This will allow me to run these tests in sRGB mode, while
leaving most of the image tests disabled.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206953006

Review-Url: https://codereview.chromium.org/2206953006
2016-08-04 12:22:06 -07:00
fmalita
a2b9fdfe0b Add an SVG DM source
R=mtklein@google.com,robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2209593004

Review-Url: https://codereview.chromium.org/2209593004
2016-08-03 19:53:36 -07:00
bungeman
38d909ec28 Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.
This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004

Review-Url: https://codereview.chromium.org/2206633004
2016-08-02 14:40:46 -07:00
csmartdalton
e0d362929d Add test configs for instanced rendering
Adds the following configs and enables them on select bots:

  glinst, glinst4, glinstdit4, glinst16, glinstdit16,
  esinst, esinst4, esinstdit4

Makes general changes to GrContextOptions, GrCaps, etc. to facilitate
this.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182783004

Review-Url: https://codereview.chromium.org/2182783004
2016-07-29 08:14:20 -07:00
msarett
50ce1f28ff Add color space xform support to SkJpegCodec (includes F16!)
Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA

Instead of:
RGBA->SkPMColor

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b
Review-Url: https://codereview.chromium.org/2174493002
2016-07-29 06:23:33 -07:00
msarett
39979d8c6b Revert of Add color space xform support to SkJpegCodec (includes F16!) (patchset #9 id:260001 of https://codereview.chromium.org/2174493002/ )
Reason for revert:
Breaking MSAN

Original issue's description:
> Add color space xform support to SkJpegCodec (includes F16!)
>
> Also changes SkColorXform to support:
> RGBA->RGBA
> RGBA->BGRA
>
> Instead of:
> RGBA->SkPMColor
>
> TBR=reed@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b

TBR=mtklein@google.com,reed@google.com,herb@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2195523002
2016-07-28 17:11:18 -07:00
msarett
73d55332e2 Add color space xform support to SkJpegCodec (includes F16!)
Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA

Instead of:
RGBA->SkPMColor

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2174493002
2016-07-28 15:06:16 -07:00
mtklein
25c81d4e65 GN: dm
This builds, links, and runs on Linux.  Have not tried Mac.

I've tested is_debug={true,false} and is_component_build.
It's neat that the component build DM works, but it's also an indication I've missed an essential flag or two... it shouldn't work. :)

The GPU backend isn't working yet, but all the software configurations I've tried look good.

This fleshes out all the other parts of SkCodec too... I noticed we weren't able to decode gifs or webp.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188643002

Review-Url: https://codereview.chromium.org/2188643002
2016-07-27 13:55:27 -07:00
brianosman
efded51cd8 Always supply a color space (sRGB for now) with F16
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177193004

Review-Url: https://codereview.chromium.org/2177193004
2016-07-26 08:11:50 -07:00
mtklein
0f7748ab38 DM: print which task caused the crash.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177843003

Review-Url: https://codereview.chromium.org/2177843003
2016-07-25 15:27:29 -07:00
mtklein
a1ce216390 DM: don't redirect stderr to verbose.log
verbose.log is currently tricky to get to, so it's hurting more than it
helps to direct stderr there.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2178583002

Review-Url: https://codereview.chromium.org/2178583002
2016-07-22 12:23:46 -07:00
msarett
9ce3a543c9 Add capability for SkColorXform to output half floats
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147763002
CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2147763002
2016-07-15 13:54:38 -07:00
reed
babc3de2ce deferred canvas
tries to eliminate unneeded clipRects and concats (and their associated save/restores).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2120333002

Review-Url: https://codereview.chromium.org/2120333002
2016-07-08 08:43:28 -07:00
msarett
db197a54b5 Fix Mac clang linker
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2077353006

Review-Url: https://codereview.chromium.org/2077353006
2016-06-21 09:44:29 -07:00
brianosman
52ede1d905 More removal of SkColorProfileType...
Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
the command line flag that was setting it in DM and nanobench.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002

Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67
Review-Url: https://codereview.chromium.org/2071393002
2016-06-20 08:25:02 -07:00
msarett
d2809573de Support sRGB dsts in opt code
201295.jpg on HP z620 (300x280)

QCMS Xform                    0.418 ms
Skia NEW Xform                0.378 ms

Vs QCMS                       1.11x

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2078623002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2078623002
2016-06-20 06:07:45 -07:00
egdaniel
802acec187 Revert of More removal of SkColorProfileType... (patchset #2 id:20001 of https://codereview.chromium.org/2071393002/ )
Reason for revert:
This was still used in chrome

Original issue's description:
> More removal of SkColorProfileType...
>
> Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
> the command line flag that was setting it in DM and nanobench.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002
>
> Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67

TBR=msarett@google.com,reed@google.com,bsalomon@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2074103004
2016-06-17 15:11:46 -07:00
brianosman
944876f274 More removal of SkColorProfileType...
Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
the command line flag that was setting it in DM and nanobench.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002

Review-Url: https://codereview.chromium.org/2071393002
2016-06-17 13:43:27 -07:00
brianosman
b109b8c5ec Lots of progress on switching to SkColorSpace rather than SkColorProfileType
Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002

Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170
Review-Url: https://codereview.chromium.org/2069173002
2016-06-16 13:03:24 -07:00
brianosman
ab8241880d Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (patchset #10 id:180001 of https://codereview.chromium.org/2069173002/ )
Reason for revert:
Mac crashes in GrUploadPixmapToTexture

Original issue's description:
> Lots of progress on switching to SkColorSpace rather than SkColorProfileType
>
> Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002
>
> Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170

TBR=reed@google.com,herb@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2072813002
2016-06-16 11:41:44 -07:00
brianosman
6a61a87546 Lots of progress on switching to SkColorSpace rather than SkColorProfileType
Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002

Review-Url: https://codereview.chromium.org/2069173002
2016-06-16 11:10:04 -07:00
mtklein
f10637f279 Type-erase SkAutoMutexAcquire and SkAutoExclusive.
This is purely for convenience, to not need to write the lock type
in the guard anymore.  This should all inline away.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055023003

Review-Url: https://codereview.chromium.org/2055023003
2016-06-10 13:56:35 -07:00
mtklein
5b64dab5bc better exclusion for stack traces
Instead of two synchronization systems (in_signal_handler, gMutex),
we can just use one.  This simplifies the signal handler logic to:
   - first thread through grabs the lock, prints what's running and a stack trace,
     then exits
   - all other threads just sit waiting on that lock until exit kills them

Previously I think all threads were racing to exit, which can kill the process
before the printing thread is done.  That truncated the output, which is dumb.

Plus...
   refactor slightly so that crash_handler() shows up at the top of the stack
   trace rather than some odd name for a lambda inside setup_crash_handler().

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2051863002

Review-Url: https://codereview.chromium.org/2051863002
2016-06-09 08:59:48 -07:00
halcanary
4dbbd04314 SkLeanWindows.h: #include "Windows.h" fewer places
$ git grep -l '<windows.h>' include src
    include/private/SkLeanWindows.h

    $ git grep -l SkLeanWindows.h | grep '\.h$'
    include/ports/SkTypeface_win.h
    include/utils/win/SkHRESULT.h
    include/utils/win/SkTScopedComPtr.h
    include/views/SkEvent.h
    src/core/SkMathPriv.h
    src/ports/SkTypeface_win_dw.h
    src/utils/SkThreadUtils_win.h
    src/utils/win/SkWGL.h

The same for  `#include <intrin.h>` that was found in SkMath.h.
Those functions that needed it are moved to SkMathPriv.h.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002

CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng

Review-Url: https://codereview.chromium.org/2041943002
2016-06-07 17:21:10 -07:00
msarett
469f1c503d Use SK_TEST_QCMS to mark qcms test code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2031053005

Review-Url: https://codereview.chromium.org/2031053005
2016-06-06 08:20:38 -07:00
halcanary
45420a945c SkMultiPictureDocument & SkMultiPictureDocumentReader
also, a new DM::Src.

motivation: To be used to test the printing pipeline in Chromium.

BUG=skia:5370

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023593002

Review-Url: https://codereview.chromium.org/2023593002
2016-06-02 12:41:14 -07:00
msarett
9876ac5b30 Create SkColorSpaceXform to handle color conversions
Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952063002

Committed: https://skia.googlesource.com/skia/+/740cc88ee3d63c75e52d31238f2a32600cc57a8c

Review-Url: https://codereview.chromium.org/1952063002
2016-06-01 14:47:18 -07:00
msarett
4a603fc591 Revert of Create SkColorSpaceXform to handle color conversions (patchset #10 id:260001 of https://codereview.chromium.org/1952063002/ )
Reason for revert:
Google3 can't find qcms

Original issue's description:
> Create SkColorSpaceXform to handle color conversions
>
> Also adds testing of qcms color correction, so we can compare
> SkColorSpaceXform outputs to qcms outputs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952063002
>
> Committed: https://skia.googlesource.com/skia/+/740cc88ee3d63c75e52d31238f2a32600cc57a8c

TBR=reed@google.com,scroggo@google.com,mtklein@google.com,herb@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2023093004
2016-06-01 09:16:04 -07:00
msarett
740cc88ee3 Create SkColorSpaceXform to handle color conversions
Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952063002

Review-Url: https://codereview.chromium.org/1952063002
2016-06-01 07:55:30 -07:00
mboc
ee6a9919a3 SkTypeface::MakeFromName to take SkFontStyle.
SkTypeface::MakeFromName currently takes SkTypeface::Style,
which is quite limited. This starts the transition to this
function taking SkFontStyle instead.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002

TBR=reed
He said it sounded like a good idea.

Review-Url: https://codereview.chromium.org/1818043002
2016-05-31 11:42:37 -07:00
herb
ca1ec03c5c Move forceSRGB to SkCommonFlags.
This fixes a duplicate symbol problem with the iOS build.

Add common forceSRGB flag.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2019073002

Review-Url: https://codereview.chromium.org/2019073002
2016-05-27 10:57:58 -07:00
herb
3f9960949c Add forceSRGB flag to dm.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011333002

Review-Url: https://codereview.chromium.org/2011333002
2016-05-27 08:15:05 -07:00
msarett
888dc16684 Test color correction in DM
This will allow me to test and visualize some assumptions
on parsing and applying color profiles.  Also, it should
help me find and fix bugs.

This is certainly not an optimized implementation, and, as
far as I know, it doesn't take any shortcuts to improve
performance.  We'll probably want to do both of these
once we know where it fits in the pipeline.

Right now this test is only run on an arbitrary set of ~100
images from the top 10k skps.  I'll continue to add more
"interesting" images and probably tweak the code as
necessary.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995233003

Review-Url: https://codereview.chromium.org/1995233003
2016-05-23 10:21:17 -07:00
scroggo
f2c96a2a6f Only decode opaque to premul in DM image
Previously, we would test decoding an opaque SkCodec to all three:
kUnpremul,
kPremul,
kOpaque

The image should look the same in all three cases. We already test for
that in CodecTest [1], where we require that the result matches exactly.
CodecTest runs on a smaller set of images, but it covers a variety of
opaque images. No need to test on all opaque images.

Running locally on my Mac laptop, the following command:

    dm --src image --images resources/

dropped from:
5932 srcs
11.2s

to:

3544 srcs
6.69s

for a 40% speedup.

BUG=skia:5307

[1] https://skia.googlesource.com/skia/+/master/tests/CodecTest.cpp#119
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1999593003

Review-Url: https://codereview.chromium.org/1999593003
2016-05-20 11:08:27 -07:00
scroggo
9366aff1fa Stop creating CodecSrcs with unused scale
Only JPEG and WEBP support native scaling, so only create a CodecSrc
with a scale for those types.

If I run

    dm --src image --images resources

this cuts down the number of Srcs from 11063 to 8032. All of these
trimmed Srcs would have failed quickly for each Sink (3 Sinks with the
above flags), but this will avoid creating them.

It drops the runtime on my mac from 13.2s to 11.4s, for about a 14%
speedup.

BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1999103002

Review-Url: https://codereview.chromium.org/1999103002
2016-05-20 08:38:54 -07:00
scroggo
24a9bd711a Reduce the number of BRDSrcs run in DM
Testing to e.g. Index8 is useful, but not usefully different across
all sampleSizes and Modes. (Same for Gray.) Drop several Srcs.

BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990173003

Review-Url: https://codereview.chromium.org/1990173003
2016-05-20 06:02:42 -07:00
msarett
d1227a7417 Delete SkBitmapRegionCanvas
This was an approach we considered for implementing Android's
BitmapRegionDecoder.

It was useful for testing and comparison, but now is no longer worth
maintaining and testing.

The approach to subset/scaled decodes (clipped decode, then scale)
may be worth reconsidering at some point.

BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990543002

Review-Url: https://codereview.chromium.org/1990543002
2016-05-18 06:23:57 -07:00
scroggo
12e2f50569 Only run kStripe_Mode on JPEGs
It was designed to test code in libjpeg-turbo. Skipping scanlines is
tested more generally in other tests.

BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978013002

Review-Url: https://codereview.chromium.org/1978013002
2016-05-16 09:04:18 -07:00
scroggo
f8dc9df9ab Drop AndroidCodecSrc::kDivisor_Mode
This is redundant with BRD tests.

BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1976303002

Review-Url: https://codereview.chromium.org/1976303002
2016-05-16 09:04:14 -07:00
bungeman
13b9c95295 Move SkTypeface to sk_sp.
Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933393002

Review-Url: https://codereview.chromium.org/1933393002
2016-05-12 10:09:31 -07:00
scroggo
9a9a7b29e5 Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of https://codereview.chromium.org/1933393002/ )
Reason for revert:
fontmgr_iterAndroid failing to draw emoji. E.g. https://gold.skia.org/search2?blame=6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm

Original issue's description:
> Move SkTypeface to sk_sp.
>
> Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f

TBR=reed@google.com,fmalita@chromium.org,tomhudson@google.com,bungeman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1974783002
2016-05-12 06:22:30 -07:00
bungeman
6296da736f Move SkTypeface to sk_sp.
Review-Url: https://codereview.chromium.org/1933393002
2016-05-11 12:38:18 -07:00
bsalomon
8b7451aaf6 Turn ContextInfos returned by GrContextFactory into structs.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966013002

Review-Url: https://codereview.chromium.org/1966013002
2016-05-11 06:33:06 -07:00
brianosman
05c987cee3 Make DM fail if no configs were successfully created
BUG=skia:5261
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957273002

Review-Url: https://codereview.chromium.org/1957273002
2016-05-09 13:42:16 -07:00
reed
086eea93b1 Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (patchset #1 id:1 of https://codereview.chromium.org/1948193002/ )
Reason for revert:
broken the Mac and Linux builders, e.g.:

https://build.chromium.org/p/chromium/builders/Mac/builds/15151
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052

Original issue's description:
> SK_DECLARE_STATIC_MUTEX -> static SkMutex
>
> There's no need to use a macro to declare static SkMutexes any more
> (and there's likewise no need to restrict them to global scope).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002
>
> Committed: https://skia.googlesource.com/skia/+/5e56cfd3fa1041dbb83899844fb92fa9a2ef1009

TBR=mtklein@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1945353003
2016-05-04 17:12:46 -07:00
mtklein
5e56cfd3fa SK_DECLARE_STATIC_MUTEX -> static SkMutex
There's no need to use a macro to declare static SkMutexes any more
(and there's likewise no need to restrict them to global scope).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002

Review-Url: https://codereview.chromium.org/1948193002
2016-05-04 15:21:12 -07:00
msarett
69deca8d1e Add ColorCodecSrc for testing/comparison on color corrected decodes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933753002

Review-Url: https://codereview.chromium.org/1933753002
2016-04-29 09:38:40 -07:00
halcanary
4b6566644f SkDocument/PDF: new API
has a pdf/a switch.
sets metadata in factory.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1916093002

Review URL: https://codereview.chromium.org/1916093002
2016-04-27 07:45:18 -07:00
bsalomon
71de3537f6 Don't buffer stdout in DM
TBR=egdaniel@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1922223002

Review URL: https://codereview.chromium.org/1922223002
2016-04-26 14:27:21 -07:00
msarett
f3dc188514 Remove redundant tests to make DM a little faster
This should help with some of the slow down caused by
https://codereview.chromium.org/1907593004.

BUG=skia:5181
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1923533002

Review URL: https://codereview.chromium.org/1923533002
2016-04-26 13:06:38 -07:00
msarett
34e0ec40b1 Support the non-native (RGBA/BGRA) swizzle
BUG=skia:4456
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1907593004

Review URL: https://codereview.chromium.org/1907593004
2016-04-22 16:27:24 -07:00
brianosman
3c579dcff8 Move DM png code to picture_utils, for use by other tools.
Planning to re-use this code in skiaserve in an upcoming change.

TBR=mtklein@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1901113002

Review URL: https://codereview.chromium.org/1901113002
2016-04-19 09:18:11 -07:00
brianosman
6b08652abf Several fixes for fp 16 rendering:
With the GPU backend, allow F16 render targets to be created (along with
any other renderable format). We were previously just falling back to 8888.

In SampleApp, if the window configuration is F16, don't render directly
to the primary surface (which is actually sRGB 8888). Intead, make an
off-screen F16 surface, then blit it back to the framebuffer when we're done.

In DM, clamp values outside of [0,1]. These were wrapping, producing very
incorrect images. (Many filters can trigger out-of-range values due to
ringing).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890923003

Review URL: https://codereview.chromium.org/1890923003
2016-04-14 12:39:00 -07:00
mtklein
fbcfd6d060 mojo -> nojo
BUG=skia:4891
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1889543003

Review URL: https://codereview.chromium.org/1889543003
2016-04-14 09:42:34 -07:00
bsalomon
fda880710c Convert some unit tests from running on GL contexts to running on all contexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873313002

Review URL: https://codereview.chromium.org/1873313002
2016-04-11 14:40:50 -07:00
bsalomon
dc0fcd41e7 Vulkan config in dm
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1872283003

Review URL: https://codereview.chromium.org/1872283003
2016-04-11 14:21:33 -07:00
bsalomon
758586c7f1 Make existing unit tests only run on GL contexts
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869503002

Review URL: https://codereview.chromium.org/1869503002
2016-04-06 14:02:39 -07:00
brianosman
898235c486 SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's propagated in a few places so that the backend can do the right thing for L32 vs S32 mode.
Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering.

Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007

Review URL: https://codereview.chromium.org/1845283003
2016-04-06 07:38:23 -07:00
bsalomon
f2f1c17e33 One signature for creating unit tests that run on premade GrContexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860593002

Review URL: https://codereview.chromium.org/1860593002
2016-04-05 12:59:06 -07:00
bsalomon
85b4b53e78 Rename enums in GrContextFactory to remove "GL"
Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004

Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb

Review URL: https://codereview.chromium.org/1845923004
2016-04-05 11:06:27 -07:00
halcanary
94b87bd404 DM/PDF: stop adding unused rasterizer keywords
We can always add it back if we need it in the future.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852713002

Review URL: https://codereview.chromium.org/1852713002
2016-04-04 06:12:15 -07:00
bsalomon
b4b4cf36c6 Revert of Rename enums in GrContextFactory to remove "GL" (patchset #4 id:60001 of https://codereview.chromium.org/1845923004/ )
Reason for revert:
Many GM images unexpectedly changed with this CL.

Original issue's description:
> Rename enums in GrContextFactory to remove "GL"
>
> Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS.
>
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004
>
> Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb

TBR=egdaniel@google.com,jvanverth@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review URL: https://codereview.chromium.org/1856703002
2016-04-04 05:56:59 -07:00
bsalomon
2d9c6f8135 Rename enums in GrContextFactory to remove "GL"
Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004

Review URL: https://codereview.chromium.org/1845923004
2016-04-01 13:38:05 -07:00
bsalomon
273c0f5e87 rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext
rename subclasses

Fix up the EGL native GLTestContext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002

TBR=jvanverth@google.com

Committed: https://skia.googlesource.com/skia/+/4c7f0a16312c374eba4e8d5d46435ce9eb0b9971

Review URL: https://codereview.chromium.org/1849463002
2016-03-31 10:59:06 -07:00
bsalomon
3e4616ff10 Revert of rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext (patchset #5 id:80001 of https://codereview.chromium.org/1849463002/ )
Reason for revert:
breaking bots

Original issue's description:
> rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext
>
> rename subclasses
>
> Fix up the EGL native GLTestContext
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002
>
> TBR=jvanverth@google.com
>
> Committed: https://skia.googlesource.com/skia/+/4c7f0a16312c374eba4e8d5d46435ce9eb0b9971

TBR=jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1850543003
2016-03-31 10:22:40 -07:00
bsalomon
4c7f0a1631 rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext
rename subclasses

Fix up the EGL native GLTestContext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002

TBR=jvanverth@google.com

Review URL: https://codereview.chromium.org/1849463002
2016-03-31 10:07:24 -07:00
bsalomon
3724e574a7 Move SkGLContext and some GrGLInterface implementations to skgputest module
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58

Review URL: https://codereview.chromium.org/1815823002
2016-03-30 18:56:20 -07:00
brianosman
61d3b08138 Enable gpusrgb config on bots.
Don't run the config if we can't get a context with srgb support.
Includes a unit test for that logic.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1846603002

Review URL: https://codereview.chromium.org/1846603002
2016-03-30 11:19:36 -07:00
robertphillips
6f70d43719 Revert of Move SkGLContext and some GrGLInterface implementations to skgputest module (patchset #13 id:240001 of https://codereview.chromium.org/1815823002/ )
Reason for revert:
red bots

Original issue's description:
> Move SkGLContext and some GrGLInterface implementations to skgputest module
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58

TBR=jvanverth@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1845473004
2016-03-30 09:26:24 -07:00
bsalomon
fe3456cb00 Move SkGLContext and some GrGLInterface implementations to skgputest module
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1815823002
2016-03-30 08:35:09 -07:00
benjaminwagner
ec4d4d784d Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow.
The following are currently unused in Android, Google3, Chromium, and Mozilla:
  - SkEvent
  - SkTime::GetMSecs
  - SK_TIME_FACTOR (also unused in Skia)
  - SkAutoTime

I left uses of SkMSec more-or-less intact for SkEvent, SkAnimator, and SkInterpolator. SkInterpolator is used in Chromium, so I did not want to change the API. The views/ and animator/ code is crufty, so it didn't seem worthwhile to refactor it. Instead, I added SkEvent::GetMSecsSinceStartup, which is likely to be adequate for use in SampleApp.

I also left SkMSec where it is used to measure a duration rather than a timestamp. With the exception of SkMovie, which is used in Android, all of the uses appear to measure the execution time of a piece of code, which I would hope does not exceed 2^31 milliseconds.

Added skiatest::Timer to support a common idiom in tests where we want to measure the wallclock time in integer milliseconds. (Not used in tests/PathOpsSkpClipTest.cpp because it redefines things in Test.h.)

Removed tabs in tests/StrokerTest.cpp.

BUG=skia:4632
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811613004

Review URL: https://codereview.chromium.org/1811613004
2016-03-25 12:59:53 -07:00
brianosman
c9ced39213 https://codereview.chromium.org/1830973002 fixed this bug. Re-enable the
tests and remove comments referencing it.

BUG=skia:4822
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1830163002

Review URL: https://codereview.chromium.org/1830163002
2016-03-24 07:27:43 -07:00
msarett
fc0b6d1053 Add SkImageGeneratorWIC
This will be a replacement for SkImageDecoder_WIC.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1785613010
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1785613010
2016-03-17 13:50:18 -07:00
mtklein
a483da395a DM: make --verbose send the vlog to stderr.
See if this works out for you?
I've just turned off --verbose on the bots, so this ought to be safe now.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808203004

Review URL: https://codereview.chromium.org/1808203004
2016-03-17 12:53:36 -07:00
mtklein
c9a9987227 just write the verbose log file any time we have a --writePath
oughta fix the Android bots

TBR=bungeman@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813933002

Review URL: https://codereview.chromium.org/1813933002
2016-03-17 11:58:11 -07:00
mtklein
13bf3396be try to flush stdio in the crash handler
NOTREECHECKS=true

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808853004

Review URL: https://codereview.chromium.org/1808853004
2016-03-17 10:16:12 -07:00
mtklein
18300a3aa7 detach -> release
The C++ standard library uses the name "release" for the operation we call "detach".

Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete).

This was a fairly blind transformation.  There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release".

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809733002

Review URL: https://codereview.chromium.org/1809733002
2016-03-16 13:53:35 -07:00
mtklein
935f1b1a20 Split uninteresting hash lines correctly on Windows.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1806903002

Review URL: https://codereview.chromium.org/1806903002
2016-03-16 08:37:19 -07:00
mtklein
51c8cfc64c Revert of When not writing to file in DM, spew verbose output to stderr (patchset #1 id:1 of https://codereview.chromium.org/1788743002/ )
Reason for revert:
Looks like not all the bots are using --writePath (think, Valgrind, *SAN) so this causes those bots to spew like crazy.

Looks like we need to find a more explicit way to make this mode work.

Original issue's description:
> When not writing to file in DM, spew verbose output to stderr
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1788743002
>
> Committed: https://skia.googlesource.com/skia/+/40dec542cc12b354762bca2c0d68bc419f0cbebd

TBR=egdaniel@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1783603006
2016-03-11 12:59:09 -08:00
yujieqin
7a307df926 Rename the kRAW_SkEncodedFormat to kDNG_SkEncodedFormat as it is actually only used for DNG format
BUG=b/27587823
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1782913002

Review URL: https://codereview.chromium.org/1782913002
2016-03-11 07:32:33 -08:00
egdaniel
40dec542cc When not writing to file in DM, spew verbose output to stderr
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1788743002

Review URL: https://codereview.chromium.org/1788743002
2016-03-11 07:14:49 -08:00
brianosman
d93c120852 Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16 and gpusrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750383002

Committed: https://skia.googlesource.com/skia/+/a6f58194733c1c50e4fe5f98585e42344f29b6f0

Review URL: https://codereview.chromium.org/1750383002
2016-03-10 07:49:08 -08:00
msarett
1897631ebe Add an SkImageGeneratorCG
This will serve as a replacement for SkImageDecoder_CG.

BUG=skia:4914
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718273004

Review URL: https://codereview.chromium.org/1718273004
2016-03-09 14:20:58 -08:00
mtklein
c41fd9251d DM: verbose and quiet logging
If you pass no flags, output is pretty much unchanged from today: calls to
info() go to the console, calls to vlog() are ignored.

If you pass --verbose and -w dir, all calls to info(), vlog() and all of stderr
are redirected to dir/verbose.log.  info() calls also go to the console,
unless you pass --quiet, in which case nothing goes to the console at all.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1771143002

Review URL: https://codereview.chromium.org/1771143002
2016-03-08 09:01:39 -08:00
mtklein
4675220000 Archive SkRemote-related code. I want to start fresh.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1774013002

Review URL: https://codereview.chromium.org/1774013002
2016-03-07 17:20:26 -08:00
mtklein
b3b13b7ede dm: log log
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1771993002

Review URL: https://codereview.chromium.org/1771993002
2016-03-07 13:20:52 -08:00
kkinnunen
f655e9330e Revert of Implement support for using GL ES 3.0 with command buffer (patchset #6 id:100001 of https://codereview.chromium.org/1684413003/ )
Reason for revert:
The dependency, ES3 implementation in command_buffer_gles2, got reverted.

Original issue's description:
> Implement support for using GL ES 3.0 with command buffer
>
> Adds a new 'api': --config gpu(api=commandbuffer3) for dm/nanobench.
>
> BUG=skia:4943
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684413003
>
> Committed: https://skia.googlesource.com/skia/+/45c2c8166bbd84a87e29fdd344b39e36e8a28a3f

TBR=bsalomon@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:4943
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744963002

Review URL: https://codereview.chromium.org/1744963002
2016-03-03 07:39:49 -08:00
robertphillips
75467865f5 Fix MSVC 2015 compiler complaint
This is/was slowly, but surely, driving me insane:

DM.cpp(150): warning C4838: conversion from 'DWORD' to 'int' requires a narrowing conversion

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1749363002

Review URL: https://codereview.chromium.org/1749363002
2016-03-01 14:10:23 -08:00
brianosman
744898aa48 Revert of Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pix… (patchset #1 id:1 of https://codereview.chromium.org/1750383002/ )
Reason for revert:
GM breakage. Changes to SkGr.cpp appear to be altering behavior on a variety of tests. Debugging...

Original issue's description:
> Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".
>
> Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750383002
>
> Committed: https://skia.googlesource.com/skia/+/a6f58194733c1c50e4fe5f98585e42344f29b6f0

TBR=mtklein@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1755553003
2016-03-01 13:44:28 -08:00
brianosman
a6f5819473 Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".
Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750383002

Review URL: https://codereview.chromium.org/1750383002
2016-03-01 12:53:06 -08:00
mtklein
819ab10288 print stack trace on crash, tweak formatting, _Exit hard
Mac example:

1 srcs * 1 sinks + 0 tests == 1 tasks
0ns elapsed, 1 active, 0 queued, 11MB RAM, 11MB peak
	f16 gm  dstreadshuffle
../../src/core/SkXfermode.cpp:935: fatal error: ""r.fVec[i] >= min && r.fVec[i] <= max""

Caught signal 6 [Abort trap: 6], was running:
	f16 gm  dstreadshuffle

Stack trace:
    0   dm                                  0x000000010f23fc9d _ZZL19setup_crash_handlervENK3$_5clEi + 397
    1   dm                                  0x000000010f23fb06 _ZZL19setup_crash_handlervEN3$_58__invokeEi + 22
    2   libsystem_platform.dylib            0x00007fff9d44e52a _sigtramp + 26
    3   ???                                 0x00007fff9900b902 0x0 + 140735760349442
    4   libsystem_c.dylib                   0x00007fff96a836e7 abort + 129
    5   dm                                  0x000000010fcb67c9 _Z17sk_abort_no_printv + 9
    6   dm                                  0x000000010f90fc1f _ZL11assert_unitRK6SkPM4f + 175
    7   dm                                  0x000000010f90e957 _Z7proc_4fIXadL_ZL10lighten_4fRK4SkNxILi4EfES3_EEE6SkPM4fRKS4_S6_ + 103
    8   dm                                  0x000000010f918946 _Z10xfer_u64_nIL7DstType1EEvPK10SkXfermodePyPK6SkPM4fiPKh + 182
    9   dm                                  0x000000010f7a5f3e _ZN22SkState_Shader_BlitterI7State64E9blitAntiHEiiPKhPKs + 398
    10  dm                                  0x000000010f3c730c _ZN9SkBlitter10blitAntiH2Eiijj + 108
    11  dm                                  0x000000010f8d76f4 _ZN25Vertish_SkAntiHairBlitter7drawCapEiiii + 164
    12  dm                                  0x000000010f8d4d92 _ZL16do_anti_hairlineiiiiPK7SkIRectP9SkBlitter + 3058
    13  dm                                  0x000000010f8d40f4 _ZN6SkScan15AntiHairLineRgnEPK7SkPointiPK8SkRegionP9SkBlitter + 900
    14  dm                                  0x000000010f8d8fff _ZL8hairquadPK7SkPointPK8SkRegionP9SkBlitteriPFvS1_iS4_S6_E + 719
    15  dm                                  0x000000010f8da838 _Z9hair_pathILN7SkPaint3CapE0EEvRK6SkPathRK12SkRasterClipP9SkBlitterPFvPK7SkPointiPK8SkRegionS9_E + 1048
    16  dm                                  0x000000010f8d86dc _ZN6SkScan12AntiHairPathERK6SkPathRK12SkRasterClipP9SkBlitter + 44
    17  dm                                  0x000000010f7da8ff _ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixbbP9SkBlitter + 2239
    18  dm                                  0x000000010f774993 _ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixb + 83
    19  dm                                  0x000000010f774031 _ZN14SkBitmapDevice8drawPathERK6SkDrawRK6SkPathRK7SkPaintPK8SkMatrixb + 97
    20  dm                                  0x000000010f773f6b _ZN14SkBitmapDevice8drawOvalERK6SkDrawRK6SkRectRK7SkPaint + 139
    21  dm                                  0x000000010f7b5072 _ZN8SkCanvas10onDrawOvalERK6SkRectRK7SkPaint + 626
    22  dm                                  0x000000010f7b38a5 _ZN8SkCanvas8drawOvalERK6SkRectRK7SkPaint + 69
    23  dm                                  0x000000010f7b9ee6 _ZN8SkCanvas10drawCircleEfffRK7SkPaint + 294
    24  dm                                  0x000000010f614039 _ZN6skiagm14DstReadShuffle9drawShapeEP8SkCanvasP7SkPaintNS0_9ShapeTypeE + 249
    25  dm                                  0x000000010f613b89 _ZN6skiagm14DstReadShuffle6onDrawEP8SkCanvas + 425
    26  dm                                  0x000000010f268b17 _ZN6skiagm2GM11drawContentEP8SkCanvas + 71
    27  dm                                  0x000000010f268a6c _ZN6skiagm2GM4drawEP8SkCanvas + 60
    28  dm                                  0x000000010f25186b _ZNK2DM5GMSrc4drawEP8SkCanvas + 123
    29  dm                                  0x000000010f256de7 _ZNK2DM10RasterSink4drawERKNS_3SrcEP8SkBitmapP9SkWStreamP8SkString + 295
    30  dm                                  0x000000010f246a96 _ZN4Task3RunERKS_ + 358
    31  dm                                  0x000000010f2447e5 _ZZ7dm_mainvENK3$_3clEv + 21
    32  dm                                  0x000000010f2447bd _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZ7dm_mainvE3$_3EEEvDpOT_ + 45
    33  dm                                  0x000000010f24475c _ZNSt3__110__function6__funcIZ7dm_mainvE3$_3NS_9allocatorIS2_EEFvvEEclEv + 44
    34  dm                                  0x000000010f406aba _ZNKSt3__18functionIFvvEEclEv + 26
    35  dm                                  0x000000010f8fc168 _ZN12_GLOBAL__N_110ThreadPool4WaitEP8SkAtomicIiL15sk_memory_order5EE + 328
    36  dm                                  0x000000010f8fc00c _ZN11SkTaskGroup4waitEv + 28
    37  dm                                  0x000000010f23e9c4 _Z7dm_mainv + 1940
    38  dm                                  0x000000010f23fa77 main + 39
    39  dm                                  0x000000010f23e1a4 start + 52
    40  ???                                 0x0000000000000007 0x0 + 7

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1753503002

Review URL: https://codereview.chromium.org/1753503002
2016-02-29 17:02:52 -08:00
brianosman
e9c8442bfc Revert of Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pix… (patchset #3 id:40001 of https://codereview.chromium.org/1746253002/ )
Reason for revert:
Fixing the build.

Original issue's description:
> Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".
>
> Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1746253002
>
> Committed: https://skia.googlesource.com/skia/+/eef980270d3385fee340eb1633962fe3ba8b7132

TBR=mtklein@google.com,egdaniel@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1748823002
2016-02-29 13:55:40 -08:00
brianosman
eef980270d Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".
Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1746253002

Review URL: https://codereview.chromium.org/1746253002
2016-02-29 13:39:09 -08:00
mtklein
15923c9e47 Modernize SkSpinlock.
- Use std::atomic directly.
 - No more need for SkPODSpinlock or SK_DECLARE_STATIC_SPINLOCK.

Now simple code like this works as you'd hope:
    static SkSpinlock gLock;

That is, it starts unlocked and there's no static initializer.

std::atomic_flag would make this terser and standard-guaranteed,
but ATOMIC_FLAG_INIT caused not-yet-implemented errors on MSVC 2013.
The generated code for this approach is identical.

It appears the implicit constructor is constexpr when all the member
initializers are.  I'm hoping this way of producing constexpr constructors
without typing "constexpr" gives us a way to eliminate more SkFoo / SkBaseFoo
distinctions and SK_DECLARE_STATIC_FOO.  This was certainly the easiest.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1734383002

Review URL: https://codereview.chromium.org/1734383002
2016-02-29 10:14:38 -08:00