Commit Graph

1092 Commits

Author SHA1 Message Date
vjiaoblack
1e5abf15d1 made point light shadows
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294323003

Review-Url: https://codereview.chromium.org/2294323003
2016-09-07 07:48:12 -07:00
vjiaoblack
bb106060fa Optimizations and more documentation of SkShadowShader
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2285133002

Review-Url: https://codereview.chromium.org/2285133002
2016-08-31 11:15:21 -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
vjiaoblack
a8eabc4a2a Moved ambient lights out of SkLight's light array
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002

Committed: https://skia.googlesource.com/skia/+/8f98f0aa2d3f7571a890b916c7c4b5ee831e9686
Review-Url: https://codereview.chromium.org/2287553002
2016-08-29 10:22:09 -07:00
vjiaoblack
84cddf6fa7 Revert of Moved ambient lights out of SkLight's light array (patchset #7 id:120001 of https://codereview.chromium.org/2287553002/ )
Reason for revert:
Made Deigo's GM miss their ambient lights

Original issue's description:
> Moved ambient lights out of SkLight's light array
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002
>
> Committed: https://skia.googlesource.com/skia/+/8f98f0aa2d3f7571a890b916c7c4b5ee831e9686

TBR=robertphillips@google.com,djsollen@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/2291663002
2016-08-29 08:38:04 -07:00
jvanverth
a4f1af8f97 Use stroked rrects for Android shadow sample
Changes the Android shadow sample to use stroked roundrects when
we can (mainly if stroked geometry area < fill geometry area).

Also changes the setup for the overstroke geometry so that it computes
the correct distance to the outer edge.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2283003003

Review-Url: https://codereview.chromium.org/2283003003
2016-08-29 07:17:47 -07:00
vjiaoblack
8f98f0aa2d Moved ambient lights out of SkLight's light array
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002

Review-Url: https://codereview.chromium.org/2287553002
2016-08-29 07:08:52 -07:00
vjiaoblack
56f33ea2ac Added distance attenuation and diffuse shading to PointLights
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246463004

Review-Url: https://codereview.chromium.org/2246463004
2016-08-26 08:49:46 -07:00
vjiaoblack
e6f5d56231 Made shadows blurry (thru implementing variance mapping)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2224163005

Review-Url: https://codereview.chromium.org/2224163005
2016-08-25 06:30:23 -07:00
martina.kollarova
d01c7d09e9 Remove file samplecode/SampleDraw.cpp
The file is not used in any build target and seems dead, i.e. failed to compile when I added it to
the SampleApp target.

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

Review-Url: https://codereview.chromium.org/2269583002
2016-08-23 00:17:42 -07:00
reed
c0c6e1c5d1 'g' key toggles showgrid for PerlinPatch
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269673002

TBR=

Review-Url: https://codereview.chromium.org/2269673002
2016-08-22 08:45:16 -07:00
reed
ccebcec4ac 'F' will toggle filtering for the --picture sample
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263203002

TBR=

Review-Url: https://codereview.chromium.org/2263203002
2016-08-22 07:41:46 -07:00
reed
5755cd98a7 make zoomer text clearer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267623002

TBR=

Review-Url: https://codereview.chromium.org/2267623002
2016-08-21 19:30:13 -07:00
dvonbeck
3688bfa710 Added a small widget framework to the interactive bevel SampleApp
I made a small framework to add slider and radial controls more easily.
The Sample now has controls for light direction and color.

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

Review-Url: https://codereview.chromium.org/2259183003
2016-08-19 12:41:48 -07:00
dvonbeck
6d391b6c37 Interactive Bevel Sample App
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246243002

Review-Url: https://codereview.chromium.org/2246243002
2016-08-18 08:55:48 -07:00
fmalita
9da5dbdda3 Fix SampleAndroidShadows warnings
R=jvanverth@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255863002
NOTRY=true

Review-Url: https://codereview.chromium.org/2255863002
2016-08-17 11:33:29 -07:00
jvanverth
d7315f9133 Add alternative spot shadow to Android shadow sample
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246273003

Review-Url: https://codereview.chromium.org/2256713002
2016-08-17 10:06:18 -07:00
jvanverth
6c177a1a49 Add alternative ambient shadow method to Android shadow sample
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249973003

