Commit Graph

22355 Commits

Author SHA1 Message Date
liyuqian
7bde8f813f Warning instead of exception for cmake
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971953003

Review-Url: https://codereview.chromium.org/1971953003
2016-05-12 10:21:17 -07:00
halcanary
dd05e2a96e using_skia_and_harfbuzz: compile w/ Android NDK
TBR=djsollen@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1977503002

Review-Url: https://codereview.chromium.org/1977503002
2016-05-12 10:09:58 -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
liyuqian
40d21de8b6 Use swipe gesture to switch between slides on Android
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1965013007

Review-Url: https://codereview.chromium.org/1965013007
2016-05-12 09:17:04 -07:00
ericrk
a31312cddd SkPictureImageFilter - clear local canvas before use
In SkPictureImageFilter::onFilterImage, we may create two new surfaces,
one for our final output, and one for a local resolution intermediate.

We clear the final output surface before use, removing any previous
content, however we do not do the same for the local surface. This can
lead to content being incorrectly layered on top of previous content
when we go down this path.

This change adds logic to clear the local surface as well.

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

Review-Url: https://codereview.chromium.org/1969193002
2016-05-12 09:06:44 -07:00
brianosman
97fc9308e3 Fix sRGB textures that must be copied (for NPOT tiling, etc...)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1969923002

Review-Url: https://codereview.chromium.org/1969923002
2016-05-12 07:53:46 -07:00
caryclark
4cba202b71 fix hairline clip
Don't remove inner clip if it's non-rectangular.
Add cubic hairline clip code to quad and conic cases.

R=reed@google.com
BUG=skia:5252
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1943403006

Review-Url: https://codereview.chromium.org/1943403006
2016-05-12 07:07:05 -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
scroggo
a1b283345b Fail gracefully if MakeRenderTarget fails
We recently started passing --preAbandonGpuContext when running DM on
valgrind, resulting in this call returning nullptr. We had not been
checking for it, so we crash. Already fixed one in crrev.com/1959173002,
and now we reach another one.

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

Review-Url: https://codereview.chromium.org/1972933002
2016-05-12 06:19:37 -07:00
bsalomon
7c73a53894 Add isEmpty() query to GrShape and improve comments.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971613004

Review-Url: https://codereview.chromium.org/1971613004
2016-05-11 15:15:56 -07:00
cdalton
93a379bd4d Separate user and raw stencil settings
Adds a new GrUserStencilSettings class that describes in abstract terms
how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit,
etc.). GrPipelineBuilder now only defines the GrUserStencilSettings.
When the GrPipeline is finalized, the user stencil settings are then
translated into concrete GrStencilSettings.

At this point, GrClipMaskManager only needs to tell the GrAppliedClip
whether or not there is a stencil clip. It does not need to modify
stencil settings and GrPipelineBuilder does not need
AutoRestoreStencil.

This is one step of the stencil overhaul. In the future it will also
allow us to clean up the special case handling for nvpr and the
stateful fClipMode member of GrClipMaskManager.

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

Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37

Review-Url: https://codereview.chromium.org/1962243002
2016-05-11 13:58:09 -07:00
robertphillips
f8237781d2 Revert of Make SkGpuBlurUtils::GaussianBlur more drawContext centric (patchset #2 id:20001 of https://codereview.chromium.org/1962903003/ )
Reason for revert:
ASAN

Original issue's description:
> Make SkGpuBlurUtils::GaussianBlur more drawContext centric
>
> This is split out of https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962903003
>
> Committed: https://skia.googlesource.com/skia/+/e7ef01dcfda0f8ae407ba92cc03cf3f7841ec470
>
> Committed: https://skia.googlesource.com/skia/+/d38d92f9ca6a58ee51461488f0869343cf7ca083

TBR=bsalomon@google.com,scroggo@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/1964413003
2016-05-11 12:41:35 -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
c8699321b9 Nanobench running on Vulkan
This lets nanobench run but the timings are inaccurate because of missing
implementations of synchronization functions in VkTestContext.

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

Review-Url: https://codereview.chromium.org/1965273004
2016-05-11 11:55:36 -07:00
herb
cf05dcd64b Use common code from SkPM4fPriv
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1967793003

Review-Url: https://codereview.chromium.org/1967793003
2016-05-11 11:53:36 -07:00
brianosman
717abfd2a9 Use GrGammaEffect to support YUV conversion without sRGB write control
BUG=skia:

Review-Url: https://codereview.chromium.org/1970833003
2016-05-11 11:43:35 -07:00
fmalita
748d620adc Harden linear gradients
Ensure that the last offset == 1.0f when implict positions are used
(previously subject to float imprecision).

BUG=skia:5288,chromium:598484
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1974463002

Review-Url: https://codereview.chromium.org/1974463002
2016-05-11 11:39:58 -07:00
herb
87bf8f7d15 Add png for difficult but common blit cases.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1973583002

Review-Url: https://codereview.chromium.org/1973583002
2016-05-11 11:12:17 -07:00
robertphillips
d38d92f9ca Make SkGpuBlurUtils::GaussianBlur more drawContext centric
This is split out of https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)

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

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

