Commit Graph

1615 Commits

Author SHA1 Message Date
reed
a3aff06d83 add gm for lcd text and surfaceprops
BUG=skia:

Review URL: https://codereview.chromium.org/727543002
2014-11-13 10:40:58 -08:00
bungeman
842ab70966 Fix "Add support for rebaselining from trybots."
Commit d09ade4b44 was missing a needed edit.
2014-11-11 15:28:02 -05:00
bungeman
d09ade4b44 Add support for rebaselining from trybots.
This adds support to rebaseline_server to fetch actual results from
tryjobs run on rietveld issues.

Review URL: https://codereview.chromium.org/688353003
2014-11-11 08:11:56 -08:00
robertphillips
81f71b6630 Change where layer hoisting data is gathered
This CL:
1) removes the EXPERIMENTAL_optimize on SkCanvas & SkDevice
2) moves the saveLayer gathering step to endRecording
3) Replaces GPUOptimize with SkRecordComputeLayers
4) Update bench_pictures & render_pictures to provide the new flag

#2 also necessitated moving the BBH computation (and record optimization) out of SkPicture's ctor (and into endRecording)

Review URL: https://codereview.chromium.org/718443002
2014-11-11 04:54:49 -08:00
bungeman
c9232dcda0 Remove SK_FM_NEW_MATCH_FAMILY_STYLE_CHARACTER.
This removes the old guarded code and enables the new api
introduced with "Update fontMgr to take list of bcp47 language tags."
c20386e393 . Blink on Android is
already using the new code.

Review URL: https://codereview.chromium.org/705843004
2014-11-10 13:29:33 -08:00
jvanverth
2b07443a58 Make gpudft non-default config for gm
Review URL: https://codereview.chromium.org/692153003
2014-11-07 13:49:49 -08:00
jvanverth
4736e1434a Get gpudft support working in dm, gm, nanobench and bench_pictures
Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

