Commit Graph

2115 Commits

Author SHA1 Message Date
reed
7b6945bc4e remove unused (by the outside) SkImage::newSurface, and simplify newImage -> newSubset
BUG=skia:

Review URL: https://codereview.chromium.org/1364443002
2015-09-24 00:50:58 -07:00
halcanary
5cd406f0f6 GM for http://skbug.com/4374
BUG=skia:4374

Review URL: https://codereview.chromium.org/1367623002
2015-09-23 12:46:25 -07:00
bsalomon
aca31fea8c Stop supporting HW dither
Review URL: https://codereview.chromium.org/1359833004
2015-09-22 11:38:46 -07:00
bsalomon
87ba62e67c Replace GrExtractAlphaFragmentProcessor with DstIn compose processor
Review URL: https://codereview.chromium.org/1347943003
2015-09-22 06:42:00 -07:00
joshualitt
496d29f6b2 add new gm to test overlapping lcd text
BUG=skia:

Review URL: https://codereview.chromium.org/1358563002
2015-09-18 12:03:13 -07:00
joshualitt
33e91f1673 Make Ben happy
TBR=
BUG=skia:

Review URL: https://codereview.chromium.org/1351193004
2015-09-18 11:28:59 -07:00
fmalita
3b0d532df7 Purge cached resources on SkImage destruction.
BUG=532981
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1352883004
2015-09-18 08:07:31 -07:00
wangxianzhu
ef6c50a80f Merge sub-device annotations in SkPDFDevice::drawDevice()
Previously annotations added between saveLayer/restore were lost.

Merge annotations in SkPDFDevice::drawDevice(). Also modified code to
apply correct transformation and clipping on annotations added between
saveLayer/restore:
- Apply the initial transform only when adding the annotations into the
  doc, otherwise we need to unapply sub-device's initial transform
  before merging the annotations into parent-device.
- Apply only device-local clipping. fClipStack is in global coordinates,
  which is not suitable to clip rects in sub-devices.

BUG=skia:4080
BUG=503515