Review-Url: https://codereview.chromium.org/1962903003
2016-05-11 11:00:52 -07:00
herb
dd96489390 Refactor sample to share boiler plate code. TODO: move to common calls from SkPM4f.
This preparation to finish handling the rest of the SkColorTypes.

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

Review-Url: https://codereview.chromium.org/1970813002
2016-05-11 10:39:55 -07:00
bsalomon
0fd3c81861 Make unit tests use generic testcontext rather than glcontext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971613003

Review-Url: https://codereview.chromium.org/1971613003
2016-05-11 10:38:06 -07:00
scroggo
6a51491b24 Revert of Make SkGpuBlurUtils::GaussianBlur more drawContext centric (patchset #2 id:20001 of https://codereview.chromium.org/1962903003/ )
Reason for revert:
This looks to be causing errors in Gold.  I don't know if I can make a permanent link to something in Gold, but take a look at imagefilterscropexpand for an example.

Original issue's description:
> Make SkGpuBlurUtils::GaussianBlur more drawContext centric
>
> This is split out of https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962903003
>
> Committed: https://skia.googlesource.com/skia/+/e7ef01dcfda0f8ae407ba92cc03cf3f7841ec470

TBR=bsalomon@google.com,robertphillips@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/1973563002
2016-05-11 10:21:00 -07:00
bsalomon
18a2f9dff8 Add base class for GLTestContext and add new subclass VkTestContext.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1964243003

Review-Url: https://codereview.chromium.org/1964243003
2016-05-11 10:09:18 -07:00
brianosman
393c2ff0d2 Reset context after doing non-Skia GL rendering.
Fixes nanobench crash in GLInstancedArraysBench

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

Review-Url: https://codereview.chromium.org/1969623003
2016-05-11 08:49:59 -07:00
robertphillips
ebf30e8415 Switch GrTextureToYUVPlanes over to newDrawContext calls
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970743002

Review-Url: https://codereview.chromium.org/1970743002
2016-05-11 08:34:39 -07:00
reed
93eeadf7a1 compressed texture support has been broken/untested for a while, remove cruft
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970773002

Review-Url: https://codereview.chromium.org/1970773002
2016-05-11 08:06:11 -07:00
robertphillips
e7ef01dcfd Make SkGpuBlurUtils::GaussianBlur more drawContext centric
This is split out of https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)

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

Review-Url: https://codereview.chromium.org/1962903003
2016-05-11 07:55:35 -07:00
brianosman
fe4d5d3af5 Make GrGammaEffect have explicit sRGB modes, plus exponential mode.
Convert it to a "standard" FP that just transforms the input color.

For now, we still infer the sRGB transfer curves from the exponent,
but I'm hoping that eventually SkGammas will provide us with the
exact curve we're supposed to be applying. In any case, this adds
support for doing the inverse transformation, as well, which will
be needed in an upcoming Vulkan YUV change, among other things.

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

Committed: https://skia.googlesource.com/skia/+/2139303e4c0a9cbcfac695977a80eb026a9296ab

Review-Url: https://codereview.chromium.org/1954863002
2016-05-11 06:49:32 -07:00
scroggo
fbb3102d0e Revert "Add tests and benches to support the sRGB blitter for SkOpts"
This reverts commit 554784cd85 and
1956b4ae1c

