aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
Commit message (Collapse)AuthorAge
* abstract name of clipping ops, to transtion to a more restricted setGravatar reed2016-09-20
| | | | | | | | | | | SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp pre-CL needed in chrome : https://codereview.chromium.org/2355583002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002 Review-Url: https://codereview.chromium.org/2355483002
* add 'g' to fatbitsGravatar reed2016-09-19
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2350613002 TBR= Review-Url: https://codereview.chromium.org/2350613002
* SkFontData to use smart pointers.Gravatar bungeman2016-09-16
| | | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c Review-Url: https://codereview.chromium.org/2339273002
* Revert of SkFontData to use smart pointers. (patchset #3 id:40001 of ↵Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2339273002/ ) Reason for revert: Killing Mac Original issue's description: > SkFontData to use smart pointers. > > The SkFontData type is not exposed externally, so any method which uses > it can be updated to use smart pointers without affecting external > users. Updating this first will make updating the public API much > easier. > > This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to > std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It > appears that no one outside Skia is currently using SkStream::NewfromFile > so this is a good time to update it as well. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 > > Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c TBR=mtklein@chromium.org,halcanary@google.com,mtklein@google.com,reed@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/2343933002
* SkFontData to use smart pointers.Gravatar bungeman2016-09-15
| | | | | | | | | | | | | | | | The SkFontData type is not exposed externally, so any method which uses it can be updated to use smart pointers without affecting external users. Updating this first will make updating the public API much easier. This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It appears that no one outside Skia is currently using SkStream::NewfromFile so this is a good time to update it as well. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002 Review-Url: https://codereview.chromium.org/2339273002
* Fix SampleApp compilation with skia_gpu=0Gravatar brianosman2016-09-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347593002 Review-Url: https://codereview.chromium.org/2347593002
* add helpers for using SkData with picture serializationGravatar reed2016-09-15
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2341693004 TBR= Review-Url: https://codereview.chromium.org/2341693004
* [SVGDom] Expose intrinsic size infoGravatar fmalita2016-09-14
| | | | | | | | | | | | | | * expose intrinsic size info on <svg> nodes. * tweak the SkSVGDOM constructor to no longer take an container size param, but instead default to intrinsic size * update clients to call SkSVGDOM::setContainerSize() explicitly, when needed R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345533002 Review-Url: https://codereview.chromium.org/2345533002
* Switch default for SkGaussianBlurShader radius size.Gravatar jvanverth2016-09-14
| | | | | | | | One step towards removing the 6.2 radius entirely. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333403002 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2333403002
* add pipecanvasGravatar reed2016-09-13
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201323003 Review-Url: https://codereview.chromium.org/2201323003
* change SkStreams to work with sk_sp<SkData> instead of SkData*Gravatar reed2016-09-12
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002 Review-Url: https://codereview.chromium.org/2333713002
* Update SampleAndroidShadows to use algorithm closer to Android OpenGLGravatar jvanverth2016-09-12
| | | | | | | | | | | | | | | Includes: * Update light position to be at a similar distance to Android OS * Scale spot shadows correctly * Compute stroke shapes and radii correctly * Allow for larger blur radius for shadows GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319003003 TBR=reed@google.com NOTRY=true NOTREECHECKS=true Review-Url: https://codereview.chromium.org/2319003003
* made point lights linear attenuation; also fixed point light depth bugGravatar vjiaoblack2016-09-09
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2323383002 Review-Url: https://codereview.chromium.org/2323383002
* Added in Radial ShadowsGravatar vjiaoblack2016-09-09
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2311223004 Review-Url: https://codereview.chromium.org/2311223004
* Add GM/slide to simulate Android-style reveal clipGravatar robertphillips2016-09-08
| | | | | | | | | Hopefully, this will let us play w/ geometric and shader-based solutions. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003 Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0 Review-Url: https://codereview.chromium.org/2316593003
* made point light shadowsGravatar vjiaoblack2016-09-07
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2294323003 Review-Url: https://codereview.chromium.org/2294323003
* 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