Review URL: https://codereview.chromium.org/1257533004
2015-09-17 20:38:02 -07:00
reed
1b55a963a2 Reland of add a ClassID function to GrBatch (patchset #1 id:1 of https://codereview.chromium.org/1353043002/ )
Reason for revert:
DEPS roll seems to have landed w/o this revert, so revert it again

Original issue's description:
> Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of https://codereview.chromium.org/1352813003/ )
>
> Reason for revert:
> Speculative revert to unblock DEPS roll
>
> Original issue's description:
> > add a ClassID function to GrBatch
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9
> >
> > Committed: https://skia.googlesource.com/skia/+/eb44d53cf96a7eaf103a98d76079ce1f5495e343
>
> TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/48e3a45ade15c52c0c1a10cb00907dd444897745

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

Review URL: https://codereview.chromium.org/1344373005
2015-09-17 20:16:13 -07:00
reed
48e3a45ade Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of https://codereview.chromium.org/1352813003/ )
Reason for revert:
Speculative revert to unblock DEPS roll

Original issue's description:
> add a ClassID function to GrBatch
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9
>
> Committed: https://skia.googlesource.com/skia/+/eb44d53cf96a7eaf103a98d76079ce1f5495e343

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

Review URL: https://codereview.chromium.org/1353043002
2015-09-17 17:35:11 -07:00
joshualitt
eb44d53cf9 add a ClassID function to GrBatch
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9

Review URL: https://codereview.chromium.org/1352813003
2015-09-17 11:50:57 -07:00
joshualitt
a7008403dc Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of https://codereview.chromium.org/1352813003/ )
Reason for revert:
breaks mac bot

Original issue's description:
> add a ClassID function to GrBatch
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9

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

Review URL: https://codereview.chromium.org/1345393003
2015-09-17 11:43:02 -07:00
joshualitt
4078d529e9 add a ClassID function to GrBatch
BUG=skia:

Review URL: https://codereview.chromium.org/1352813003
2015-09-17 11:21:17 -07:00
egdaniel
27b6335c71 On gpu, use max(r,g,b) for coverage alpha in LCD and update lcd blend gm.
BUG=skia:

Review URL: https://codereview.chromium.org/1339213004
2015-09-15 13:13:50 -07:00
fmalita
5598b63cd2 Convert unit tests, GMs from SkBitmapSource to SkImagesource
This removes SkBitmapSource clients within Skia.

http://crrev.com/1334173004 does the same for Blink, so we should be
able to remove SkBitmapSource in a follow-up.

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

Review URL: https://codereview.chromium.org/1343123002
2015-09-15 11:26:14 -07:00
robertphillips
30c4cae7d3 Add special case circle blur for Ganesh
This makes the blurcircles bench go from ~33us to ~8us on Windows desktop.

It will require layout test suppressions

Review URL: https://codereview.chromium.org/1311583005
2015-09-15 10:20:55 -07:00
egdaniel
723b0501e2 Add support for blending of LCD for all blend modes.
BUG=skia:

Review URL: https://codereview.chromium.org/1313623002
2015-09-15 09:31:40 -07:00
fmalita
cd56f812e0 SkImageSource
Blink is migrating away from SkBitmaps, so we need an SkImage-based
SkImageFilter source.  This is pretty much a 1-1 equivalent of
SkBitmapSource.

To avoid duplication, relocate the SkImage deserialization logic
from SkPictureData to SkReadBuffer.

R=reed@google.com,robertphillips@google.com,senorblanco@chromium.org

Review URL: https://codereview.chromium.org/1343703005
2015-09-14 13:31:18 -07:00
reed
74bd953719 discardable pixelrefs are gone, update tests accordingly
BUG=skia:4328

Review URL: https://codereview.chromium.org/1340803002
2015-09-14 08:52:12 -07:00
reed
c4a83e2652 support colortables in cacherator
BUG=skia:
TBR=scroggo

Review URL: https://codereview.chromium.org/1339753002
2015-09-11 11:47:27 -07:00
reed
25507d9a94 fix leaked picture
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1329143006
2015-09-09 13:42:14 -07:00
caryclark
6651a3238d Reland of more zero-length changes for svg compatibility (patchset #1 id:1 of https://codereview.chromium.org/1334543002/ )
Reason for revert:
DEPS should be fixed now

Original issue's description:
> Revert of more zero-length changes for svg compatibility (patchset #6 id:100001 of https://codereview.chromium.org/1330623003/ )
>
> Reason for revert:
> breaks DEPS
>
> Original issue's description:
> > more zero-length changes for svg compatibility
> >
> > If a path contains a moveTo followed by a line or curve,
> > even if the line or curve has no length, SVG expects
> > the end caps to draw if the cap style is round or square.
> >
> > Fredrik Söderquist attached a patch to the chrome bug
> > (slightly modified here) that fixes layout test failures
> > resulting from deleting special-case code in SVG
> > dealing with zero-length path segments.
> >
> > R=reed@google.com,fs@opera.com
> > BUG=22974
> >
> > Committed: https://skia.googlesource.com/skia/+/62fb1ba1786863e545c89839b5706ad5151cec15
>
> TBR=fs@opera.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=22974
>
> Committed: https://skia.googlesource.com/skia/+/5ca4fa3846067a47e88d35ace895df3ebe3ec2a5

TBR=fs@opera.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=22974

Review URL: https://codereview.chromium.org/1314833004
2015-09-09 13:20:49 -07:00
reed
7628967820 add picture-image variant
BUG=skia:

Review URL: https://codereview.chromium.org/1329283002
2015-09-09 11:29:09 -07:00
reed
4228c1fa2c switch over to using images
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1313543004
2015-09-09 10:45:36 -07:00
caryclark
5ca4fa3846 Revert of more zero-length changes for svg compatibility (patchset #6 id:100001 of https://codereview.chromium.org/1330623003/ )
Reason for revert:
breaks DEPS

Original issue's description:
> more zero-length changes for svg compatibility
>
> If a path contains a moveTo followed by a line or curve,
> even if the line or curve has no length, SVG expects
> the end caps to draw if the cap style is round or square.
>
> Fredrik Söderquist attached a patch to the chrome bug
> (slightly modified here) that fixes layout test failures
> resulting from deleting special-case code in SVG
> dealing with zero-length path segments.
>
> R=reed@google.com,fs@opera.com
> BUG=22974
>
> Committed: https://skia.googlesource.com/skia/+/62fb1ba1786863e545c89839b5706ad5151cec15

TBR=fs@opera.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=22974

Review URL: https://codereview.chromium.org/1334543002
2015-09-09 09:34:22 -07:00
halcanary
2a24338c77 GM: replace boilerplate with macros
I have verified locally that nothing draws differently.

Motivation:
*   SK_SIMPLE_GM makes it easier to write a GM.
*   Reducing 1100 lines of code makes maintenance easier.
*   Simple GMs are easy to convert to Fiddles.

Review URL: https://codereview.chromium.org/1333553002
2015-09-09 08:16:41 -07:00
caryclark
62fb1ba178 more zero-length changes for svg compatibility
If a path contains a moveTo followed by a line or curve,
even if the line or curve has no length, SVG expects
the end caps to draw if the cap style is round or square.

Fredrik Söderquist attached a patch to the chrome bug
(slightly modified here) that fixes layout test failures
resulting from deleting special-case code in SVG
dealing with zero-length path segments.

R=reed@google.com,fs@opera.com
BUG=22974

Review URL: https://codereview.chromium.org/1330623003
2015-09-09 07:04:33 -07:00
msarett
9260296349 Bot fix
https://codereview.chromium.org/1311503008
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage/builds/1083/steps/build%20dm/logs/stdio

BUG=skia:

Review URL: https://codereview.chromium.org/1331463004
2015-09-04 13:12:55 -07:00
reed
58e524c98c draw 3 moveTos followed by various others [moves, lines, closes]
BUG=skia:

Review URL: https://codereview.chromium.org/1311503008
2015-09-04 10:03:26 -07:00
caryclark
c8b350df07 update gm test size to include new elements
TBR=
BUG=skia:562

Review URL: https://codereview.chromium.org/1305983006
2015-09-04 06:19:48 -07:00
caryclark
500ab7562c change for issue 562
Add a current version of the patch described in issue 562.

Of interest: the reference row, which is described in the
bug as looking correct draws differently with Ganesh.

TBR=senorblanco
BUG=skia:562

Review URL: https://codereview.chromium.org/1324023006
2015-09-04 05:20:32 -07:00
robertphillips
943a462fef Minor code cleanup (left over from prior CL)
This was requested in https://codereview.chromium.org/1309543012/ (Add new GM to directly exercise perspective bitmap drawing)

Review URL: https://codereview.chromium.org/1320673011
2015-09-03 13:32:33 -07:00
wangyix
d705958375 Will try composing a linear gradient with a color bitmap as well as an alpha8 bitmap to make sure the paint's color is being used/ignored in the right places.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1311043008
2015-09-03 08:32:22 -07:00
robertphillips
fac9ceb5de Add new GM to directly exercise perspective bitmap drawing
BUG=skia:3326

Review URL: https://codereview.chromium.org/1309543012
2015-09-03 08:32:08 -07:00
robertphillips
c9a3706f1e Limit lifetime of GrDrawContext objects
GrDrawContext's are about to become real allocated objects. This CL sets up the machinery so they won't leak.

Review URL: https://codereview.chromium.org/1321353002
2015-09-01 08:34:28 -07:00
bsalomon
afcd7cd324 Rename flag from "distance field" to "device independent."
Review URL: https://codereview.chromium.org/1322433006
2015-08-31 12:39:41 -07:00
senorblanco
2aec4e9466 Add a GM for image filters applied to stroked primitives.
BUG=skia:3194

Review URL: https://codereview.chromium.org/1323573004
2015-08-31 10:28:49 -07:00
bsalomon
c21b09eec9 Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa

Review URL: https://codereview.chromium.org/1316513002
2015-08-28 18:46:56 -07:00
rmistry
a511e6ad10 Revert of Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (patchset #8 id:140001 of https://codereview.chromium.org/1316513002/ )
Reason for revert:
Primary suspect in failing DEPS rolls:
* https://codereview.chromium.org/1315753006
* https://codereview.chromium.org/1308323006
* https://codereview.chromium.org/1320903004

Primary suspect because the failing win bots did not fail in https://codereview.chromium.org/1315753005

Original issue's description:
> Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
>
> Committed: https://skia.googlesource.com/skia/+/ecfdc251be71f3d634e76afdd6375bf55fc061aa

TBR=joshualitt@google.com,wangyix@google.com,robertphillips@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1313573005
2015-08-28 17:16:50 -07:00
bsalomon
ecfdc251be Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor*
Review URL: https://codereview.chromium.org/1316513002
2015-08-28 14:33:47 -07:00
halcanary
96fcdcc219 Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
bsalomon
ac856c97ac Remove GrStagedProcessor, remove the word Stage as it applies to FPs
Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

Review URL: https://codereview.chromium.org/1307223004
2015-08-27 06:30:17 -07:00
senorblanco
7b7ecfc046 Fix clipped lighting image filters.
The CPU path for lighting image filters was not adjusting the filter
matrix to accommodate srcOffset, resulting in incorrectly-positioned
lights.  (The GPU path was doing this correctly.)

This change adds a new test case to the imagefiltersclipped GM,
so it will need new baselines.

BUG=skia:

Review URL: https://codereview.chromium.org/1310053004
2015-08-26 14:26:40 -07:00
halcanary
385fe4d4b6 Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
joshualitt
e46cf96ef5 Write a gm to verify append large glyph as path works
BUG=chromium:522846

Review URL: https://codereview.chromium.org/1316443006
2015-08-26 11:19:56 -07:00
caryclark
5cb00a9573 zero-length cap fix
Re-land; layout tests are suppressed and gm differences are understood.
A merge conflict prevented a automatic reland.

If the endcap is not butt, draw the endcaps even when the line
has zero length.

If the dash length is zero, generate a zero length line segment.

Treat a move followed by a close as a move followed by a zero-length
line.

TBR=reed@google.com
BUG=422974

Review URL: https://codereview.chromium.org/1314213002
2015-08-26 09:04:55 -07:00
rmistry
4bf69f7bbc Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (patchset #6 id:90001 of https://codereview.chromium.org/1307223004/ )
Reason for revert:
Causes bot failures:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1639

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/1702

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-GPU-PowerVR-x86-Debug/builds/1223

Original issue's description:
> Remove GrStagedProcessor, remove the word Stage as it applies to FPs
>
> Committed: https://skia.googlesource.com/skia/+/24243446cdf7b7e4e132c2a0c387c7723777e0c7

TBR=joshualitt@google.com,egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1306803003
2015-08-26 06:48:27 -07:00
bsalomon
24243446cd Remove GrStagedProcessor, remove the word Stage as it applies to FPs
Review URL: https://codereview.chromium.org/1307223004
2015-08-26 05:39:18 -07:00
caryclark
45398dff71 Reland of ix zero-length tangent (patchset #1 id:1 of https://codereview.chromium.org/1312243002/ )
Reason for revert:
Layout suppression has landed, and verified that Skia gm test changes are correct.

Original issue's description:
> Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
>
> Reason for revert:
> causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.
>
> Original issue's description:
> > fix zero-length tangent
> >
> > If the end point and the control point are the same, computing
> > the tangent will result in (0, 0). In this case, use the prior
> > control point instead.
> >
> > R=reed@google.com
> >
> > BUG=skia:4191
> >
> > Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d
>
> TBR=reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/91298b47c547b2ab4697038c04685af957bd1416

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4191

Review URL: https://codereview.chromium.org/1320473002
2015-08-25 13:19:06 -07:00
caryclark
91298b47c5 Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
Reason for revert:
causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.

Original issue's description:
> fix zero-length tangent
>
> If the end point and the control point are the same, computing
> the tangent will result in (0, 0). In this case, use the prior
> control point instead.
>
> R=reed@google.com
>
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4191

Review URL: https://codereview.chromium.org/1312243002
2015-08-25 10:02:46 -07:00