Reason for revert - ASAN failures, e.g. from https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN/builds/2233/steps/perf_skia%20on%20Ubuntu/logs/stdio :

  Uninitialized value was created by a heap allocation
    0 0x7f69aa96f799 in operator new[](unsigned long) /b/work/skia/third_party/externals/llvm/out/../projects/compiler-rt/lib/msan/msan_new_delete.cc:37
    1 0x7f69aaa315c1 in SkAutoTArray<unsigned int>::reset(int) /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../include/private/../private/SkTemplates.h:137:22
    2 0x7f69aaa34ee9 in LinearSrcOverBench<SrcOverVSkOptsSSE41>::LinearSrcOverBench(char const*) /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/SkBlend_optsBench.cpp:108:9
    3 0x7f69aaa30cf2 in $_24::operator()(void*) const /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/SkBlend_optsBench.cpp:167:1
    4 0x7f69aaa30c87 in $_24::__invoke(void*) /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/SkBlend_optsBench.cpp:167:1
    5 0x7f69aaa68856 in BenchmarkStream::rawNext() /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:653:32
    6 0x7f69aaa61467 in BenchmarkStream::next() /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:642:25
    7 0x7f69aaa5b703 in nanobench_main() /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:1119:27
    8 0x7f69aaa5e10d in main /b/work/skia/out/Build-Ubuntu-GCC-x86_64-Debug-MSAN/Debug/../../../bench/nanobench.cpp:1290:12
    9 0x7f69a8c95ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

TBR=herb@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1969803002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/1969803002
2016-05-11 06:40:32 -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
bsalomon
70142347f7 Make distance field bounds calculation more accurate for strokes
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1964313002

Review-Url: https://codereview.chromium.org/1964313002
2016-05-11 05:53:07 -07:00
robertphillips
e19aecdd13 Revert of Separate user and raw stencil settings (patchset #8 id:140001 of https://codereview.chromium.org/1962243002/ )
Reason for revert:
This seems to be breaking nanobench on the Windows bots with:

Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION
GrDrawTarget::stencilPath +c7
GrStencilAndCoverPathRenderer::onDrawPath +fd
GrDrawContext::internalDrawPath +509
GrDrawContext::drawPath +223
GrBlurUtils::drawPathWithMaskFilter +250
SkGpuDevice::drawPath +2ea
SkCanvas::onDrawPath +2e3
SkRecordDraw +2e6
SkBigPicture::playback +e5
SkCanvas::onDrawPicture +12c
SkCanvas::drawPicture +145
SkRecordDraw +2e6
SkBigPicture::playback +e5
SkCanvas::onDrawPicture +12c
SkCanvas::drawPicture +145
SkRecordDraw +261
SkBigPicture::playback +e5
SkCanvas::onDrawPicture +12c
SkCanvas::drawPicture +145
SkMultiPictureDraw::draw +bf
SKPBench::drawMPDPicture +1e0
SKPBench::onDraw +34
Benchmark::draw +32
time +92
setup_gpu_bench +6e
nanobench_main +77b

Original issue's description:
> Separate user and raw stencil settings
>
> Adds a new GrUserStencilSettings class that describes in abstract terms
> how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit,
> etc.). GrPipelineBuilder now only defines the GrUserStencilSettings.
> When the GrPipeline is finalized, the user stencil settings are then
> translated into concrete GrStencilSettings.
>
> At this point, GrClipMaskManager only needs to tell the GrAppliedClip
> whether or not there is a stencil clip. It does not need to modify
> stencil settings and GrPipelineBuilder does not need
> AutoRestoreStencil.
>
> This is one step of the stencil overhaul. In the future it will also
> allow us to clean up the special case handling for nvpr and the
> stateful fClipMode member of GrClipMaskManager.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002
>
> Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37