Review-Url: https://codereview.chromium.org/2249973003
2016-08-17 07:59:41 -07:00
vjiaoblack
d707f2d1cf Moved "drawShadowedPicture" call outside of if cases in onDrawContent.
Bug description:
If you updated the view without changing frames (such as moving around the
cursor with 'z' (pixel zoom) on) the window would turn gray.

This was because I left the drawShadowedPicture call inside of the "if-updated"
case inside of SampleShadowing's onDrawContent handler.

If nothing changed and onDrawContent is called, we still need to update the
given canvas's fLights (there is no guarantee of whether the canvas (or its
fLights) has been updated or not), and then draw the shadowed picture.

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

Review-Url: https://codereview.chromium.org/2245923002
2016-08-16 05:38:45 -07:00
fmalita
851d68aa56 [SVGDom] Deferred SampleApp parsing
Parse SVG files in onOnceBeforeDraw() rather than ctor, to avoid
front-loading a bunch of work when passed a loarge number of SVGs.

R=stephana@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245993002

Review-Url: https://codereview.chromium.org/2245993002
2016-08-15 07:48:47 -07:00
fmalita
ca39d716f1 [SVGDom] SVGPong sample app
Shows off SVG dom-based animations.

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243853003

Review-Url: https://codereview.chromium.org/2243853003
2016-08-12 13:17:11 -07:00
vjiaoblack
772b5ee446 Added PointLights to SkLights::Light
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237493002

Review-Url: https://codereview.chromium.org/2237493002
2016-08-12 11:38:47 -07:00
jvanverth
e1a3bc6769 Add Android Shadow sample
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245693002

Review-Url: https://codereview.chromium.org/2245693002
2016-08-12 10:40:38 -07:00
vjiaoblack
904527d165 moved code into onDrawShadowedPic, only renders into shadow maps if needed
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220633002

Review-Url: https://codereview.chromium.org/2220633002
2016-08-09 09:32:09 -07:00
reed
1ec04d9553 rename FoceCopyMode to SkCopyPixelMode
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220603002

Review-Url: https://codereview.chromium.org/2220603002
2016-08-05 12:07:41 -07:00
vjiaoblack
955e879c6d Making a sample for shadow maps for more intensive development
Merge branch 'shadow-gm' into shadow-sample

Added variable size shadow maps. Also fixed some bugs

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

Review-Url: https://codereview.chromium.org/2198933002
2016-08-05 07:55:01 -07:00
fmalita
b83cdbcbb0 Show SVG file name in SampleApp title
R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2217483002

Review-Url: https://codereview.chromium.org/2217483002
2016-08-04 08:39:41 -07:00
bungeman
ffae30db4a Convert SkAutoTUnref<SkData> to sk_sp<SkData>.
With the move from SkData::NewXXX to SkData::MakeXXX most
SkAutoTUnref<SkData> were changed to sk_sp<SkData>. However,
there are still a few SkAutoTUnref<SkData> around, so clean
them up.

Review-Url: https://codereview.chromium.org/2212493002
2016-08-03 13:32:32 -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
mtklein
757a15fa2e not much point to SK_SUPPORT_PDF
It only controls a few minor things in testing tools,
which can always assume PDF support is present.

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

Review-Url: https://codereview.chromium.org/2202203003
2016-08-02 12:20:36 -07:00
reed
320a40d773 Always return ImageShader, even from SkShader::MakeBitmapShader
Lessons learned

1. ImageShader (correctly) always compresses (typically via PNG) during serialization. This has the surprise results of
- if the image was marked opaque, but has some non-opaque pixels (i.e. bug in blitter or caller), then compressing may "fix" those pixels, making the deserialized version draw differently. bug filed.
- 565 compressess/decompresses to 8888 (at least on Mac), which draws differently (esp. under some filters). bug filed.

2. BitmapShader did not enforce a copy for mutable bitmaps, but ImageShader does (since it creates an Image). Thus the former would see subsequent changes to the pixels after shader creation, while the latter does not, hence the change to the BlitRow test to avoid this modify-after-create pattern. I sure hope this prev. behavior was a bug/undefined-behavior, since this CL changes that.

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

Review-Url: https://codereview.chromium.org/2195893002
2016-08-02 06:12:06 -07:00
robertphillips
1e8761809d Remove GrContext::applyGamma
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2191323002

