aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
Commit message (Collapse)AuthorAge
* Turn SkCanvasStateUtils into a class with static functions.Gravatar tfarina2014-10-10
| | | | | | | | | | That simplifies the way to declare it a friend, as needed in SkCanvas. BUG=skia:2914 TEST=make most R=reed@google.com Review URL: https://codereview.chromium.org/645773002
* Draw more accurate thick-stroked Beziers (disabled)Gravatar caryclark2014-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Draw thick-stroked Beziers by computing the outset quadratic, measuring the error, and subdividing until the error is within a predetermined limit. To try this CL out, change src/core/SkStroke.h:18 to #define QUAD_STROKE_APPROXIMATION 1 or from the command line: CPPFLAGS="-D QUAD_STROKE_APPROXIMATION=1" ./gyp_skia Here's what's in this CL: bench/BezierBench.cpp : a microbench for examining where the time is going gm/beziers.cpp : random Beziers with various thicknesses gm/smallarc.cpp : a distillation of bug skia:2769 samplecode/SampleRotateCircles.cpp : controls added for error, limit, width src/core/SkStroke.cpp : the new stroke implementation (disabled) tests/StrokerTest.cpp : a stroke torture test that checks normal and extreme values The new stroke algorithm has a tweakable parameter: stroker.setError(1); (SkStrokeRec.cpp:112) The stroke error is the allowable gap between the midpoint of the stroke quadratic and the center Bezier. As the projection from the quadratic approaches the endpoints, the error is decreased proportionally so that it is always inside the quadratic curve. An overview of how this works: - For a given T range of a Bezier, compute the perpendiculars and find the points outset and inset for some radius. - Construct tangents for the quadratic stroke. - If the tangent don't intersect between them (may happen with cubics), subdivide. - If the quadratic stroke end points are close (again, may happen with cubics), draw a line between them. - Compute the quadratic formed by the intersecting tangents. - If the midpoint of the quadratic is close to the midpoint of the Bezier perpendicular, return the quadratic. - If the end of the stroke at the Bezier midpoint doesn't intersect the quad's bounds, subdivide. - Find where the Bezier midpoint ray intersects the quadratic. - If the intersection is too close to the quad's endpoints, subdivide. - If the error is large proportional to the intersection's distance to the quad's endpoints, subdivide. BUG=skia:723,skia:2769 Review URL: https://codereview.chromium.org/558163005
* Adding 3D lut color filterGravatar sugoi2014-10-09
| | | | | | | | Included in this cl is support for 3D textures. BUG=skia: Review URL: https://codereview.chromium.org/580863004
* GrResourceCache2 manages scratch texture.Gravatar bsalomon2014-10-08
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/608883003
* Make GM default to reseting gpu contexts on android.Gravatar bsalomon2014-10-08
| | | | | | | | TBR=mtklein@google.com Committed: https://skia.googlesource.com/skia/+/8dd35ce178e4319685a870faf544a0b1d7aef5bb Review URL: https://codereview.chromium.org/635293003
* fix android framework build errorsGravatar djsollen2014-10-08
| | | | Review URL: https://codereview.chromium.org/637953002
* Revert of Make GM default to reseting gpu contexts on android. (patchset #1 ↵Gravatar bsalomon2014-10-08
| | | | | | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/635293003/) Reason for revert: Crashing on Galaxy Nexus (probably tickled an existing skia or driver bug) Original issue's description: > Make GM default to reseting gpu contexts on android. > > TBR=mtklein@google.com > > Committed: https://skia.googlesource.com/skia/+/8dd35ce178e4319685a870faf544a0b1d7aef5bb TBR=mtklein@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/639773003
* Make GM default to reseting gpu contexts on android.Gravatar bsalomon2014-10-08
| | | | | | TBR=mtklein@google.com Review URL: https://codereview.chromium.org/635293003
* Revert "GrResourceCache2 manages scratch texture."Gravatar Brian Salomon2014-10-07
| | | | This reverts commit d14e1a27643125bfef37fa0ed314b64c1fae22b7.
* Fix perspective version of dftext GMGravatar jvanverth2014-10-07
| | | | Review URL: https://codereview.chromium.org/634923002
* GrResourceCache2 manages scratch texture.Gravatar bsalomon2014-10-07
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/608883003
* Reduce sizes in dftext GM on Android to match desktop better.Gravatar jvanverth2014-10-06
| | | | Review URL: https://codereview.chromium.org/630103003
* Fix multipicturedraw_biglayer GMGravatar robertphillips2014-10-06
| | | | | | Having a layer is a prerequisite for having it be hoisted. Review URL: https://codereview.chromium.org/632743002
* Reduce overdraw in MultiPictureDraw Sierpinski GMGravatar robertphillips2014-10-03
| | | | | | | | | | | | | As written, all the layers in the MPD Sierpinski GM are full screen. This CL bounds each layer to reduce overdraw. This CL will cause differences in: multipicturedraw_sierpinski_simple multipicturedraw_sierpinski_tiled but they are/will be suppressed in: (Don't turn on dither for saveLayers which have no paint - https://codereview.chromium.org/619363002/) Review URL: https://codereview.chromium.org/582633003
* Add a MultiPictureDraw GM to exercise layer clippingGravatar robertphillips2014-10-02
| | | | | | | | This adds a "biglayer" variant that creates a picture with a single big layer. The tiling composition will test whether the layer hoisting code correctly caches the layers with their clipping information. BUG=skia:2315 Review URL: https://codereview.chromium.org/617723004
* fix prev change to tooBigForLCD, and add testGravatar reed2014-10-01
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/617353003
* Strip old backend recording down to essentialsGravatar mtklein2014-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | Feature-wise, this removes: 1) BBH support; 2) peephole optimizations; 3) record-time text op specializations; 4) the guarantee that SkPaints are flattened. This deletes the optimizations GM, which only exists to test the peepholes of the old backend. SkRecord optimizations are unit tested, and if that ever fails we can think about adding another GM like this, but they're different enough we'd want to start from scratch anyway. We need to keep the code that plays back the specialized text ops around for a while for compatibility with existing .SKPs that have those ops recorded. BUG=skia: CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/617953002
* Revert of GrResourceCache2 manages scratch texture. (patchset #14 id:260001 ↵Gravatar robertphillips2014-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/608883003/) Reason for revert: Turning bots red: Nanobench seems to be uniformly failing on Android (http://108.170.220.21:10117/builders/Perf-Android-Venue8-PowerVR-x86-Release/builds/99/steps/RunNanobench/logs/stdio) Ubuntu GTX660 32bit is failing in both Debug and Release on GM generation (it appears to be out of memory) (http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Debug/builds/2457/steps/GenerateGMs/logs/stdio) Original issue's description: > GrResourceCache2 manages scratch texture. > > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3d398c876440deaab39bbf2a9b881c337e6dc8d4 R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: robertphillips@google.com Review URL: https://codereview.chromium.org/611383003
* GrResourceCache2 manages scratch texture.Gravatar bsalomon2014-09-30
| | | | | | | | | BUG=skia: R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/608883003
* Make pictures in multipicturedraw GM fit in 0,0..W,H rangeGravatar robertphillips2014-09-29
| | | | | | | | | | | | Having the picture contents not actually reside in the 0,0..W,H range wrecks havoc with the layer hoisting. The hoisting works correctly but since the picture don't fulfill their contract the results look incorrect. This CL just translates the picture's contents to the right so they are within the picture bound. R=egdaniel@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/594363003
* SkCanvas::drawImage is the new way for drawing a SkImage to a CanvasGravatar piotaixr2014-09-24
| | | | | | | | | | | | BUG=skia:2947 Committed: https://skia.googlesource.com/skia/+/432789972c1e1f8a66165c75a250dba1853efa08 R=junov@chromium.org, reed@google.com, bsalomon@google.com Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/583453002
* Revert of SkCanvas::drawImage is the new way for drawing an SkImage to a ↵Gravatar borenet2014-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Canvas (patchset #9 id:160001 of https://codereview.chromium.org/583453002/) Reason for revert: Broke ChromiumOS Ozone builder: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Builder/builds/4087/steps/compile/logs/stdio Reverting to unblock DEPS roll. Original issue's description: > SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas > > BUG=skia:2947 > > Committed: https://skia.googlesource.com/skia/+/432789972c1e1f8a66165c75a250dba1853efa08 R=junov@chromium.org, reed@google.com, bsalomon@google.com, piotaixr@chromium.org TBR=bsalomon@google.com, junov@chromium.org, piotaixr@chromium.org, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2947 Author: borenet@google.com Review URL: https://codereview.chromium.org/598133002
* SkCanvas::drawImage is the new way for drawing a SkImage to a CanvasGravatar piotaixr2014-09-23
| | | | | | | | | BUG=skia:2947 R=junov@chromium.org, reed@google.com, bsalomon@google.com Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/583453002
* Patch to create a distinct geometry processor. The vast majority of this patchGravatar joshualitt2014-09-23
| | | | | | | | | | | | | is just a rename. The meat is in GrGeometryProcessor, GrProcessor, GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory, GrProcessUnitTestFactory, and the builders BUG=skia: R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/582963002
* Fix SDF font positions when using global scale.Gravatar jvanverth2014-09-22
| | | | | | | | | | | | Also fixes a crash in the dftext GM when using SampleApp, and adds new test case in dftext. BUG=skia:2928 R=joshualitt@google.com, egdaniel@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/588223002
* Introduce Props to surface (patchset #27 id:520001 of ↵Gravatar reed2014-09-22
| | | | | | | | | | | | https://codereview.chromium.org/551463004/)" This reverts commit 29c857d0f3a1cb837f73406eeb6ba9771879b5e7. TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/588143004
* Revert of introduce Props to surface (patchset #27 id:520001 of ↵Gravatar reed2014-09-21
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/551463004/) Reason for revert: Broke call site in WebKit Original issue's description: > introduce Props to surface (work in progress) > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@google.com TBR=bsalomon@google.com, bungeman@google.com, fmalita@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com, vangelis@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@chromium.org Review URL: https://codereview.chromium.org/583773004
* introduce Props to surface (work in progress)Gravatar reed2014-09-21
| | | | | | | | | BUG=skia: R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/551463004
* SkTextBlob shader space workaround.Gravatar fmalita2014-09-19
| | | | | | | | | | | | | | | Blink would like drawTextBlob(x,y) to behave the same as drawText(x,y) WRT shader space. Due to the current generic device base impl, that is not the case. This is a transitional workaround, pending proper drawTextBlob impls in SkDevice classes. R=reed@google.com, robertphillips@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/586743002
* Fix memory leak in MultiPictureDraw GMGravatar robertphillips2014-09-19
| | | | | | | | R=fmalita@google.com, fmalita@chromium.org Author: robertphillips@google.com Review URL: https://codereview.chromium.org/585033002
* Extend MultiPictureDraw GMGravatar robertphillips2014-09-19
| | | | | | | | | | This new GM case is intended to exercise the matrix oriented aspects of layer caching. R=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/582113004
* check for failed file->data (fails on mac)Gravatar reed2014-09-18
| | | | | | | | TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/581263002
* Bis: Use SkImage::NewFromGenerator() instead of SkImage::newEncodedData()Gravatar piotaixr2014-09-18
| | | | | | | | | BUG=skia:2948 R=junov@chromium.org, reed@google.com Author: piotaixr@chromium.org Review URL: https://codereview.chromium.org/579923002
* hide deviceproperties, prepare the way for surfacepropsGravatar reed2014-09-17
| | | | | | | | | | BUG=skia: NOTRY=True R=bungeman@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/577023002
* Ensure blob typeface information survives SkGPipe serialization.Gravatar fmalita2014-09-16
| | | | | | | | | | | | When flattening text blobs to the temp buffer, we need to collect typeface info and ship it across the pipe explicitly. R=mtklein@google.com, reed@google.com, robertphillips@google.com, bungeman@google.com BUG=412445 Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/563783003
* Tag recording picture nesting bench as nonrendering.Gravatar mtklein2014-09-16
| | | | | | | | | | | | | Doesn't hurt as is, but we're running it several times unneccesarily. (I couldn't compile without removing an unused constant in that other GM...) BUG=skia: R=fmalita@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/570303002
* Fix scaling issue with distance field text.Gravatar jvanverth2014-09-16
| | | | | | | | | | | | | Picks the correct distance field size based on both the text size and the max matrix scale. Adjusts the matrix scale if non-unity. Also adds GM for verifying proper distance field scaling. BUG=skia:2928 R=bsalomon@google.com, joshualitt@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/568843002
* BUG=skia:Gravatar joshualitt2014-09-15
| | | | | | | | R=bsalomon@google.com, egdaniel@google.com, jvanverth@google.com, robertphillips@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/543623004
* Add support for the Rec601 YUV color space to GrYUVtoRGBEffect.Gravatar rileya2014-09-12
| | | | | | | | R=bsalomon@google.com, senorblanco@chromium.org, sugoi@chromium.org, reed@google.com Author: rileya@chromium.org Review URL: https://codereview.chromium.org/516463005
* Revert of Added test for non cached ETC1 (patchset #2 id:20001 of ↵Gravatar bungeman2014-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/564493002/) Reason for revert: This is causing dm and gm to crash on the Win8 7770 bots, for example http://108.170.220.120:10117/builders/Test-Win8-ShuttleA-HD7770-x86-Debug/builds/2128 An example stack trace looks like [13:46:16.260000] -1M drawing... extractbitmap [600 600] [13:46:16.760000] -1M drawing... etc1bitmap_npot [124 124] [13:46:16.760000] -1M drawing... etc1bitmap_r11.ktx [128 128] [13:46:16.760000] -1M drawing... etc1bitmap_ktx [128 128] [13:46:16.760000] -1M drawing... etc1bitmap_pkm_volatile [128 128] [13:46:16.760000] [13:46:16.760000] Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION [13:46:16.760000] sk_gr_allocate_texture +c9 [13:46:16.760000] load_etc1_texture +1dd [13:46:16.760000] sk_gr_create_bitmap_texture +199 [13:46:16.760000] GrLockAndRefCachedBitmapTexture +ad [13:46:16.760000] SkGpuDevice::SkAutoCachedTexture::set +5d [13:46:16.760000] SkGpuDevice::SkAutoCachedTexture::SkAutoCachedTexture +65 [13:46:16.760000] SkGpuDevice::internalDrawBitmap +8e [13:46:16.760000] SkGpuDevice::drawBitmapCommon +608 [13:46:16.760000] SkGpuDevice::drawBitmap +79 [13:46:16.760000] SkCanvas::internalDrawBitmap +11b [13:46:16.760000] SkCanvas::drawBitmap +d3 [13:46:16.760000] skiagm::ETC1BitmapGM::onDraw +140 [13:46:16.760000] skiagm::GM::drawContent +3c [13:46:16.760000] skiagm::GM::draw +24 [13:46:16.760000] GMMain::invokeGM +63 [13:46:16.760000] GMMain::generate_image +186 [13:46:16.760000] GMMain::test_drawing +5b [13:46:16.760000] run_multiple_configs +2f9 [13:46:16.760000] tool_main +75d [13:46:16.760000] main +16 [13:46:16.760000] __tmainCRTStartup +199 [13:46:16.760000] mainCRTStartup +d [13:46:16.760000] BaseThreadInitThunk +e [13:46:16.760000] RtlInitializeExceptionChain +84 [13:46:16.760000] RtlInitializeExceptionChain +5a Original issue's description: > Added test for non cached ETC1 > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/d9ec549071581d9d1dc2e5fac3163305ae935a39 R=bsalomon@chromium.org, robertphillips@chromium.org, robertphillips@google.com, sugoi@chromium.org TBR=bsalomon@chromium.org, robertphillips@chromium.org, robertphillips@google.com, sugoi@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: bungeman@google.com Review URL: https://codereview.chromium.org/559093003
* Added test for non cached ETC1Gravatar sugoi2014-09-10
| | | | | | | | | BUG=skia: R=bsalomon@chromium.org, robertphillips@chromium.org, robertphillips@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/564493002
* make set3DMask virtual, so we can safely notify the shadercontextGravatar reed2014-09-10
| | | | | | | | | | | also boost preallocated storage to account for this combo of bitmapshader + emboss + colorfilter BUG=skia: R=djsollen@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/563563002
* Outset the stroke width when computing the bounds for drawing a stroked ↵Gravatar george2014-09-09
| | | | | | | | | | | | | rect, or 1 if it's a hairline Adds a testcase for stroke rect bug R=reed@google.com, reed1 BUG=skia: Author: george@mozilla.com Review URL: https://codereview.chromium.org/552743004
* Refactored frontend for the rebaseline server.Gravatar stephana2014-09-05
| | | | | | | | | | | | This is going to serve as the starting point for the new front-end once the backend is rewritten. BUG=skia: NOTRY=true R=jcgregorio@google.com Author: stephana@google.com Review URL: https://codereview.chromium.org/538613002
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* For certain input skpdiff segfaulted. This prevents the segfault and should ↵Gravatar stephana2014-09-05
| | | | | | | | | | | fix the failed test in housekeeping. BUG=skia:2902 R=mtklein@google.com, rmistry@google.com Author: stephana@google.com Review URL: https://codereview.chromium.org/546753003
* don't use local static bitmap -- racy and unnecessaryGravatar reed2014-09-04
| | | | | | | | | BUG=skia: R=mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/540993003
* Initial change to create GeometryProcessorGravatar joshualitt2014-09-04
| | | | | | | | | BUG=skia: R=bsalomon@google.com, robertphillips@google.com, egdaniel@google.com, jvanverth@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/509153002
* Change SkPicture::draw to playbackGravatar robertphillips2014-09-04
| | | | | | | | R=reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/540963002
* Temporarily disable tiling another GM that produces errors with the existing ↵Gravatar Derek Sollenberger2014-09-04
| | | | | | | | 64-bit ARM toolchain. BUG=skia:2908 Review URL: https://codereview.chromium.org/537343003