TBR=bsalomon@google.com,cdalton@nvidia.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/1969693003
2016-05-11 05:21:56 -07:00
robertphillips
3e11da7fa9 Revert of Make GrGammaEffect have explicit sRGB modes, plus exponential mode. (patchset #4 id:60001 of https://codereview.chromium.org/1954863002/ )
Reason for revert:
Shader compilation appears to be failing

Original issue's description:
> Make GrGammaEffect have explicit sRGB modes, plus exponential mode.
>
> Convert it to a "standard" FP that just transforms the input color.
>
> For now, we still infer the sRGB transfer curves from the exponent,
> but I'm hoping that eventually SkGammas will provide us with the
> exact curve we're supposed to be applying. In any case, this adds
> support for doing the inverse transformation, as well, which will
> be needed in an upcoming Vulkan YUV change, among other things.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1954863002
>
> Committed: https://skia.googlesource.com/skia/+/2139303e4c0a9cbcfac695977a80eb026a9296ab

TBR=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/1964943003
2016-05-11 05:17:36 -07:00
robertphillips
677da9d4af Minor GrRenderTarget retraction
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1967743003

Review-Url: https://codereview.chromium.org/1967743003
2016-05-11 05:15:56 -07:00
brianosman
2139303e4c Make GrGammaEffect have explicit sRGB modes, plus exponential mode.
Convert it to a "standard" FP that just transforms the input color.

For now, we still infer the sRGB transfer curves from the exponent,
but I'm hoping that eventually SkGammas will provide us with the
exact curve we're supposed to be applying. In any case, this adds
support for doing the inverse transformation, as well, which will
be needed in an upcoming Vulkan YUV change, among other things.

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

Review-Url: https://codereview.chromium.org/1954863002
2016-05-10 20:29:15 -07:00
herb
1956b4ae1c Use proper color type for assert.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1967803002

Review-Url: https://codereview.chromium.org/1967803002
2016-05-10 14:53:34 -07:00
ericrk
154349b6ff Disable unpack row length when uploading mips
When uploading multiple mip levels, the current path which uses
GL_UNPACK_ROW_LENGTH doesn't work (it fails to reset this value,
and is set incorrectly for subsequent mip levels). This leads
to crashes as the buffer Skia provides to GL is not sized correctly.
This change temporarily disables the GL_UNPACK_ROW_LENGTH path when we
are uploading mips. This path was an optimization, so everything should
continue working as expected.

This is a temporary workaround until we can re-structure the code to
set GL_UNPACK_ROW_LENGTH per mip level.

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

Review-Url: https://codereview.chromium.org/1965973002
2016-05-10 14:36:53 -07:00
bungeman
f077324e13 Remove SkFontHost.h.
What is left of this file is now in SkFontLCDConfig.h.

Review-Url: https://codereview.chromium.org/1945883002
2016-05-10 14:32:07 -07:00
msarett
fd0b33dee6 Instruct yasm to compile position independent code on Android
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1965983002

Review-Url: https://codereview.chromium.org/1965983002
2016-05-10 14:30:07 -07:00
cdalton
12dbb3947e Separate user and raw stencil settings
Adds a new GrUserStencilSettings class that describes in abstract terms
how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit,
etc.). GrPipelineBuilder now only defines the GrUserStencilSettings.
When the GrPipeline is finalized, the user stencil settings are then
translated into concrete GrStencilSettings.

At this point, GrClipMaskManager only needs to tell the GrAppliedClip
whether or not there is a stencil clip. It does not need to modify
stencil settings and GrPipelineBuilder does not need
AutoRestoreStencil.

This is one step of the stencil overhaul. In the future it will also
allow us to clean up the special case handling for nvpr and the
stateful fClipMode member of GrClipMaskManager.

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

Review-Url: https://codereview.chromium.org/1962243002
2016-05-10 14:23:01 -07:00
herb
554784cd85 Add tests and benches to support the sRGB blitter for SkOpts
1,370.85 LinearSrcOvericonstrip.pngVSkOptsSSE41
 2,359.69 LinearSrcOvericonstrip.pngVSkOptsDefault
 1,828.72 LinearSrcOvericonstrip.pngVSkOptsNonSimdCore
 3,277.40 LinearSrcOvericonstrip.pngVSkOptsTrivial
 9,862.34 LinearSrcOvericonstrip.pngVSkOptsBruteForce

   633.55 LinearSrcOvermandrill_512.pngVSkOptsSSE41
   684.29 LinearSrcOvermandrill_512.pngVSkOptsDefault
 1,201.88 LinearSrcOvermandrill_512.pngVSkOptsNonSimdCore
 2,382.63 LinearSrcOvermandrill_512.pngVSkOptsTrivial
