Commit Graph

1672 Commits

Author SHA1 Message Date
robertphillips
dbe6074a06 Revert of GrResourceCache2 manages scratch texture. (patchset #14 id:260001 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
2014-09-30 06:54:17 -07:00
bsalomon
3d398c8764 GrResourceCache2 manages scratch texture.
BUG=skia:
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/608883003
2014-09-30 06:02:23 -07:00
robertphillips
aa0c837667 Make pictures in multipicturedraw GM fit in 0,0..W,H range
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
2014-09-29 05:07:39 -07:00
piotaixr
b5fae93d72 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

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/583453002
2014-09-24 13:03:30 -07:00
borenet
2456b7681a Revert of SkCanvas::drawImage is the new way for drawing an SkImage to a 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
2014-09-24 11:03:35 -07:00
piotaixr
432789972c SkCanvas::drawImage is the new way for drawing a SkImage to a Canvas
BUG=skia:2947
R=junov@chromium.org, reed@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/583453002
2014-09-23 14:10:50 -07:00
joshualitt
b0a8a377f8 Patch to create a distinct geometry processor. The vast majority of this patch
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
2014-09-23 09:50:21 -07:00
jvanverth
76ce81e5e6 Fix SDF font positions when using global scale.
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
2014-09-22 14:26:53 -07:00
reed
4a8126e7f8 Introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/)"
This reverts commit 29c857d0f3.

TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/588143004
2014-09-22 07:29:03 -07:00
reed
29c857d0f3 Revert of introduce Props to surface (patchset #27 id:520001 of 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
2014-09-21 10:25:07 -07:00
reed
3716fd067a introduce Props to surface (work in progress)
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
2014-09-21 09:39:55 -07:00
fmalita
8483326704 SkTextBlob shader space workaround.
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
2014-09-19 11:40:51 -07:00
robertphillips
ab79ab5aab Fix memory leak in MultiPictureDraw GM
R=fmalita@google.com, fmalita@chromium.org

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/585033002
2014-09-19 11:30:38 -07:00
robertphillips
3bc25e7247 Extend MultiPictureDraw GM
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
2014-09-19 08:56:09 -07:00
reed
48925e3b31 check for failed file->data (fails on mac)
TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/581263002
2014-09-18 13:57:05 -07:00
piotaixr
0d276f71d2 Bis: Use SkImage::NewFromGenerator() instead of SkImage::newEncodedData()
BUG=skia:2948
R=junov@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/579923002
2014-09-18 11:55:14 -07:00
reed
e010f1c2a0 hide deviceproperties, prepare the way for surfaceprops
BUG=skia:
NOTRY=True
R=bungeman@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/577023002
2014-09-17 10:49:38 -07:00
fmalita
acb882c239 Ensure blob typeface information survives SkGPipe serialization.
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
2014-09-16 17:58:34 -07:00
mtklein
e1daac9b26 Tag recording picture nesting bench as nonrendering.
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
2014-09-16 10:12:42 -07:00
jvanverth
9564ce60a6 Fix scaling issue with distance field text.
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
2014-09-16 05:45:19 -07:00
joshualitt
249af15fb8 BUG=skia:
R=bsalomon@google.com, egdaniel@google.com, jvanverth@google.com, robertphillips@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/543623004
2014-09-15 11:41:14 -07:00
rileya
abaef86f2b Add support for the Rec601 YUV color space to GrYUVtoRGBEffect.
R=bsalomon@google.com, senorblanco@chromium.org, sugoi@chromium.org, reed@google.com

Author: rileya@chromium.org

Review URL: https://codereview.chromium.org/516463005
2014-09-12 17:45:58 -07:00
bungeman
77cd8b0ba2 Revert of Added test for non cached ETC1 (patchset #2 id:20001 of 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
2014-09-10 14:59:59 -07:00
sugoi
d9ec549071 Added test for non cached ETC1
BUG=skia:
R=bsalomon@chromium.org, robertphillips@chromium.org, robertphillips@google.com

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/564493002
2014-09-10 13:40:18 -07:00
reed
cc0e3110bd make set3DMask virtual, so we can safely notify the shadercontext
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
2014-09-10 10:20:24 -07:00
george
b3eba478d5 Outset the stroke width when computing the bounds for drawing a stroked 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
2014-09-09 11:33:57 -07:00
stephana
03e844a0bc Refactored frontend for the rebaseline server.
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
2014-09-05 13:51:24 -07:00
bsalomon
49f085dddf "NULL !=" = NULL
R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
2014-09-05 13:34:00 -07:00
stephana
7260d7292b For certain input skpdiff segfaulted. This prevents the segfault and should 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
2014-09-05 13:21:42 -07:00
reed
da8cf5accb don't use local static bitmap -- racy and unnecessary
BUG=skia:
R=mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/540993003
2014-09-04 13:18:36 -07:00
joshualitt
bd769d0f1c Initial change to create GeometryProcessor
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
2014-09-04 08:56:46 -07:00
robertphillips
c5ba71d2e5 Change SkPicture::draw to playback
R=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/540963002
2014-09-04 08:42:50 -07:00
Derek Sollenberger
5353bae113 Temporarily disable tiling another GM that produces errors with the existing 64-bit ARM toolchain.
BUG=skia:2908

Review URL: https://codereview.chromium.org/537343003
2014-09-04 09:51:33 -04:00
mtklein
6a2f5fe867 Turn downsamplebitmap GMs vertical to fit in 2048x2048.
BUG=skia:2911
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/536103002
2014-09-03 13:40:52 -07:00
djsollen
6233c7b2d3 Revert to enabling all of -O2 as it exposes a bug in the toolchain.
Instead as a workaround we will temporarily disable tiling the
few GMs that produce errors with the existing 64-bit ARM toolchain.

BUG=skia:2908
R=mtklein@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/537713002
2014-09-03 13:38:32 -07:00
mtklein
0c88d8233b On Android, skip tiling for all giantbitmap variants.
BUG=skia:
R=djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/537693002
2014-09-03 13:22:46 -07:00
jvanverth
3f5417590a Update fontcache GM to stress the font atlas.
Pulled out of https://codereview.chromium.org/466363009/.

R=bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/534253003
2014-09-03 08:44:59 -07:00
robertphillips
a8d7f0b13c Try out scalar picture sizes
This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.

R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/513983002
2014-08-29 08:03:56 -07:00
Mike Klein
6a25bd0172 Revert Jim's CL.
BUG=skia:

Review URL: https://codereview.chromium.org/517123005
2014-08-29 10:03:59 -04:00
humper
d73c169637 Second attempt to land the integral image scaling change.
Scale all images to the nearest rounded integer, and if there's still
any scaling factor left over, pass it on to the subsequent bilerp code.
Should avoid artifacts when tiling scaled images.

Original CL received an LGTM from reed; new version disabled tiling
in the downsamplebitmap GM; I verified that this fixes the issue
we were seeing there on non-neon androids.

BUG=skia:2888
R=reed@android.com
TBR=reed

Author: humper@google.com

Review URL: https://codereview.chromium.org/514383003
2014-08-28 14:27:42 -07:00
jvanverth
63b9dc8247 Restore text vertex buffer alloc and other optimizations.
Modifies the fontcache GM to ensure that the font cache is forced to flush.

Committed: https://skia.googlesource.com/skia/+/9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca

R=bsalomon@google.com, robertphillips@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/466363009
2014-08-28 10:39:40 -07:00
egdaniel
7b3d5ee72c Make setVertexAttribs in GrDrawState take a stride parameter.
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/af013bf8afc4c77ab8ff230f536e2ade973427fa

R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/511593004
2014-08-28 05:41:14 -07:00
djsollen
2e1a82675c Revert of Restore text alloc optimizations. (patchset #4 of https://codereview.chromium.org/466363009/)
Reason for revert:
GM failures on http://108.170.220.120:10115/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/builds/1867/

Original issue's description:
> Restore text vertex buffer alloc and other optimizations.
>
> Modifies the fontcache GM to ensure that the font cache is forced to flush.
>
> Committed: https://skia.googlesource.com/skia/+/9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca

R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com
TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/510103003
2014-08-27 13:12:25 -07:00
djsollen
ea81ced1e5 Revert of Make setVertexAttribs in GrDrawState take a stride parameter. (patchset #5 of https://codereview.chromium.org/511593004/)
Reason for revert:
GM failures on http://108.170.220.120:10115/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/builds/1867/

Original issue's description:
> Make setVertexAttribs in GrDrawState take a stride parameter.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/af013bf8afc4c77ab8ff230f536e2ade973427fa

R=bsalomon@google.com, egdaniel@google.com
TBR=bsalomon@google.com, egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/502533004
2014-08-27 13:07:34 -07:00
egdaniel
af013bf8af Make setVertexAttribs in GrDrawState take a stride parameter.
BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/511593004
2014-08-27 12:17:24 -07:00
jvanverth
9c3d24b9d1 Restore text vertex buffer alloc and other optimizations.
Modifies the fontcache GM to ensure that the font cache is forced to flush.

R=bsalomon@google.com, robertphillips@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/466363009
2014-08-27 11:53:17 -07:00
djsollen
0d393a92ca Lookup glyphs based on character code and language tag.
This is particularly important on Android where we expect the
FontManager to return different glyphs for the same character code
depending on language.

BUG=skia:2829
R=bungeman@google.com, tomhudson@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/492763003
2014-08-27 07:03:13 -07:00
mtklein
2a65a238b0 Remove SkQuadTree.
We're not testing it to the same degree we do RTree and TileGrid.  Any changes
we'll make to BBH APIs become 33% easier without it.  If find we want it again,
we can always resurrect it.

BUG=skia:1021,skia:2834
R=robertphillips@google.com, mtklein@google.com
TBR=reed

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/500373005
2014-08-26 14:07:04 -07:00
bsalomon
4b4faa6329 Fix leak in multipicturedraw GMs.
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/502493002
2014-08-22 09:02:38 -07:00
fmalita
37ecbaffd1 [SkTextBlob] Merge run font data at draw time.
R=bungeman@google.com, reed@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/496773002
2014-08-22 09:01:20 -07:00
reed
8367b8cb7a extend SkShader to report a luminance-color to be used for gamma correction
BUG=skia:590
R=bungeman@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/492963002
2014-08-22 08:30:20 -07:00
rmistry
2529f2e72c Add ability to output ImageBaseGSUrl to render_picture and use in rebaseline server.
BUG=skia:2230
R=epoger@google.com

Author: rmistry@google.com

Review URL: https://codereview.chromium.org/479613002
2014-08-22 04:46:30 -07:00
bsalomon
892f31ab08 Fix surface leak in multidraw GMs.
TBR=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/496793003
2014-08-21 14:40:37 -07:00
robertphillips
7eacd77ce6 SkMultiPictureDraw API
This CL adds a new API to optimize across multiple SkPicture draw calls.

Note that multiple pictures rendered at once (i.e., picture piles) should be flattened into a single new picture that includes the required clipping on the different layers.

R=bsalomon@google.com, reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/491313003
2014-08-21 13:12:42 -07:00
mtklein
c92e550d36 Install a hook to swap between SkPicture backends with a single define.
BUG=skia:
R=robertphillips@google.com, reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/492023002
2014-08-21 13:07:27 -07:00
reed
7daaaa4425 use globals to register custom effects
NOTREECHECKS=True
NOTRY=True
R=mtklein@google.com, caryclark@google.com, bungeman@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/498453003
2014-08-21 10:53:34 -07:00
fmalita
00d5c2c652 SkTextBlob
Initial implementation.

R=bungeman@google.com, jbroman@chromium.org, mtklein@google.com, reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/473633002
2014-08-21 08:53:26 -07:00
reed
9fa60daad4 Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).
Refactoring pattern:

1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).

If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.

R=robertphillips@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org, sugoi@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/395603002
2014-08-21 07:59:51 -07:00
epoger
260d237566 rebaseline_server: force checksumValue to an integer to prevent spurious comparison failures
Without this change, SKP tests *appeared* to fail because the actuals reported
their checksumValues as integers, while the expectations recorded their
checksumValues as strings.

NOTREECHECKS=true
NOTRY=true
R=stephana@google.com
TBR=stephana
(SkipBuildbotRuns)

Author: epoger@google.com

Review URL: https://codereview.chromium.org/489023003
2014-08-20 12:21:48 -07:00
epoger
1a17f7aeb2 rebaseline_server: if creating brand new expectations files, include the header
Otherwise, the first time you compare against these expectations, you get
failures.

NOTREECHECKS=true
NOTRY=true
R=stephana@google.com
TBR=stephana

Author: epoger@google.com

Review URL: https://codereview.chromium.org/491063002
2014-08-20 11:39:35 -07:00
epoger
3144d37e5f rebaseline_server: add download link for SKP diff patchfile
BUG=skia:1918
NOTREECHECKS=true
NOTRY=true
R=stephana@google.com
TBR=stephana
(SkipBuildbotRuns)

Author: epoger@google.com

Review URL: https://codereview.chromium.org/489183002
2014-08-20 10:55:27 -07:00
epoger
2c4352bb9d rebaseline_server: allow users to generate SKP diff patches on a shared instance
This will allow developers to maintain SKP baselines without ever running their
own rebaseline_server instance!

For now, the developer must manually apply the resulting patchset to his local
Skia checkout to actually modify expectations; in the near future, we hope to
make the UI upload the patchset to Rietveld on the user's behalf.

BUG=skia:1918
NOTRY=true
R=stephana@google.com, rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/487853004
2014-08-20 08:00:28 -07:00
mtklein
afb4379dbc Print max RSS in GM and nanobench too.
Everyone used MB, so update the API to just return that.

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/483323002
2014-08-19 15:55:55 -07:00
epoger
8ab362e6e5 rebaseline_server: in Pending Approval tab, change expected/actual labels to old/new
BUG=skia:1918
NOTREECHECKS=true
NOTRY=true
R=stephana@google.com
TBR=stephana

Author: epoger@google.com

Review URL: https://codereview.chromium.org/484763004
2014-08-19 12:17:06 -07:00
epoger
caa80b9a46 rebaseline_server: constrain setADir/setBDir to consistently refer to single directories, not lists
Before this CL, we supported multiple setADirs/setBDirs for some operations but
not others... now we consistently support a single pair of directories.

NOTRY=true
R=stephana@google.com
TBR=stephana

Author: epoger@google.com

Review URL: https://codereview.chromium.org/480293002
2014-08-18 15:14:46 -07:00
stephana
3b5c86c7a2 This adds renderMode and builder as columns to the front end when looking at SKPs.
BUG=skia:2833
NOTRY=true
R=epoger@google.com

Author: stephana@google.com

Review URL: https://codereview.chromium.org/480153002
2014-08-18 13:37:59 -07:00
stephana
a1aa5c2806 This passes the URL of the diff image to the front-end, thus removing the need to keep frontend code for URL generation in sync with the backend.
BUG=skia:
NOTREECHECKS=true
NOTRY=true
R=epoger@google.com

Author: stephana@google.com

Review URL: https://codereview.chromium.org/471033003
2014-08-15 06:53:23 -07:00
epoger
9f1ae465c8 rebaseline_server: show Pending Approval tab if viewing SKP expectations vs actuals
BUG=skia:1918
NOTREECHECKS=true
NOTRY=true
R=stephana@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/473973002
2014-08-14 09:55:36 -07:00
epoger
b492c6ff30 add --descriptions flag to render_pictures tool
Needed because right now, when you look at the full set of SKP results in
rebaseline_server, you can't tell which renderMode (or builder) generated each
one.

BUG=skia:2833
R=borenet@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/466153006
2014-08-14 07:32:50 -07:00
epoger
5c4b137592 rebaseline_server: include setA/setB descriptions in output JSON
This is needed for rebaselining using the shared rebaseline_server instance:
by telling the client which git revision was used to fetch expectations, we
allow the client to pass that back along with new baselines (so the server
knows which revision to patch).

This is also handy in that it allows the server to tell the client more about the
different result sets (which files they were generated from).

BUG=skia:1918
NOTRY=true
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/474813002
2014-08-14 07:12:46 -07:00
epoger
30e26cdb41 rebaseline_server UI: add link to raw JSON
patchset 3 from https://codereview.chromium.org/467843002

NOTREECHECKS=true
NOTRY=true
R=stephana@google.com
TBR=stephana

Author: epoger@google.com

Review URL: https://codereview.chromium.org/475623002
2014-08-13 19:29:49 -07:00
epoger
4c808253f4 rebaseline_server: move more code into common path for GET_live_results and GET_prefetch_results
patchset 1 from issue 467843002

BUG=skia:1918
NOTREECHECKS=true
NOTRY=true
R=stephana@google.com
TBR=stephana

Author: epoger@google.com

Review URL: https://codereview.chromium.org/465143004
2014-08-13 19:23:33 -07:00
stephana
e8d74d988a This is a bit of a hack, but will work. I have a cleaner fix ready (but still need to fix some broken tests).
BUG=skia:
NOTRY=true
R=epoger@google.com

Author: stephana@google.com

Review URL: https://codereview.chromium.org/472703002
2014-08-13 19:12:59 -07:00
krajcevski
12b3544028 Add runtime flag to turn compressed alpha masks on
R=bsalomon@google.com, robertphillips@google.com, mtklein@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/468293002
2014-08-13 12:06:26 -07:00
krajcevski
69a5560ea5 Add entry point for passing options to the GrContextFactory
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/465073002
2014-08-13 10:46:31 -07:00
stephana
21b342d19c This eliminates the need to copy the generated images from a temporary directory to the directory that is served by the rebaseline_server.
BUG=skia:2815, skia:2818
R=epoger@google.com

Author: stephana@google.com

Review URL: https://codereview.chromium.org/457203003
2014-08-13 10:36:06 -07:00
epoger
fb261109ec rebaseline_server: add some live-view.html links to index.html
NOTREECHECKS=true
NOTRY=true
R=stephana@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/463213002
2014-08-13 09:38:22 -07:00
dandov
cc03adb909 Proposal for the mesh gradient interface. Implemented as a grid of
patches and uses 4 private arrays to store the values of the control points and
colors. When it needs a patch at a certain position of the grid it just
builds it using the corresponding values of the array and the
grid coordinates provided. Details on implementation are documented in the corresponding classes' comments.

Also added a gm for mesh gradients.

BUG=skia:
R=egdaniel@google.com, reed@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/451723003
2014-08-12 17:14:57 -07:00
dandov
b3c9d1c33c SkCanvas::drawPatch param SkPoint[12]
drawPatch now receives as parameter const SkPoint cubics[12]

Adjusted derived classes and serialization.

Ajusted GM's and benches that take into account combinations of optional
parameters, the scale of the patch and 4 different types of patches.

Planning on adding the extra functionality of SkPatch in another CL.

BUG=skia:
R=egdaniel@google.com, reed@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/463493002
2014-08-12 08:34:29 -07:00
epoger
9c7695b0b5 rebaseline_server: periodically log tasks_queue size
Without this, it's hard to tell whether the server is stuck (or why it's taking so long).

NOTRY=true
R=stephana@google.com, rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/454953002
2014-08-12 08:30:10 -07:00
epoger
8d66dd1d43 change setA/setB labels if viewing actuals vs expectations
NOTRY=true
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/451053004
2014-08-12 08:29:05 -07:00
reed
d7127e7b83 re-add samplerstress gm, but use blurmaskfilter instead (std filter)
BUG=skia:
R=robertphillips@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/468483002
2014-08-12 06:53:09 -07:00
reed
5b1b2dbe76 remove SkStippleMaskFilter - no external clients
TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/462013002
2014-08-12 05:50:10 -07:00
joshualitt
5acfea789d 2D kernel initial wiring for Guassian
BUG=skia:
R=senorblanco@chromium.org, bsalomon@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/418223009
2014-08-11 13:55:34 -07:00
reed
d5fa1a455a add drawPicture variant that takes a matrix and paint
will need some staging strategy, since chrome and blink have overrides of onDrawPicture

R=robertphillips@google.com, fmalita@google.com, bsalomon@google.com, mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/448793004
2014-08-09 11:08:05 -07:00
krajcevski
a50b8f0ec0 Add R11 KTX GM
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/456873002
2014-08-08 11:38:27 -07:00
stephana
d9bf7dbf09 Rebaseline-server: sorting of columns in asc/desc order in frontend.
NOTRY=true

BUG=skia:1907
R=epoger@google.com

Author: stephana@google.com

Review URL: https://codereview.chromium.org/449843002
2014-08-08 07:21:00 -07:00
epoger
acc1258600 don't list out all sourceSkpFile names in the rebaseline_server UI
(the list is long and crowds out the results themselves; better to use
a text filter to select the sourceSkpFiles of interest)

R=stephana@google.com
TBR=stephana
NOTREECHECKS=true
NOTRY=true

Author: epoger@google.com

Review URL: https://codereview.chromium.org/451853002
2014-08-07 14:55:34 -07:00
epoger
c8d8a604bf make rebaseline_server properly handle unescaped URLs
R=rmistry@google.com
TBR=rmistry
NOTREECHECKS=true
NOTRY=true

Author: epoger@google.com

Review URL: https://codereview.chromium.org/445753005
2014-08-07 14:39:06 -07:00
krajcevski
95b1b3d82d Add astcbitmap to gm slides.
Add additional ASTC formats.
Add astc image decoder files.

R=reed@google.com, robertphillips@google.com, halcanary@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/444093002
2014-08-07 12:58:38 -07:00
epoger
e73cd5ab0f rebaseline_server: allow live queries to examine JSONKEY_EXPECTEDRESULTS or JSONKEY_ACTUALRESULTS
See https://goto.google.com/CorrectnessTestingBigIssues for full context

BUG=skia:1942
NOTRY=true
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/453433004
2014-08-07 12:13:13 -07:00
krajcevski
7b62448065 Revert of - Add astcbitmap to gm slides (https://codereview.chromium.org/444093002/)
Reason for revert:
Breaking DM

Original issue's description:
> - Add astcbitmap to gm slides
> - Add additional ASTC formats
> - Add astc image decoder files
>
> Committed: https://skia.googlesource.com/skia/+/2fc05823fed4b9649338f3029cd1ba05ef49a02f

R=reed@google.com, robertphillips@google.com, halcanary@google.com
TBR=halcanary@google.com, reed@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/447343002
2014-08-07 11:33:59 -07:00
krajcevski
2fc05823fe - Add astcbitmap to gm slides
- Add additional ASTC formats
- Add astc image decoder files

R=reed@google.com, robertphillips@google.com, halcanary@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/444093002
2014-08-07 11:18:09 -07:00
dandov
963137b75c Stopped skipping tests in dm of SkPatch by implementing the
corresponding drawPath calls on classes that derive from SkCanvas.

BUG=skia:
R=egdaniel@google.com, bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/429343004
2014-08-07 07:49:53 -07:00
fmalita
b5f7826c51 Explicit tile bounds for SkPictureShader
The integer picture size is not granular enough to allow precise tiling
in arbitrary coordinate systems. This CL adds an optional tile bounds
float rect param to control the tile size and location.

(this also allows tile spacing emulation for picture
shaders).

R=reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/437393003
2014-08-06 13:07:15 -07:00
humper
27ff227589 make the action buttons for rebaseline server stick to the top of the window as you scroll
NOTRY=true

BUG=skia:1912
R=stephana@google.com, epoger@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/446933002
2014-08-06 12:39:59 -07:00
epoger
3facc7c87d rebaseline_server: add "prefetch" directive that just warms the cache without awaiting results
This will allow the buildbots to warn the production rebaseline_server: "I just
generated some new results; here's a comparison that a human might ask for
soon. Download whatever images and generate whatever diffs you would need to
provide those results."

BUG=skia:1942
NOTREECHECKS=true
NOTRY=true
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/443013002
2014-08-06 10:56:51 -07:00
epoger
7909f47b42 rebaseline_server live queries: allow comparison against summary files within the Skia repo
This is a step towards providing SKP comparisons against expectations, not just
other actual results... we still need to allow the user to select
JSONKEY_EXPECTEDRESULTS vs JSONKEY_ACTUALRESULTS within the summary
files found.

BUG=skia:1942
NOTREECHECKS=true
NOTRY=true
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/442203002
2014-08-06 08:37:53 -07:00
djsollen
1b27704eba Remove ALL font fallback logic from Skia.
R=reed@google.com, bungeman@google.com, caryclark@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/434623002
2014-08-06 06:58:06 -07:00
epoger
0b7127635d teach rebaseline_server to generate diffs of rendered SKPs
Creates a new live-view.html page, served by the rebaseline_server, that will display diffs between two sets of rendered SKP images.

BUG=skia:1942
NOTRY=true
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/424263005
2014-08-05 10:07:22 -07:00
dandov
ecfff21bde SkCanvas interface for drawing a patch.
Added function SkCanvas::drawPatch to the API. This function
receives the patch to draw and the paint.

Added function SkBaseDevice::drawPatch to the API. This function also receives the patch to draw and the paint.

Currently SkGpuDevice and SkBitmapDevice generate the mesh taking into
account the scale factor and call the corresponding device's drawVertices.

BUG=skia:
R=jvanverth@google.com, egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/424663006
2014-08-04 10:02:00 -07:00
Cary Clark
992c7b03ef Add standard fonts to all GMs.
Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

  sk_tool_utils::set_portable_typeface or
  sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

BUG=skia:2687
R=mtklein@google.com

Review URL: https://codereview.chromium.org/407183003
2014-07-31 08:58:44 -04:00
joshualitt
5ae5fc59b2 Adding repeat mode to texture domain
BUG=skia:
R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com, junov@chromium.org

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/422123003
2014-07-29 12:59:27 -07:00
tfarina
a8e2e1504b Cleanup: Rename SkOSPath functions.
Mostly for brevity and matches better with Python:

Python           | Old C++                 | New C++
os.path.join     | SkOSPath::SkPathJoin    | SkOSPath::Join
os.path.basename | SkOSPath::SkBasename    | SkOSPath::Basename

BUG=None
TEST=make all
R=mtklein@google.com, bsalomon@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/428443002
2014-07-28 19:26:58 -07:00
cdalton
b2808cd041 Send less transform data when drawing text with nvpr
Before this change, GrStencilAndCoverTextContext would send 6-float
affine transforms to drawPaths for every glyph. This updates it to
concat the text scale onto the context matrix, and then only send
2-float translates (or 1-float x-translates when possible).

Also adds a glyph_pos_align test to gm that exercises the newly added
codepaths, and starts ignoring a few gm tests with benign pixel diffs
until we can rebaseline.

BUG=skia:
R=bsalomon@google.com, kkinnunen@nvidia.com, jvanverth@google.com, bungeman@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/406523003
2014-07-25 14:13:57 -07:00
dandov
50d715476b Added classes SkPatch and SkPatchMesh which help encapsulate and generalize this new primitive. The functionality and responsability of each class is better explained in the comments of the files.
Each patch defines a method genMesh that produces the geometry to draw. To do this they receive a SkPatchMesh object which they need to initialize in order to set up how the data is going to be formatted. Later they call function like setColor or pointAt to set the values at a specific index, the SkMeshPatch object handles the indices based on the format and makes it transparent to the client.

Added a slide to sample app to show how to set up this classes and how they interact.

BUG=skia:
R=jvanverth@google.com, egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/405163003
2014-07-25 10:44:54 -07:00
senorblanco
bc9845bb60 Remove the single-sigma version of SkDropShadowImageFilter::Create().
It's no longer used in Chrome.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/407203002
2014-07-22 12:49:25 -07:00
bsalomon
dcabb05113 Make GrCacheable implement its own ref counting.
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/392333008
2014-07-21 14:24:01 -07:00
epoger
66ed8dc4bf combine base_unittest.py modules from gm and tools
general cleanup, which will also help with http://skbug.com/2752 ('split existing "gpu" GM results into "gl" and "gles"')

R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/397103003
2014-07-17 12:54:16 -07:00
epoger
a8f774549e create copy_config.py and rename_config.py for skbug 2752
BUG=skia:2752
NOTRY=True
(SkipBuildbotRuns)

R=bsalomon@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/397293002
2014-07-17 08:22:12 -07:00
epoger
03f3db02c1 roll common DEPS, now using recursedeps
BUG=skia:2618
R=borenet@google.com, cmp@chromium.org

Author: epoger@google.com

Review URL: https://codereview.chromium.org/392353003
2014-07-16 14:45:48 -07:00
Mike Klein
9d7321c9d0 Skip tiling on bitmapscroll:
- off by exactly one pixel when using DirectWrite
    - also at least one pixel off on ChromeOS

BUG=skia:
R=bungeman@google.com

Review URL: https://codereview.chromium.org/394243002
2014-07-16 14:19:54 -04:00
epoger
33ac9506fb make gm self-tests launch python unittests automatically
(not just within the rebaseline_server subdirectory)

Generally useful, but needed asap for my work on http://skbug.com/2752 ('split existing "gpu" GM results into "gl" and "gles"')

BUG=skia:677
NOTREECHECKS=True
NOTRY=True
R=rmistry@google.com
TBR=rmistry

Author: epoger@google.com

Review URL: https://codereview.chromium.org/398043002
2014-07-16 08:28:23 -07:00
senorblanco
837f5321a4 Fix for saveLayer() with filters vs. the BBox Hierarchy.
When building acceleration structures for SkPicture, we must transform
the primitive's bounds not only by its own SkPaint, but by the paints of
any saveLayer()s currently active above it.

We do this by pushing the SkPaint onto a stack on
saveLayer(), and popping them on restore(). We also push
a NULL paint in save(), so that the pushes and pops are
balanced.

BUG=skia:2734
R=mtklein@google.com, reed@google.com, robertphillips@google.com

Committed: https://skia.googlesource.com/skia/+/6ca0b6a46cbe9bef3e2b9b9db813ec864efd62de

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/380373003
2014-07-14 10:19:55 -07:00
senorblanco
c07e2811dd Revert "Fix for saveLayer() with filters vs. the BBox Hierarchy." and
"resizeimagefiler is ok with a BBH now".

This reverts commits 6ca0b6a46c and 8fa73202ea.

Apparently causing problems in SKP playback.

R=mtklein@google.com, robertphillips@google.com
TBR=mtklein, robertphillips
BUG=skia:

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/381353005
2014-07-14 08:25:34 -07:00
mtklein
8fa73202ea resizeimagefiler is ok with a BBH now
BUG=skia:
R=senorblanco@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/387933002
2014-07-11 11:27:01 -07:00
epoger
133931f4ab roll "common" DEPS, and replace tools/pyutils with it
BUG=skia:2682
R=borenet@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/385783002
2014-07-11 08:52:35 -07:00
mtklein
e4636aa173 Merge Replay and Quilt tasks, adding in all BBH implementations.
Replay isn't that helpful of a test any more now that we have the more
stringent Quilt tests.  Quilt was missing bounding box hierarchies, though,
while Replay was sort of testing RTree (pointlessly, as it was drawing without
any clip).  Now Quilt does everything, testing RTree, QuadTree, and TileGrid.

Quilt mode now falls back to drawing all at once (i.e. Replay) for GMs that
don't tile perfectly.  Still a TODO to make this check more flexible than exact
pixel matches.

Two GMs fail when using a BBH:
  - imageresizetiled
  - resizeimagefilter
We think we're not adjusting the bounds of save layers by their paint.
This is probably a bug, but one to be fixed separately from adding new tests.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/377373003
2014-07-09 13:10:58 -07:00
epoger
6132b436d8 rebaseline_server: cache results in long-running ImageDiffDB instance
Rather than rebuilding the ImageDiffDB from scratch every time we update expected/actual results, keep the same ImageDiffDB instance around and add image pairs to it.

This makes updating results within a long-running server.py *much* faster, and tests out an idea I'm ruminating in https://goto.google.com/LongRunningImageDiffDBServer : we could run an ImageDiffDB server that developers could connect to from their locally running rebaseline_server instances, for much faster launch times.

BUG=skia:2414
NOTRY=True
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/379563005
2014-07-09 07:59:06 -07:00
epoger
b4edbffd7c rebaseline_server: allow JSON to control column filtering
Makes the rebaseline_server client more generic, allowing the server to tweak display properties by writing directives into the JSON file.

Adds two new fields to the rebaseline_server JSON file (and thus increments VALUE__HEADER__SCHEMA_VERSION):
1. KEY__ROOT__EXTRACOLUMNORDER: order in which the client should display columns
2. KEY__EXTRACOLUMNHEADERS__USE_FREEFORM_FILTER: whether a column should be filtered using a freeform text field or checkboxes

BUG=skia:2230
NOTRY=True
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/376623002
2014-07-09 06:19:20 -07:00
bsalomon
83d081ae1d Goodbye GrEffectRef.
Also, reworked some var names and comments around SkShader::asNewEffect.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/374923002
2014-07-08 09:56:11 -07:00
senorblanco
9ea3d57fde Clean up SkImageFilter constructors.
Now that all creation of SkImageFilters goes through
factory Create() methods, there's no real reason for the
convenience constructors. Some SkImageFilter subclasses
which actually have zero DAG-able inputs were passing NULL
to the superclass constructor. This actually means 1 input,
with a NULL value, not zero inputs. This becomes more
relevant for the upcoming cache infrastructure, where this
indicates that the filter will use its src input, where in
fact some of these filters do not (they are image generators
only).

Limiting SkImageFilter to a single constructor resolves this
ambiguity.

Along the way, I removed all of the default parameters to
the constructors, since the Create methods always call them
with the full argument list.

BUG=skia:
R=reed@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/376953003
2014-07-08 09:16:22 -07:00
sugoi
24dcac2140 YUV to RGB converter
This is a first piece of the GPU YUV decoder, which is the actual effect that performs the conversion. For now, it simply applies the conversion matrix, since it is all I need. I may add modes if different matrices need to be applied or if I add color profile support here.

I'll try to keep these cls short and easy to review, but there should be a few of them coming once this one is in.

BUG=skia:
R=senorblanco@chromium.org, senorblanco@google.com, reed@google.com, bsalomon@google.com

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/378503006
2014-07-07 15:09:49 -07:00
bsalomon
69456186f7 gpu and cpu flags for gm and bench.
BUG=skia:2074
R=borenet@google.com, mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/376643002
2014-07-07 10:46:59 -07:00
mtklein
7cdc1ee115 Add always-threaded SkRecord quilt tests.
Now that we're drawing tiles threaded like implside painting, remove the checks
that those lock counts are balanced.  They're just not right for anyone anymore.

SkBitmaps themselves are not threadsafe (even const ones), so shallow copy them
on playback of an SkRecord.  (The underlying SkPixelRefs are threadsafe.)

Simplify quilt drawing by using SkBitmap::extractSubset.  No need for locking.

Bump up to 256x256 tiles.  16x16 tiles just murders performance (way too much
contention).  This has the nice side effect of letting us enable a bunch more
GMs for quilt mode; they drew wrong with small tiles but exactly right with large.

BUG=171776
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/371023005
2014-07-07 10:41:04 -07:00
epoger
df55f0632a rebaseline_server: handle column filtering more generically
This is a step towards making rebaseline_server more flexible, and useful for displaying output of the cluster telemetry server as well as actuals-on-configA-vs-actuals-on-configB.

BUG=skia:2230
R=rmistry@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/369133004
2014-07-07 08:49:14 -07:00
epoger
46e51e10ae rebaseline_server: if urlSchemaVersion is not specified, assume current
Modification to https://codereview.chromium.org/368933002/ ('rebaseline_server: add urlSchemaVersion parameter')

Means we don't need https://codereview.chromium.org/367173002/ ('add urlSchemaVersion to rebaseline_server link on buildbot console page')

NOTREECHECKS=True
NOTRY=True
R=borenet@google.com
TBR=borenet

Author: epoger@google.com

Review URL: https://codereview.chromium.org/364253003
2014-07-03 10:50:30 -07:00
epoger
e5481eca7e rebaseline_server: add urlSchemaVersion parameter
In https://codereview.chromium.org/369473005 ('rebaseline_server: handle category filtering more generically'), I am changing the meaning of some URL parameters.  If a user pastes an old URL into an updated rebaseline_server instance, they may get unexpected results.  Adding a urlSchemaVersion parameter allows us to automatically convert the URL, or at least warn the user.

BUG=skia:2230
NOTRY=True
R=jcgregorio@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/368933002
2014-07-02 13:51:47 -07:00
epoger
54f1ad8bb5 rebaseline_server: use just skpdiff, not Python Image Library
BUG=skia:2414
R=djsollen@google.com, borenet@google.com

Author: epoger@google.com

Review URL: https://codereview.chromium.org/325413003
2014-07-02 07:43:04 -07:00
tfarina
c846f4a96b Cleanup usage of GetResourcePath() after commit bcbc1788b4.
There was a clean up opportunity left over after
https://skia.googlesource.com/skia/+/bcbc1788b478b1e54079318ad073e8490aa66fae, that could make use of the default parameter of GetResourcePath() function to make some call sites cleaner.

We decided to make it in a separate CL to make reviewer's and author's life easier, so we could catch errors and/or mistakes easily.

BUG=None
TEST=make all && out/Debug/dm && out/Debug/SampleApp
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/351133003
2014-07-01 12:35:49 -07:00
reed
52d9ac6c92 stop calling SkCanvas::getDevice
BUG=skia:
R=bsalomon@google.com, robertphillips@google.com, junov@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/355193006
2014-06-30 09:05:34 -07:00
Florin Malita
5f6102d079 SaveFlags be-gone
Remove the deprecated save(SaveFlags), willSave(SaveFlags) and all
traces of kMatrix_SaveFlags/kClip_SaveFlag.

BUG=skia:2297
R=mtklein@google.com, reed@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/340403003
2014-06-30 10:13:28 -04:00
kkinnunen
80549fcdd5 Support using OpenGL ES context on desktop
Support using OpenGL ES context on desktop for unix and Android platforms. This
is mainly useful in development.

Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
possible parameters for the flag are "gl" and "gles".

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/319043005
2014-06-30 06:36:31 -07:00
Mike Klein
a40239ca1e Drop --clone from commands in skia repo.
--clone, and SkPicture::clone(), are no longer.

CQ_EXTRA_TRYBOTS=tryserver.skia:Housekeeper-PerCommit-Trybot

BUG=skia:
R=rmistry@google.com

Review URL: https://codereview.chromium.org/343813006
2014-06-27 17:09:39 -04:00
senorblanco
7bf1068473 Remove SkBicubicImageFilter, and all related tests.
Now that we have SkResizeImageFilter, and the bicubic
resizing is part of skia proper, there's no need for a
specialized image filter.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/357793002
2014-06-25 14:39:06 -07:00
caryclark
5fb6bd4b7e use platform-independent font for gm
Create a custom typeface and scaler to render simple paths the
same on all platforms.

GM tests are modified to explicitly select the custom typeface.

R=reed@google.com, mtklein@google.com, bungeman@google.com
TBR=reed

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/348323003
2014-06-23 11:25:00 -07:00
rmistry
c4b84aef1a Revert of Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/354433002/)
Reason for revert:
Rebaseline CL is ready to be submitted

Original issue's description:
> Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/335603003/)
>
> Reason for revert:
> Caused many shadertext GM failures
>
> Original issue's description:
> > Fix SkPaint::measureText for stroked hairline text
> >
> > SkPaint::measureText and text drawing used different criteria for
> > determining whether text should be drawn as paths or not.
> >
> > Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
> > positioning in the rendering. Mainly added in order to define what is the
> > expected text rendering when hairline stroke is used with various transform
> > options.
> >
> > The testcase also tries to note or highlight the fact that SkPaint::measureText
> > is not expected to produce intuitively matching results when compared to a
> > rendering, if the rendering is done so that the device ends up having a device
> > transform.
> >
> > This fixes the glyph_pos_h_s (hairline, stroked) test-case.
> >
> > Ignore shadertext2_pdf-poppler.png gm on
> > Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.
> >
> > Committed: https://skia.googlesource.com/skia/+/196af738027c5e18c3eb792dbcaf90ef27821793
>
> TBR=jvanverth@google.com,reed@google.com,kkinnunen@nvidia.com
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/abc9bb55ddfeb4b1a7acc335a34841fddcd22d27

