Commit Graph

1582 Commits

Author SHA1 Message Date
bsalomon
8dd35ce178 Make GM default to reseting gpu contexts on android.
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/635293003
2014-10-08 04:20:56 -07:00
Brian Salomon
9323b8b8e1 Revert "GrResourceCache2 manages scratch texture."
This reverts commit d14e1a2764.
2014-10-07 15:07:38 -04:00
jvanverth
f9669f43bf Fix perspective version of dftext GM
Review URL: https://codereview.chromium.org/634923002
2014-10-07 07:59:46 -07:00
bsalomon
d14e1a2764 GrResourceCache2 manages scratch texture.
BUG=skia:2889

Review URL: https://codereview.chromium.org/608883003
2014-10-07 07:27:07 -07:00
jvanverth
ed14f1d9db Reduce sizes in dftext GM on Android to match desktop better.
Review URL: https://codereview.chromium.org/630103003
2014-10-06 12:50:54 -07:00
robertphillips
1564dde11a Fix multipicturedraw_biglayer GM
Having a layer is a prerequisite for having it be hoisted.

Review URL: https://codereview.chromium.org/632743002
2014-10-06 11:50:31 -07:00
robertphillips
7f1ed835e9 Reduce overdraw in MultiPictureDraw Sierpinski GM
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
2014-10-03 07:29:20 -07:00
robertphillips
b1fc64b8fa Add a MultiPictureDraw GM to exercise layer clipping
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
2014-10-02 08:32:43 -07:00
reed
4942e7550e fix prev change to tooBigForLCD, and add test
BUG=skia:

Review URL: https://codereview.chromium.org/617353003
2014-10-01 13:59:34 -07:00
mtklein
46616af01b Strip old backend recording down to essentials
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
2014-09-30 14:47:10 -07:00
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