Review URL: https://codereview.chromium.org/699453005
2014-11-07 07:12:46 -08:00
tfarina
a71d3af100 Cleanup: Use SkAutoGraphics in gm and tests.
BUG=None
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/704413002
2014-11-07 06:12:30 -08:00
jvanverth
aa30ab3079 Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures (patchset #2 id:20001 of https://codereview.chromium.org/699453005/)
Reason for revert:
Not compiling in ANGLE build

Original issue's description:
> Get gpudft support working in dm, gm, nanobench and bench_pictures
>
> Adds a new config to test distance field text.
> Clean up some flags and #defines to read "distance field text",
> not "distance field fonts" to be consistent with Chromium
>
> NOTREECHECKS=true
>
> Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

TBR=bsalomon@google.com,mtklein@google.com,reed@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/707723005
2014-11-06 13:52:45 -08:00
jvanverth
06ba179838 Get gpudft support working in dm, gm, nanobench and bench_pictures
Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/699453005
2014-11-06 13:38:52 -08:00
egdaniel
21402e3851 Bug fix for cull_line in SkDashPathEffect.
In cull_line we must also check if both points are the same. Otherwise we
fail the assert in the else "SkASSERT(dy && !dx)".

This is currently blocking the roll as it fails a webkit test.

BUG=skia:

Review URL: https://codereview.chromium.org/703783002
2014-11-05 05:02:27 -08:00
robertphillips
9f2251c73e Crop the fast path dashed lines to the cull rect
Without:

maxrss  loops   min     median  mean    max     stddev  samples         config  bench
  56M   1       13.3ms  13.6ms  13.6ms  14.2ms  2%      Ooooo.....      8888    GM_dashing5_bw
  56M   13      390us   417us   416us   459us   5%      ooooO..o.o      gpu     GM_dashing5_bw
  56M   1       13.4ms  13.9ms  14.1ms  15ms    3%      Oooo..ooOo      8888    GM_dashing5_aa
  56M   13      402us   421us   416us   425us   2%      Ooo.ooOOOO      gpu     GM_dashing5_aa

With:

  40M   1       1.53ms  1.54ms  1.54ms  1.55ms  0%      oo.O...o..      8888    GM_dashing5_bw
  40M   12      407us   412us   415us   445us   3%      ...Oo.....      gpu     GM_dashing5_bw
  40M   1       1.7ms   1.7ms   1.7ms   1.72ms  0%      o.O.......      8888    GM_dashing5_aa
  43M   13      405us   409us   409us   415us   1%      ooo.Ooo..o      gpu     GM_dashing5_aa

The GM images (including the new one) are the same with and without this CL.

BUG=428296

Review URL: https://codereview.chromium.org/699623003
2014-11-04 13:33:50 -08:00
joshualitt
50408adfd2 Test factory uses the inorder draw buffer
BUG=skia:

Review URL: https://codereview.chromium.org/696353002
2014-11-03 12:31:15 -08:00
egdaniel
ed3af6648f Use Color Processor for color bitmap text draws on gpu.
This change is here since previously color bitmap text was rendered using a
geometry processor in the coverage stage. The problem with this is that we
cannot correctly do xfer modes with this method. So I now make color bitmap text
draw using a color stage in the same was as a draw bitmap call.

One issue that arrises from this fix is that we end up adding this final color
processor after any previous color processors. Thus if we have a custom blend
implemented as a color processor it will be before this text one and we won't
blend correctly. This issue will get fixed once an xfer processor is fully
implemented. I have hacked a test locally to show that if we can add the text
color processor to the begining of the color stages we do blend correctly in all
cases (so the xfer processor will be a fix).

BUG=skia:

Review URL: https://codereview.chromium.org/689923004
2014-10-31 06:55:45 -07:00
reed
f037e0bf13 allow SkUserConfig.h to control NOGPU
BUG=skia:

Review URL: https://codereview.chromium.org/685243002
2014-10-30 11:34:15 -07:00
bsalomon
f2703d83da rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags
Review URL: https://codereview.chromium.org/682223002
2014-10-28 14:33:06 -07:00
halcanary
dffa397f83 add gm: filterbitmap_image_color_wheel
BUG=skia:3061

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/633333004
2014-10-27 10:32:18 -07:00
humper
535e3b2025 Fix the way we patch up the matrix for scaled images that aren't
clamp/clamp

BUG=skia:2904
TBR=reed

Review URL: https://codereview.chromium.org/675823002
2014-10-27 10:32:07 -07:00
halcanary
30b83d45a3 add gm: colorwheel
BUG=skia:3061

Review URL: https://codereview.chromium.org/680533002
2014-10-26 05:23:53 -07:00
halcanary
f622a6c8fd Add SkIRect bounds() convenience method to SkImageInfo and SkBitmap.
Review URL: https://codereview.chromium.org/646213003
2014-10-24 12:54:53 -07:00
senorblanco
cbf6b6ecd5 Fix imagemagnifier GM quality and speed.
The imagemagnifier GM was applying the filter both to a saveLayer()
restore() around the whole scene, as well as to each individual
text draw.

Applying the filter only in the saveLayer() makes it run ~20x faster
on my Linux box, and the quality is improved as well (since the
primitives are not double-filtered).

BUG=skia:

Review URL: https://codereview.chromium.org/637283009
2014-10-23 15:00:12 -07:00
bsalomon
efd7d45fc0 Don't use MIP filter mode on compressed textures
Add compressed texture image downsample GMs

BUG=chromium:426331

Review URL: https://codereview.chromium.org/672863003
2014-10-23 14:17:46 -07:00
sugoi
234f036b3e Adding an option to render only the shadow in SkDropShadowImageFilter
This is basically how blink uses the filter. Currently, I can't use it for "ShadowOnly" mode with the filter at all, but instead of copying the code and risking to have the codepaths diverge, I'm simply going to add the option here.

BUG=skia:

Review URL: https://codereview.chromium.org/646213004
2014-10-23 13:59:52 -07:00
bungeman
c20386e393 Update fontMgr to take list of bcp47 language tags.
This will enable clients to pass more than one bcp47 tag to ensure
that the most appropriate font is selected.

BUG=chromium:422180

Review URL: https://codereview.chromium.org/670243002
2014-10-23 07:08:06 -07:00
reed
a0c814cffb Add SkTypeface::getBounds()
mirrored from https://codereview.chromium.org/666303002/

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/676523002
2014-10-22 13:20:58 -07:00
jvanverth
fca302ccf4 Add color emoji fallback for distance field text.
BUG=skia:3033

Review URL: https://codereview.chromium.org/670533002
2014-10-20 13:12:55 -07:00
tfarina
a5414c4a8e Turn SkCanvasStateUtils into a class with static functions.
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
2014-10-10 06:19:09 -07:00
caryclark
feff7d2d77 Draw more accurate thick-stroked Beziers (disabled)
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
2014-10-09 05:36:04 -07:00
sugoi
ce686270f5 Adding 3D lut color filter
Included in this cl is support for 3D textures.

BUG=skia:

Review URL: https://codereview.chromium.org/580863004
2014-10-09 05:27:23 -07:00
bsalomon
bcf0a52d4f GrResourceCache2 manages scratch texture.
BUG=skia:2889

Review URL: https://codereview.chromium.org/608883003
2014-10-08 08:40:09 -07:00
bsalomon
b82b9d577e Make GM default to reseting gpu contexts on android.
TBR=mtklein@google.com

Committed: https://skia.googlesource.com/skia/+/8dd35ce178e4319685a870faf544a0b1d7aef5bb

Review URL: https://codereview.chromium.org/635293003
2014-10-08 08:17:11 -07:00
djsollen
901704b34e fix android framework build errors
Review URL: https://codereview.chromium.org/637953002
2014-10-08 07:12:11 -07:00
bsalomon
7663d66681 Revert of Make GM default to reseting gpu contexts on android. (patchset #1 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
2014-10-08 05:41:24 -07:00
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