R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com
TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

Review URL: https://codereview.chromium.org/349153005
2014-06-23 06:59:15 -07:00
rmistry
05ead8afe5 Revert of Support using OpenGL ES context on desktop (https://codereview.chromium.org/319043005/)
Reason for revert:
Caused segmentation fault on many builders. Please see reverted CL's msg #21 for details.

Original issue's description:
> Support using OpenGL ES context on desktop
>
> Support using OpenGL ES context on desktop for unix and Android platforms. This
> is mainly useful in development.
>
> Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
> possible parameters for the flag are "gl" and "gles".
>
> Committed: https://skia.googlesource.com/skia/+/74fc727dc88ee24d89f88cb1709f963e9073aeb3

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com, kkinnunen@nvidia.com
TBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

Review URL: https://codereview.chromium.org/351583002
2014-06-23 06:13:46 -07:00
rmistry
abc9bb55dd Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/335603003/)
Reason for revert:
Caused many shadertext GM failures

Original issue's description:
> Fix SkPaint::measureText for stroked hairline text
>
> SkPaint::measureText and text drawing used different criteria for
> determining whether text should be drawn as paths or not.
>
> Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
> positioning in the rendering. Mainly added in order to define what is the
> expected text rendering when hairline stroke is used with various transform
> options.
>
> The testcase also tries to note or highlight the fact that SkPaint::measureText
> is not expected to produce intuitively matching results when compared to a
> rendering, if the rendering is done so that the device ends up having a device
> transform.
>
> This fixes the glyph_pos_h_s (hairline, stroked) test-case.
>
> Ignore shadertext2_pdf-poppler.png gm on
> Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.
>
> Committed: https://skia.googlesource.com/skia/+/196af738027c5e18c3eb792dbcaf90ef27821793

