Commit Graph

22238 Commits

Author SHA1 Message Date
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
bsalomon
33595bdf4b 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

Review-Url: https://codereview.chromium.org/1957363002
2016-05-10 05:57:27 -07:00
reed
82595b6fa4 refactor drawPath to have drawDevPath
pre-CL for larger change to support read-only paths

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

TBR=

Review-Url: https://codereview.chromium.org/1957263003
2016-05-09 17:48:46 -07:00
msarett
2c3eca38c9 Approximate common gamma tables as single values
This should improve performance of gamma conversion in
software (we can use vector math instead of table look
ups).

Additionally this allows us to quickly and easily
identify sRGB-like gammas.

On gpu, identifying sRGB gamma improves performance/memory,
because the hardware may support gamma conversion.

This will help us identify situations where gamma
conversion is not necessary.
Ex: sRGB input -> sRGB display

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

Review-Url: https://codereview.chromium.org/1950183006
2016-05-09 14:27:49 -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
scroggo
e6cad6b370 Stop valgrind bot from crashing
make_surface is returning nullptr, resulting in an invalid read.

Add an error message with debugging information and skip this
iteration.

Also switch to cleaner for loop syntax.

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

Review-Url: https://codereview.chromium.org/1959173002
2016-05-09 13:20:58 -07:00
bsalomon
97fd2d42b9 Incorporate scale into GrStyle and GrShape
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952383003

Review-Url: https://codereview.chromium.org/1952383003
2016-05-09 13:02:01 -07:00
bsalomon
1b4c01c660 Make SkAssertResult work with SK_WARN_UNUSED_RESULT in Release on gcc
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962723003

Review-Url: https://codereview.chromium.org/1962723003
2016-05-09 12:35:17 -07:00
egdaniel
167ab91980 Allow gpu ResourceHandle class to be shared for multiple purposes
Currently this class was just used for resource handles when building up
a shader. However, I want to now use this class for things like objects
owned/held by the GrVkResourceProvider which are used by other classes.
An example of this will be for GrVkRenderTargets to hold a handle to a
collection of compatible render passes without having to own/hold onto
the render passes themselves.

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

Review-Url: https://codereview.chromium.org/1955893002
2016-05-09 11:03:48 -07:00
egdaniel
fe8a839221 Break apart shared use of varying and uniform transforms
This is a pre-cl for: https://codereview.chromium.org/1955893002/

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

Review-Url: https://codereview.chromium.org/1961093002
2016-05-09 10:22:19 -07:00
bsalomon
9daa4b92d7 No error if function marked with SK_WARN_UNUSED_RESULT is used in SkAssertResult
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955263002

Review-Url: https://codereview.chromium.org/1955263002
2016-05-09 09:14:36 -07:00
egdaniel
97a23369f8 Reset layout to undefined when we realloc VkTexture memory
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1958123002

Review-Url: https://codereview.chromium.org/1958123002
2016-05-09 08:53:59 -07:00
liyuqian
796c5bb465 Initial commit of our new Android app to demo Skia.
Currently, there's only a simple Activity with a title bar and a surface view
that connects with Skia viewer native application.

Before integrating user action events, I want to make sure that the design and
implementation so far are good.  Note that the old NativeApplication-based
Activity (ViewerActivity) is still there for reference and test purposes. It
will be removed eventually.

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

Review-Url: https://codereview.chromium.org/1952323004
2016-05-09 08:49:29 -07:00
bungeman
5a493cdbec Less indentation.
Review-Url: https://codereview.chromium.org/1963693002
2016-05-09 08:41:01 -07:00
halcanary
ab12c788e2 harfbuzz test: compile fewer files
TBR=
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957353002

Review-Url: https://codereview.chromium.org/1957353002
2016-05-09 08:15:58 -07:00
halcanary
7a223f5825 DEPS: update icu + sfntly
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1960153002

Review-Url: https://codereview.chromium.org/1960153002
2016-05-09 08:00:26 -07:00
robertphillips
a8966a8a34 Reland of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #1 id:1 of https://codereview.chromium.org/1956023002/ )
Reason for revert:
May not be as bad as was thought

Original issue's description:
> Revert of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #2 id:20001 of https://codereview.chromium.org/1958603002/ )
>
> Reason for revert:
> Looks like it's causing some issues with the bleed_image GM.
>
> Original issue's description:
> > Simplify SkGpuBlurUtils::GaussianBlur method
> >
> > No one was using the canClobberSrc capability and moving the direct filtering case forward makes the rest of the logic simpler.
> >
> > 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=1958603002
> >
> > Committed: https://skia.googlesource.com/skia/+/56a85e69a8d034e0fdee00e8207cda0a9da06fee
>
> 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
>
> Committed: https://skia.googlesource.com/skia/+/67a58dcd4a1e79e5832161ae953526d27893aa61

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

Review-Url: https://codereview.chromium.org/1961953002
2016-05-09 06:45:37 -07:00
halcanary
57cd94a9de SkAdvancedTypefaceMetrics: getAdvanceData uses std::function
Reduce templatedness.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955053002

Review-Url: https://codereview.chromium.org/1955053002
2016-05-09 06:34:39 -07:00