aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
Commit message (Collapse)AuthorAge
* Optimizations and more documentation of SkShadowShaderGravatar vjiaoblack2016-08-31
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2285133002 Review-Url: https://codereview.chromium.org/2285133002
* Some tests around surface creation and snapshotting with color spaceGravatar brianosman2016-08-30
| | | | | | | | | | | | 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
* Moved ambient lights out of SkLight's light arrayGravatar vjiaoblack2016-08-29
| | | | | | | | 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
* Revert of Moved ambient lights out of SkLight's light array (patchset #7 ↵Gravatar vjiaoblack2016-08-29
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Use stroked rrects for Android shadow sampleGravatar jvanverth2016-08-29
| | | | | | | | | | | 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
* Moved ambient lights out of SkLight's light arrayGravatar vjiaoblack2016-08-29
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002 Review-Url: https://codereview.chromium.org/2287553002
* Added distance attenuation and diffuse shading to PointLightsGravatar vjiaoblack2016-08-26
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246463004 Review-Url: https://codereview.chromium.org/2246463004
* Made shadows blurry (thru implementing variance mapping)Gravatar vjiaoblack2016-08-25
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2224163005 Review-Url: https://codereview.chromium.org/2224163005
* Remove file samplecode/SampleDraw.cppGravatar martina.kollarova2016-08-23
| | | | | | | | | | 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
* 'g' key toggles showgrid for PerlinPatchGravatar reed2016-08-22
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269673002 TBR= Review-Url: https://codereview.chromium.org/2269673002
* 'F' will toggle filtering for the --picture sampleGravatar reed2016-08-22
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263203002 TBR= Review-Url: https://codereview.chromium.org/2263203002
* make zoomer text clearerGravatar reed2016-08-21
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267623002 TBR= Review-Url: https://codereview.chromium.org/2267623002
* Added a small widget framework to the interactive bevel SampleAppGravatar dvonbeck2016-08-19
| | | | | | | | | | 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
* Interactive Bevel Sample AppGravatar dvonbeck2016-08-18
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246243002 Review-Url: https://codereview.chromium.org/2246243002
* Fix SampleAndroidShadows warningsGravatar fmalita2016-08-17
| | | | | | | | 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
* Add alternative spot shadow to Android shadow sampleGravatar jvanverth2016-08-17
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246273003 Review-Url: https://codereview.chromium.org/2256713002
* Add alternative ambient shadow method to Android shadow sampleGravatar jvanverth2016-08-17
| | | | | | | | TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249973003 Review-Url: https://codereview.chromium.org/2249973003
* Moved "drawShadowedPicture" call outside of if cases in onDrawContent.Gravatar vjiaoblack2016-08-16
| | | | | | | | | | | | | | | | | | 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
* [SVGDom] Deferred SampleApp parsingGravatar fmalita2016-08-15
| | | | | | | | | | 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
* [SVGDom] SVGPong sample appGravatar fmalita2016-08-12
| | | | | | | | | 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
* Added PointLights to SkLights::LightGravatar vjiaoblack2016-08-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237493002 Review-Url: https://codereview.chromium.org/2237493002
* Add Android Shadow sampleGravatar jvanverth2016-08-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245693002 Review-Url: https://codereview.chromium.org/2245693002
* moved code into onDrawShadowedPic, only renders into shadow maps if neededGravatar vjiaoblack2016-08-09
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220633002 Review-Url: https://codereview.chromium.org/2220633002
* rename FoceCopyMode to SkCopyPixelModeGravatar reed2016-08-05
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220603002 Review-Url: https://codereview.chromium.org/2220603002
* Making a sample for shadow maps for more intensive developmentGravatar vjiaoblack2016-08-05
| | | | | | | | | | | 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
* Show SVG file name in SampleApp titleGravatar fmalita2016-08-04
| | | | | | | R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2217483002 Review-Url: https://codereview.chromium.org/2217483002
* Convert SkAutoTUnref<SkData> to sk_sp<SkData>.Gravatar bungeman2016-08-03
| | | | | | | | | 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
* Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.Gravatar bungeman2016-08-02
| | | | | | | 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
* not much point to SK_SUPPORT_PDFGravatar mtklein2016-08-02
| | | | | | | | | | 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
* Always return ImageShader, even from SkShader::MakeBitmapShaderGravatar reed2016-08-02
| | | | | | | | | | | | | | | 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
* Remove GrContext::applyGammaGravatar robertphillips2016-07-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2191323002 Review-Url: https://codereview.chromium.org/2191323002
* Remove use of MakeRenderTargetDirect from view systemGravatar robertphillips2016-07-28
| | | | | | | | 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
* Initial SVG modelGravatar fmalita2016-07-26
| | | | | | | | | 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
* Always supply a color space (sRGB for now) with F16Gravatar brianosman2016-07-26
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177193004 Review-Url: https://codereview.chromium.org/2177193004
* Add SkColorSpace to GrDrawContextGravatar brianosman2016-07-21
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164363002 Review-Url: https://codereview.chromium.org/2164363002
* Factor code to rotate a canvas about a point.Gravatar bungeman2016-07-12
| | | | | | | | | | | 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
* Changed SkLightingShader API to take in a shader as color sourceGravatar dvonbeck2016-07-10
| | | | | | | | | 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
* deferred canvasGravatar reed2016-07-08
| | | | | | | | | 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
* API change to allow for NormalSource selection at the user level.Gravatar dvonbeck2016-07-06
| | | | | | | | | 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
* Add cubic example and draw original pathGravatar hstern2016-06-30
| | | | | | | | | | | - 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
* remove DownSample imagefilterGravatar reed2016-06-25
| | | | | | | | | | | 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
* remove experimental treat-skcolor-as-srgb flagGravatar reed2016-06-24
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2097003003 Review-Url: https://codereview.chromium.org/2097003003
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | | 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
* Revert of Lots of progress switching to SkColorSpace rather than ↵Gravatar brianosman2016-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | 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
* Add samples to Viewer.Gravatar jvanverth2016-06-16
| | | | | | | | | | | | 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
* Add SampleApp that shows problems in strokingGravatar hstern2016-06-15
| | | | | | | | | | | | | | | - 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
* Remove command buffer sample app support.Gravatar bsalomon2016-06-14
| | | | | | | | | | 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
* Revert of Add samples to Viewer. (patchset #4 id:60001 of ↵Gravatar egdaniel2016-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add samples to Viewer.Gravatar jvanverth2016-06-13
| | | | | | | | | | | 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 Review-Url: https://codereview.chromium.org/2056343004