R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com
TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

Review URL: https://codereview.chromium.org/354433002
2014-06-23 05:39:26 -07:00
kkinnunen
74fc727dc8 Support using OpenGL ES context on desktop
Support using OpenGL ES context on desktop for unix and Android platforms. This
is mainly useful in development.

Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
possible parameters for the flag are "gl" and "gles".

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/319043005
2014-06-22 22:56:54 -07:00
kkinnunen
196af73802 Fix SkPaint::measureText for stroked hairline text
SkPaint::measureText and text drawing used different criteria for
determining whether text should be drawn as paths or not.

Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
positioning in the rendering. Mainly added in order to define what is the
expected text rendering when hairline stroke is used with various transform
options.

The testcase also tries to note or highlight the fact that SkPaint::measureText
is not expected to produce intuitively matching results when compared to a
rendering, if the rendering is done so that the device ends up having a device
transform.

This fixes the glyph_pos_h_s (hairline, stroked) test-case.

Ignore shadertext2_pdf-poppler.png gm on
Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.

R=jvanverth@google.com, reed@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/335603003
2014-06-22 22:18:14 -07:00
reed
bbf3e8982d optimize circularclips to act as a bench, fix null-check bug in etcbench
BUG=skia:
R=krajcevski@google.com, rmistry@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/345183003
2014-06-20 11:33:59 -07:00
tfarina
bcbc1788b4 Refactor how we handle resources path in Tests.
This idea emerged while doing https://codereview.chromium.org/321723002/
(commit 880914c35c).

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/346453002
2014-06-18 14:32:49 -07:00
mtklein
30e6e2af14 Add basic stacktrace handler using libunwind.
This means we will all have to apt-get install libunwind8-dev on Linux.  Mac comes with everything we need already.

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/343583005
2014-06-18 11:44:18 -07:00
scroggo
f01a6c3663 In Android framework, make tools depend on jsoncpp
Always build the tools with JSON, but either build our own
or use the system's.