Review-Url: https://codereview.chromium.org/2191323002
2016-07-29 08:28:25 -07:00
robertphillips
ecf3dbe8f2 Remove use of MakeRenderTargetDirect from view system
Here is the CL that sent me down the SkGammaColorFilter path

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

Review-Url: https://codereview.chromium.org/2178353005
2016-07-28 15:17:34 -07:00
fmalita
6ceef3dd67 Initial SVG model
A minimal subset needed to render tiger.svg: <svg>, <g>, <path>, 'd', 'fill'/'stroke' (color-only), 'transform'.

R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164193002

Review-Url: https://codereview.chromium.org/2164193002
2016-07-26 18:46:34 -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
brianosman
dfe4f2e4fe Add SkColorSpace to GrDrawContext
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164363002

Review-Url: https://codereview.chromium.org/2164363002
2016-07-21 13:28:36 -07:00
bungeman
7438bfc080 Factor code to rotate a canvas about a point.
SkMatrix::scale and ::rotate take a point around which to scale or rotate.
Canvas lacks these helpers, so the code to rotate a canvas around a
point has been duplicated many times. Factor all of these
implementations into SkCanvas::rotate.

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

Review-Url: https://codereview.chromium.org/2142033002
2016-07-12 15:01:19 -07:00
dvonbeck
6af677ff8f Changed SkLightingShader API to take in a shader as color source
This CL's base is the CL for the same modification, but in the implementation side: https://codereview.chromium.org/2062703003/

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

Review-Url: https://codereview.chromium.org/2064153002
2016-07-10 18:38:34 -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
dvonbeck
5b794fad18 API change to allow for NormalSource selection at the user level.
This CL's base is the CL for CPU handling: https://codereview.chromium.org/2050773002/

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

Review-Url: https://codereview.chromium.org/2063793002
2016-07-06 13:58:36 -07:00
hstern
e2463ed91e Add cubic example and draw original path
- Add cubic example
- Draw original path
- Also added dumpHex to stderr option on 'D'

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

Review-Url: https://codereview.chromium.org/2106063004
2016-06-30 10:04:21 -07:00
reed
81700f69b0 remove DownSample imagefilter
was just created early on as a test filter

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

TBR=

Review-Url: https://codereview.chromium.org/2094083002
2016-06-25 14:30:44 -07:00
reed
a84d6606f5 remove experimental treat-skcolor-as-srgb flag
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2097003003

Review-Url: https://codereview.chromium.org/2097003003
2016-06-24 18:14:07 -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
jvanverth
c7027ab03f Add samples to Viewer.
This adds support with animation, assuming the sample has
implemented onAnimate. Event handling has not been
implemented.

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

Committed: https://skia.googlesource.com/skia/+/76963e73704a42a18c29d6fbdcccb566e5c67658
Review-Url: https://codereview.chromium.org/2056343004
2016-06-16 09:52:35 -07:00
hstern
9bd4c69302 Add SampleApp that shows problems in stroking
- When the stroke width gets too big the raster algorithm produces
  incorrect output
- This also causes the GPU path to produce incorrect output if the width
  is larger than an arbitrary limit in GrAALinearizingConvexPathRenderer
  (which is the renderer used for this specific geometry)

- Other non-convex geometries probably also produce strange results

BUG=skia:5405,skia:5406
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060903002

Review-Url: https://codereview.chromium.org/2060903002
2016-06-15 09:13:35 -07:00
bsalomon
4999616c3a Remove command buffer sample app support.
This hasn't compiled for months. We are deemphasizing SampleApp in favor of viewer. Windowed command buffer is not currently something we currently plan to maintain.

TBR=reed@google.com

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

Review-Url: https://codereview.chromium.org/2061233002
2016-06-14 09:43:52 -07:00
egdaniel
f533f116e6 Revert of Add samples to Viewer. (patchset #4 id:60001 of https://codereview.chromium.org/2056343004/ )
Reason for revert:
breaking on android compile

Original issue's description:
> Add samples to Viewer.
>
> This adds support with animation, assuming the sample has
> implemented onAnimate. Event handling has not been
> implemented.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056343004
>
> Committed: https://skia.googlesource.com/skia/+/76963e73704a42a18c29d6fbdcccb566e5c67658

TBR=bsalomon@google.com,jvanverth@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/2063883002
2016-06-13 11:30:10 -07:00