10,888.74 LinearSrcOvermandrill_512.pngVSkOptsBruteForce

   209.14 LinearSrcOverplane.pngVSkOptsSSE41
   562.24 LinearSrcOverplane.pngVSkOptsDefault
   272.64 LinearSrcOverplane.pngVSkOptsNonSimdCore
   436.46 LinearSrcOverplane.pngVSkOptsTrivial
 1,327.23 LinearSrcOverplane.pngVSkOptsBruteForce

   318.01 LinearSrcOverbaby_tux.pngVSkOptsSSE41
   529.05 LinearSrcOverbaby_tux.pngVSkOptsDefault
   441.33 LinearSrcOverbaby_tux.pngVSkOptsNonSimdCore
   720.50 LinearSrcOverbaby_tux.pngVSkOptsTrivial
 2,191.10 LinearSrcOverbaby_tux.pngVSkOptsBruteForce

   479.68 LinearSrcOveryellow_rose.pngVSkOptsSSE41
 1,095.03 LinearSrcOveryellow_rose.pngVSkOptsDefault
   668.60 LinearSrcOveryellow_rose.pngVSkOptsNonSimdCore
 1,257.19 LinearSrcOveryellow_rose.pngVSkOptsTrivial
 4,970.25 LinearSrcOveryellow_rose.pngVSkOptsBruteForce

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1939513002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/1939513002
2016-05-10 13:33:47 -07:00
bsalomon
c121607122 Fix nvpr path renderer to reject styles with nonDashPathEffects.
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1965903002

NOTRY=true

Review-Url: https://codereview.chromium.org/1965903002
2016-05-10 11:57:04 -07:00
bsalomon
1e42775df9 Remove config range asserts that cause tautological-constant-out-of-range-compare warnings
on clang
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1964053002

Review-Url: https://codereview.chromium.org/1964053002
2016-05-10 10:23:50 -07:00
robertphillips
d0e36a92de Fix AllocedProxyTest on Mesa
Mesa is handing us a context that supports MSAA but has 0 as the max number of color samples

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

Review-Url: https://codereview.chromium.org/1967503004
2016-05-10 10:23:31 -07:00
bsalomon
6663acff01 Replace GrStrokeInfo with GrStyle.
A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002

Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

Review-Url: https://codereview.chromium.org/1957363002
2016-05-10 09:14:17 -07:00
bsalomon
44d427e048 Only enable SRGB write control on desktop GL when SRGB is supported.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1961273004

Review-Url: https://codereview.chromium.org/1961273004
2016-05-10 09:05:06 -07:00
brianosman
622c8d5de1 Add flexible keybinding/command system to sk_app.
Viewer demonstrates use: Just create an instance of CommandSet,
register with the window, and add commands. Hopefully, we can keep
all commands in one place, and get some nice side-benefits. With
this framework, if you want to add a new command, you are only
required to add code in ONE place. And you get added to the help
screen, for free.

CommandSet automatically binds 'h' to cycle through the help modes.
(Functional grouping is most useful for general use, but the other
mode is nice to know what a key does, or to find an unused key for
a new feature).

Grouped by function: https://screenshot.googleplex.com/G5h3f52wFKu.png
Alphabetical by key: https://screenshot.googleplex.com/nZiopabLKJ6.png

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

Review-Url: https://codereview.chromium.org/1955293002
2016-05-10 06:50:49 -07:00
jvanverth
3622a17291 Set level count for wrapped backbuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1965533002

Review-Url: https://codereview.chromium.org/1965533002
2016-05-10 06:42:18 -07:00
bsalomon
85d9667f59 Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of https://codereview.chromium.org/1957363002/ )
Reason for revert:
Breaking some bots

Original issue's description:
> Replace GrStrokeInfo with GrStyle.
>
> A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002
>
> Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

TBR=egdaniel@google.com,robertphillips@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/1967513002
2016-05-10 06:19:21 -07:00
scroggo
00e9452791 Run RAW images serially on Win8-MSVC-ShuttleB
BUG=skia:5283
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1960153005

Review-Url: https://codereview.chromium.org/1960153005
2016-05-10 06:11:20 -07:00