Rename skia_build_json_writer to skia_use_system_jsoncpp,
since we now always build with JSON.

Remove SK_BUILD_JSON_WRITER, which was only there so
we could build without JSON it in the framework.

BUG=skia:2448
R=djsollen@google.com, reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/303913002
2014-06-18 10:31:40 -07:00
reed
c3b3266b7d hide SkBitmap::Config entirely (behind a flag)
patch from issue 339463002

TBR=

I think the NoGPU failure is unrelated, so ignoring
NOTRY=True

Author: reed@google.com

Review URL: https://codereview.chromium.org/340533002
2014-06-17 08:38:31 -07:00
reed
bfefc7c95f hide Config in SkImageDecoder -- use SkColorType instead
patch from issue 334613003

TBR=scroggo

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/334793002
2014-06-12 17:40:00 -07:00
senorblanco
ce6a354e12 Fix tiled perlin noise.
It turns out that the perlin implementation we inherited from WebKit
does not actually generate tileable noise (see Chromium bug
http://crbug.com/383495).

The main problem is that when generating coordinates for gradient
interpolation, it was attempting to wrap both x and (x + 1)
simultaneously at the tile boundary (that is, either both or neither
are wrapped). This obviously won't work, since along the tile seams,
(x + 1) should be wrapped, but x should not. The same is true in y.

This patch fixes both the CPU and GPU paths, renames some variables to
more closely match the spec, and modifies the perlin noise GM to
actually test tiling. (Note that the clipping the GM was doing was
removed, since it's superfluous: it used to be necessary for image
filters, but isn't anymore, and this isn't an image filter GM anyway.)

R=sugoi@google.com, sugoi
TBR=senorblanco

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/332523006
2014-06-12 11:24:20 -07:00
egdaniel
e61c411c12 Use vertex attributes for dash effect in gpu
This will allow us to batch dashed lines together when drawing. Also, this removes the need for
a coord transform matrix in the shader, thus we save the cost of uploading a new matrix uniform
everytime we do a simple transform to the dashed line we are drawing.

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/326103002
2014-06-12 10:24:21 -07:00
epoger
984b97c496 rebaseline_server: delete no-longer-used weightedDiffMeasure
(replaced by perceptual diff)

NOTRY=True
R=rmistry@google.com
TBR=rmistry

Author: epoger@google.com

Review URL: https://codereview.chromium.org/334533003
2014-06-11 20:35:59 -07:00