Commit Graph

340 Commits

Author SHA1 Message Date
halcanary
2e0303f91b Gyp: Sanity Part II (GM+Tests)
DOCS_PREVIEW= https://skia.org/dev/testing/tests?cl=1133343006

Review URL: https://codereview.chromium.org/1133343006
2015-05-17 06:47:49 -07:00
robertphillips
465706820d Revert of Font variations. (patchset #26 id:500001 of https://codereview.chromium.org/1027373002/)
Reason for revert:
Appears to be breaking  Linux ARM bots:

FAILED:
/usr/local/google/home/mosaic-role/slave/repo_clients/chromium_tot/chromium/src/../../prebuilt/toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-g++
... -o obj/third_party/skia/src/ports/skia_library.SkFontHost_FreeType.o
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:37:31: fatal error:
freetype/ftmm.h: No such file or directory
 #include FT_MULTIPLE_MASTERS_H
                               ^
compilation terminated.

Original issue's description:
> Font variations.
>
> Multiple Master and TrueType fonts support variation axes.
> This implements back-end support for axes on platforms which
> support it.
>
> Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97
>
> Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9

TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1139123008
2015-05-15 11:30:41 -07:00
bungeman
3489ee0f4f Font variations.
Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.

Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97

Review URL: https://codereview.chromium.org/1027373002
2015-05-14 14:18:03 -07:00
bungeman
5ae1312c9f Revert of Font variations. (patchset #21 id:400001 of https://codereview.chromium.org/1027373002/)
Reason for revert:
Mac failing to build due to CFNumberType in Chromium Canary.

Original issue's description:
> Font variations.
>
> Multiple Master and TrueType fonts support variation axes.
> This implements back-end support for axes on platforms which
> support it.
>
> Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97

TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1128913008
2015-05-13 12:16:41 -07:00
bungeman
05773ed309 Font variations.
Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.

Review URL: https://codereview.chromium.org/1027373002
2015-05-13 10:57:10 -07:00
joshualitt
1107e901c9 Fix blur on large glyphs in runs < SkGlyphCache::max
BUG=skia:

Review URL: https://codereview.chromium.org/1135113002
2015-05-11 14:52:12 -07:00
joshualitt
e4cee1f283 fix for cached textblobs look garbled
BUG=skia:

Review URL: https://codereview.chromium.org/1135813007
2015-05-11 13:04:28 -07:00
reed
71a6cbfc58 remove redundant/deprecated TwoPointRadial gradiet -- use TwoPointConical
This CL derived from https://codereview.chromium.org/1114243005/

BUG=skia:

Review URL: https://codereview.chromium.org/1117423003
2015-05-04 08:32:51 -07:00
robertphillips
7272935744 Add new GM/bench for line-only convex paths
BUG=472723

Review URL: https://codereview.chromium.org/1112603002
2015-04-28 07:42:04 -07:00
bsalomon
87cbcf3f86 Add GM to test non-AA pixel snapping for points, lines, rects.
Review URL: https://codereview.chromium.org/1070213003
2015-04-22 08:51:38 -07:00
reed
7e4186acce add GM to test imagefilters + xfermodes
draws incorrectly as is, but will be fixed by https://codereview.chromium.org/1091173003

BUG=skia:3741

Review URL: https://codereview.chromium.org/1088773004
2015-04-20 07:27:15 -07:00
joshualitt
523ed6c0c1 adding new gm to rotate, translate, and scale textblobs
this is to test distance field caching and regen of texture blobs on scale.

BUG=skia:

Review URL: https://codereview.chromium.org/1097563002
2015-04-17 09:01:05 -07:00
mtklein
4afe21e864 add a GM to demo the blend bug
BUG=skia:3739

Review URL: https://codereview.chromium.org/1094863003
2015-04-17 06:32:13 -07:00
bsalomon
8cf1d95487 Add GM that tests bmp filter qualities with repeat mode
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1086203002
2015-04-16 06:54:28 -07:00
bsalomon
bed83a66f5 Don't draw if SkShader::asNewFragmentProcessor fails.
BUG=chromium:473156

Review URL: https://codereview.chromium.org/1089063002
2015-04-15 14:18:34 -07:00
joshualitt
9e36c1a930 Start canonicalizing color for all A8 textblobs
BUG=skia:

Review URL: https://codereview.chromium.org/1076593002
2015-04-14 12:17:27 -07:00
robertphillips
f5ac972207 Add GM to exercise high quality anisotropic scaling
High quality anisotropic is an interesting edge case for the gpu backend. For scales that are both minimizing and maximizing Ganesh falls back to MipMaps which can turn out too blurry.

BUG=472864

Review URL: https://codereview.chromium.org/1058133003
2015-04-14 08:19:01 -07:00
halcanary
86e5ab6338 GM: add fadefilter gm
BUG=470083

Review URL: https://codereview.chromium.org/1081173002
2015-04-14 06:25:19 -07:00
joshualitt
d0b5c33fda Adding draw looper gm for textblobs
BUG=skia:

Review URL: https://codereview.chromium.org/1067853002
2015-04-10 06:17:26 -07:00
robertphillips
e275fdf812 Add GM to repro crbug.com/472795
This CL also adds a new parameter to SkBitmapSource which gives the user control of the filter quality.

BUG=472795

Review URL: https://codereview.chromium.org/1072603002
2015-04-09 06:47:12 -07:00
joshualitt
eef5b3eb12 BUG=skia:
Review URL: https://codereview.chromium.org/1031423002
2015-04-03 08:07:26 -07:00
bsalomon
c9c3e62b4e Add constant color GrFP.
Committed: https://skia.googlesource.com/skia/+/dfbbec436cbcacc3270d4b28357c8393e67d6494

Review URL: https://codereview.chromium.org/978713002
2015-04-02 11:12:09 -07:00
bsalomon
599ea40cec Revert of Add constant color GrFP. (patchset #10 id:180001 of https://codereview.chromium.org/978713002/)
Reason for revert:
Revert while investigating assertions.

Original issue's description:
> Add constant color GrFP.
>
> Committed: https://skia.googlesource.com/skia/+/dfbbec436cbcacc3270d4b28357c8393e67d6494

TBR=egdaniel@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1055023002
2015-04-02 08:33:54 -07:00
bsalomon
dfbbec436c Add constant color GrFP.
Review URL: https://codereview.chromium.org/978713002
2015-04-01 14:54:57 -07:00
scroggo
3e5622764a Add copyright headers to remaining gyp files.
Prevents some PRESUBMIT errors.

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/1035523003
2015-03-25 10:22:41 -07:00
halcanary
db0dcc7436 PDF: remove last use of SkPDFImage
Add a GM.

BUG=skia:255

Review URL: https://codereview.chromium.org/950633003
2015-03-20 12:31:52 -07:00
reed
1b600d3446 Revert of PDF: remove last use of SkPDFImage (patchset #5 id:120001 of https://codereview.chromium.org/950633003/)
Reason for revert:
static void draw(SkCanvas* canvas,
                 const SkPaint& p,
                 const SkBitmap& src,
                 SkColorType colorType,
                 const char text[]) {
    SkASSERT(src.colorType() == colorType);
    canvas->drawBitmap(src, 0.0f, 0.0f);
    canvas->drawText(text, strlen(text), 0.0f, 12.0f, p);
}

This assert is firing, at least on macs, where all images get decoded into 32bit at the moment.

Original issue's description:
> PDF: remove last use of SkPDFImage
>
> Add a GM.
>
> BUG=skia:255
>
> Committed: https://skia.googlesource.com/skia/+/86ad8d643624a55b02e529100bbe4e2940115fa1

TBR=mtklein@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:255

Review URL: https://codereview.chromium.org/1024113002
2015-03-20 10:03:36 -07:00
halcanary
86ad8d6436 PDF: remove last use of SkPDFImage
Add a GM.

BUG=skia:255

Review URL: https://codereview.chromium.org/950633003
2015-03-20 09:10:56 -07:00
senorblanco
d4bb991df8 Add a new GM to show problems with shear/rotate CTM w/ image filters.
Review URL: https://codereview.chromium.org/1028663002
2015-03-20 08:54:32 -07:00
tomhudson
cdf34cdfb9 We had zero coverage for SkDrawFilter. This new GM draws two rectangles.
If SkDrawFilter is working, they will not match (have different colors
and one will be blurred). If SkDrawFilter is broken, they will match.

R=scroggo@google.com

Review URL: https://codereview.chromium.org/984883003
2015-03-06 06:15:20 -08:00
senorblanco
d6ed19cc75 Tessellating GPU path renderer.
This path renderer converts paths to linear contours, resolves intersections via Bentley-Ottman, implements a trapezoidal decomposition a la Fournier and Montuno to produce triangles, and renders those with a single draw call. It does not currently do antialiasing, so it must be used in conjunction with multisampling.

A fair amount of the code is to handle floating point edge cases in intersections. Rather than perform exact computations (which would require arbitrary precision arithmetic), we reconnect the mesh to reflect the intersection points. For example, intersections can occur above the current vertex, and force edges to be merged into the current vertex, requiring a restart of the intersections. Splitting edges for intersections can also force them to merge with formerly-distinct edges in the same polygon, or to violate the ordering of the active edge list, or the active edge state of split edges.

BUG=skia:

Review URL: https://codereview.chromium.org/855513004
2015-02-26 06:58:17 -08:00
reed
c8e4765b8e gm to illustrate mipmap layer choice
BUG=skia:
NOTREECHECKS=True
TBR=

Review URL: https://codereview.chromium.org/942593002
2015-02-19 11:39:46 -08:00
joshualitt
6364807151 gm to test hairlines which fill RenderTarget
BUG=skia:

Review URL: https://codereview.chromium.org/934283002
2015-02-19 10:25:21 -08:00
halcanary
1b5c604d9d PDF: Add (low-memory) SkPDFBitmap class
Also: Add SkDeflateWStream and associated unit tests.

SkPDFBitmap is a replacement for SkPDFImage.  As of now, it only
supports 8888 bitmaps (the most common case).

SkPDFBitmap takes very little extra memory (aside from refing the
bitmap's pixels), and its emitObject() does not cache any data.

The SkPDFBitmap::Create function will check the canon for duplicates.
This can reduce the size of the output PDF.

Motivation:  this gives another ~40% decrease in PDF memory overhead

TODO: Support other ColorTypes and scrap SkPDFImage.

BUG=skia:3030

Review URL: https://codereview.chromium.org/918813002
2015-02-18 11:29:57 -08:00
joshualitt
95964c670b GMs now use batch
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/3f284d7758d7f35b59d93a22d126f7cd8423be44

Review URL: https://codereview.chromium.org/865313004
2015-02-11 13:45:51 -08:00
joshualitt
94dff15404 Revert of GMs now use batch (patchset #3 id:40001 of https://codereview.chromium.org/865313004/)
Reason for revert:
missing hairlines on gms

Original issue's description:
> GMs now use batch
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3f284d7758d7f35b59d93a22d126f7cd8423be44

TBR=bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/913153003
2015-02-11 13:03:16 -08:00
joshualitt
3f284d7758 GMs now use batch
BUG=skia:

Review URL: https://codereview.chromium.org/865313004
2015-02-11 11:34:58 -08:00
reed
19d8f9f173 add new gm for SkPath::addArc()
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/888663002
2015-01-29 10:48:16 -08:00
joshualitt
5ce33c17af dstread gm
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/883053002
2015-01-28 11:08:01 -08:00
joshualitt
c2893c5e38 Revert of GrBatchPrototype (patchset #32 id:630001 of https://codereview.chromium.org/845103005/)
Reason for revert:
One last try to fix mac perf regression

Original issue's description:
> GrBatchPrototype
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d15e4e45374275c045572b304c229237c4a82be4
>
> Committed: https://skia.googlesource.com/skia/+/d5a7db4a867c7e6ccf8451a053d987b470099198

TBR=bsalomon@google.com,kkinnunen@nvidia.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/877393002
2015-01-28 06:54:30 -08:00
joshualitt
d5a7db4a86 GrBatchPrototype
BUG=skia:

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

Review URL: https://codereview.chromium.org/845103005
2015-01-27 15:39:06 -08:00
joshualitt
ca0a1799ff Revert of GrBatchPrototype (patchset #30 id:570001 of https://codereview.chromium.org/845103005/)
Reason for revert:
creates large performance regression

Original issue's description:
> GrBatchPrototype
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d15e4e45374275c045572b304c229237c4a82be4

TBR=bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/862823004
2015-01-27 06:41:33 -08:00
joshualitt
d15e4e4537 GrBatchPrototype
BUG=skia:

Review URL: https://codereview.chromium.org/845103005
2015-01-26 13:30:10 -08:00
halcanary
b0cce2c1d3 s/sk_tools::DrawCheckerboard/sk_tool_utils::draw_checkerboard/
BUG=skia:

Review URL: https://codereview.chromium.org/873333004
2015-01-26 12:49:00 -08:00
halcanary
878fa0204b Factor out checkerboard function in gm and sampleapp into tools.
Review URL: https://codereview.chromium.org/834303005
2015-01-26 11:24:32 -08:00
kkinnunen
dc0f408a96 Fold alpha to the inner savelayer in savelayer-savelayer-restore patterns
Fold alpha to the inner savelayer in savelayer-savelayer-restore
patterns such as this:

  SaveLayer (non-opaque)
    Save
      ClipRect
      SaveLayer
      Restore
    Restore
  Restore

Current blink generates these for example for SVG content such as this:

<path style="opacity:0.5 filter:url(#blur_filter)"/>

The outer save layer is due to the opacity and the inner one is due to
blur filter being implemented with picture image filter.

Reduces layers in desk_carsvg.skp testcase from 115 to 78.

BUG=skia:3119

Review URL: https://codereview.chromium.org/835973005
2015-01-26 00:14:26 -08:00
robertphillips
028b98a080 Add repro GM for GPU clipped-AA vs. non-AA drawRect discrepancy
In the clip stack we were manually rounding out non-AA clip rects but leaving the hardening of non-AA drawRects up to the GPU. In some border cases the GPU can truncate rather than round out resulting in visual discrepancies.

BUG=423834

Committed: https://skia.googlesource.com/skia/+/933a03fecb65c83f81cf65d5cf9870c69aa379ff

Review URL: https://codereview.chromium.org/839883003
2015-01-14 09:44:02 -08:00
robertphillips
125ee60ed3 Revert of Fix GPU clipped-AA vs. non-AA drawRect discrepancy (patchset #2 id:20001 of https://codereview.chromium.org/839883003/)
Reason for revert:
This CL introduces rendering conflicts with hairlines (i.e., the hairlines get overwritten). These conflicts are particularly visible on the following GMs (for the Ubuntu and Android gpu configs):

coloremoji & complexclip2_rrect_bw

Original issue's description:
> Fix GPU clipped-AA vs. non-AA drawRect discrepancy
>
> In the clip stack we were manually rounding out non-AA clip rects but leaving the hardening of non-AA drawRects up to the GPU. In some border cases the GPU can truncate rather than round out resulting in visual discrepancies.
>
> BUG=423834
>
> Committed: https://skia.googlesource.com/skia/+/933a03fecb65c83f81cf65d5cf9870c69aa379ff

TBR=bsalomon@google.com,jvanverth@google.com
NOTREECHECKS=true
NOTRY=true
BUG=423834

Review URL: https://codereview.chromium.org/847033002
2015-01-12 18:26:01 -08:00
robertphillips
933a03fecb Fix GPU clipped-AA vs. non-AA drawRect discrepancy
In the clip stack we were manually rounding out non-AA clip rects but leaving the hardening of non-AA drawRects up to the GPU. In some border cases the GPU can truncate rather than round out resulting in visual discrepancies.

BUG=423834

Review URL: https://codereview.chromium.org/839883003
2015-01-12 15:50:38 -08:00
halcanary
a7976be1dd Add Alpha fade GM.
Review URL: https://codereview.chromium.org/804813009
2015-01-07 13:23:09 -08:00