Commit Graph

22277 Commits

Author SHA1 Message Date
cdalton
846c051a48 Convert GrClip to an abstract base class
Converts GrClip to an abstract base class and adds a "GrFixedClip"
implementation. GrFixedClip denotes a clip implemented with fixed-
function hardware. GrFixedClip allows us to remove the stateful
"fClipMode" member from GrClipMaskManager, and in the future will
be able to nicely encapsulate window rectangles.

After this change GrClipMaskManager is just a wrapper around
GrDrawTarget. We may want to consider removing it altogether.

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

Review-Url: https://codereview.chromium.org/1971343002
2016-05-13 10:25:00 -07:00
herb
670f01f2fc This has all the different source types in and working. There are many SkDiffs, but they seem to be due to better resolution.
This seems to fix all the bugs involved with make all the images produced by the codec to default to sRGB.

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

Review-Url: https://codereview.chromium.org/1967283002
2016-05-13 10:04:46 -07:00
liyuqian
36632f46a6 Change Android activity title from JNI call
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978843002

Review-Url: https://codereview.chromium.org/1978843002
2016-05-13 09:57:44 -07:00
bsalomon
9fb420393e Add bounds to GrShape
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970003003

Review-Url: https://codereview.chromium.org/1970003003
2016-05-13 09:23:38 -07:00
borenet
4ca5539df5 Add isolate_android_sdk.py script and android_sdk_hash
BUG=skia:5298
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1975893002

Review-Url: https://codereview.chromium.org/1975893002
2016-05-13 08:41:04 -07:00
msarett
aabe15e206 Simple program for visualizing gamuts
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1972343002

Review-Url: https://codereview.chromium.org/1972343002
2016-05-13 07:32:59 -07:00
scroggo
e6f0d6e5fe GMs: fail gracefully for null surface
A couple more instances where MakeRenderTarget returns nullptr
due to --preAbandonGpuContext.

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

Review-Url: https://codereview.chromium.org/1976163002
2016-05-13 07:25:44 -07:00
liyuqian
6ce4b003a2 Use title buttons to switch slides
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1975723004

Review-Url: https://codereview.chromium.org/1975723004
2016-05-13 06:45:21 -07:00
msarett
c2e4bb39d4 Recognize more sRGB gammas
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1975883003

Review-Url: https://codereview.chromium.org/1975883003
2016-05-13 06:19:04 -07:00
robertphillips
9837740dd5 Simplify GrSWMaskHelper
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1974943002

Review-Url: https://codereview.chromium.org/1974943002
2016-05-13 05:47:23 -07:00
robertphillips
f054b1766b Swap SkGpuBlurUtils over to using SkIRects
We don't have to land this, but I found it more comforting for the blurring code to explicitly deal with SkIRects rather than SkRects with integer values.

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=1968603003

Review-Url: https://codereview.chromium.org/1968603003
2016-05-13 05:06:19 -07:00
cdalton
862cff30ea Remove clip from GrPipelineBuilder
This eliminates a copy and will allow us to make the GrClip class
virutal.

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

Review-Url: https://codereview.chromium.org/1966903004
2016-05-12 15:09:48 -07:00
cdalton
193d9cf8f2 Eliminate special case nvpr batch handling
Removes drawPathBatch methods from GrDrawTarget and GrDrawContext, and
integrates nvpr batches in with all the other batches.

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

Review-Url: https://codereview.chromium.org/1966763002
2016-05-12 11:52:02 -07:00
egdaniel
dde2c0356c Ignore patch version when checking compatibility of vulkan layers
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970233002

Review-Url: https://codereview.chromium.org/1970233002
2016-05-12 11:42:00 -07:00
herb
15332a841d Make PixelGetters much smaller, move more common code to PixelAccessor.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971863002

Review-Url: https://codereview.chromium.org/1971863002
2016-05-12 11:37:00 -07:00
halcanary
dd4fcd4500 cmake: fixes for windows
Review-Url: https://codereview.chromium.org/1975933002
2016-05-12 11:25:01 -07:00
robertphillips
04c84af877 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

Review-Url: https://codereview.chromium.org/1962903003
2016-05-12 11:13:00 -07:00
brianosman
f05ab1b820 Support allowSRGBInputs on Vulkan (via secondary texture views)
All textures still have a "correct" image view that matches their actual
format. For sRGB textures, we can ask for a non-sRGB view that is
created on demand (and cached), in legacy mode.

Finally, turn on sRGB support in Vulkan. The gamma GM now looks correct
in both L32 and S32.

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

Review-Url: https://codereview.chromium.org/1970293002
2016-05-12 11:01:10 -07:00
fmalita
1e2e33a74d Remove SkPicture::hasText()
No longer used in Chromium.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978533002

Review-Url: https://codereview.chromium.org/1978533002
2016-05-12 10:53:49 -07:00
bungeman
b11cf50b4a Fix typo in SkOSWindow_AndroidNative.
This allows the 'most' target to be built on Android.

Review-Url: https://codereview.chromium.org/1973043002
2016-05-12 10:48:59 -07:00
robertphillips
3806b8fb7f Fix bug & add code to catch ImageFilter clearing bugs
Follow on to https://codereview.chromium.org/1969193002/ (SkPictureImageFilter - clear local canvas before use)

BUG=610667

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

Review-Url: https://codereview.chromium.org/1972213002
2016-05-12 10:46:40 -07:00
herb
be463bba2e Fix bad pixel address calculation.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1974053002

Review-Url: https://codereview.chromium.org/1974053002
2016-05-12 10:36:24 -07:00
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