Commit Graph

694 Commits

Author SHA1 Message Date
mtklein
2766c00fc0 remove SkInstCnt
It's been outclassed by Valgrind and leak sanitizer,
and it seems to be causing problems for external folks building Skia.

I'm not sure why our own builds seem unaffected.

Latest thread:
https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0

BUG=skia:

Review URL: https://codereview.chromium.org/1217573002
2015-06-26 11:45:03 -07:00
robertphillips
9a53fd7c41 Begin kLegacyFontHost_InitType cleanup
This CL starts the process of pushing kLegacyFontHost_InitType-type SkSurfaceProps up the call stack and out of Skia. It:

 Gets rid of the default SkBaseDevice ctor. This means everyone has to always hand an explicit SkSurfaceProps to it.

 It makes public the SkBitmapDevice creation methods that require SkSurfaceProps.

 Removes (in Skia's code base) all SkBitmapDevice ctor calls w/o SkSurfaceProps.

 Makes the "recording" canvases (e.g., pdf, svg, xps) explicitly not use kLegacyFontHost_InitType.

 Replicates the creating canvas/device's flags on saveLayer devices

BUG=skia:3934

Review URL: https://codereview.chromium.org/1204433002
2015-06-22 09:46:59 -07:00
fmalita
109a23d64f Remove the SkCanvas comment API
No longer used in Chromium/Blink.

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

Review URL: https://codereview.chromium.org/1153593003
2015-06-15 13:15:31 -07:00
joshualitt
611cc5f964 delete experimental path renderers
BUG=skia:

Review URL: https://codereview.chromium.org/1160863006
2015-05-29 07:09:09 -07:00
reed
80ea19ca4b Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/)
Reason for revert:
android patched, blink has rolled

Original issue's description:
> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
>
> Reason for revert:
> need to wait for Blink roll (and patch android)
>
> Original issue's description:
> > stop calling SkScalarDiv
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1135693003
2015-05-12 10:37:34 -07:00
reed
2629697933 Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
Reason for revert:
need to wait for Blink roll (and patch android)

Original issue's description:
> stop calling SkScalarDiv
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1138263002
2015-05-12 10:28:06 -07:00
reed
67d71c8982 stop calling SkScalarDiv
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1135053002
2015-05-12 09:47:22 -07:00
tfarina
567ff2f614 Cleanup: Remove unnecessary double-semicolons.
The entries were found by the following command line:

$ find . -regex ".*\.[cChH]\(pp\)?" | xargs git grep -e ';;' --and --not
-e 'for *(.*;;'

Which is a combination of http://stackoverflow.com/a/3858879 and
http://gitster.livejournal.com/27674.html

BUG=None
R=mtklein@google.com

Review URL: https://codereview.chromium.org/1088763005
2015-04-27 07:01:45 -07:00
reed
a1e41c6d9a default to 8888 for ganesh in sampleapp on iOS
BUG=skia:

Review URL: https://codereview.chromium.org/1078843002
2015-04-09 13:43:22 -07:00
stephana
195f62d07d BUG=skia:
Review URL: https://codereview.chromium.org/1054073003
2015-04-09 07:57:54 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
scroggo
7e051f9305 Fix SampleApp build on iOS.
Remove references to kNullGPU_DeviceType, which has been removed.

Review URL: https://codereview.chromium.org/960133004
2015-02-26 09:52:12 -08:00
halcanary
91d1d621de zlib/pdf: remove HaveFlate(), depend on preprocessor defines
Review URL: https://codereview.chromium.org/933523007
2015-02-17 14:43:06 -08:00
fmalita
2aafe6f427 Add SkSVGCanvas
Add a public SVG canvas factory + move the SVG files from
experimental -> src/svg/.

Update current clients to the new API.

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

Review URL: https://codereview.chromium.org/902583006
2015-02-06 12:51:10 -08:00
reed
e73da40c35 add length parameter to addText, to match attr values
BUG=skia:3392

Review URL: https://codereview.chromium.org/896363002
2015-02-04 18:29:27 -08:00
fmalita
a9d9de45c1 [SkSVGDevice] drawTextOnPath() support
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/874853003
2015-02-04 17:54:46 -08:00
fmalita
12753ccc9a [SkSVGDevice] Add support for more stroke params
stroke-linecap, stroke-linejoin, stroke-miterlimit, non-scaling-stroke.

R=mtklein@google.com

Review URL: https://codereview.chromium.org/897953004
2015-02-04 14:56:35 -08:00
fmalita
1a481fe4bf [SkSVGDevice] Initial clipping support
Implement SVG clips based on clip stack flattening -
which is now exposed in SkClipStack::asPath() and shared
with SkCanvas's simplify-clip code.

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

Review URL: https://codereview.chromium.org/876923003
2015-02-04 07:39:34 -08:00
fmalita
fe3f260ff9 [SkSVGDevice] Initial text support
R=reed@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/899683002
2015-02-03 17:47:12 -08:00
caryclark
da5bcab059 remove remaining parts of SkExample
R=reed@google.com

Review URL: https://codereview.chromium.org/895103002
2015-02-03 11:16:05 -08:00
fmalita
532faa9021 [SkSVGDevice] Initial shader/gradient support
* linear gradient support (based on shawcroft@google.com's CL)
* generic paint resources reorg
* opacity support

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

Review URL: https://codereview.chromium.org/892973002
2015-02-03 05:44:40 -08:00
caryclark
c8fcafb3f0 First cut at cleaning up Sergio's example code and moving some common code to SkWindow.
Eventually, this will be moved to be a peer of SampleApp so it is compiled by the bots to avoid future bit rot.

Also ignore XCode auto-generated flag in CommandLineFlags, and remove the unused multiple-example part.

Review URL: https://codereview.chromium.org/890873003
2015-01-30 12:37:02 -08:00
fmalita
93957f4e80 Initial SVG backend stubbing
This adds SkSVGDevice and a small utility for converting SKP files to SVG (skp2svg).

R=reed@google.com,jcgregorio@google.com
BUG=skia:3368

Review URL: https://codereview.chromium.org/892533002
2015-01-30 09:03:29 -08:00
caryclark
416e394379 remove experimental pixman files
these files have never worked, and contain nother of value

R=reed@google.com

Review URL: https://codereview.chromium.org/890703002
2015-01-29 10:44:35 -08:00
caryclark
17a2b5473d The original instantiation of pathops was in the experimental/Intersection directory. Anything of value has been copied into the mainline.
The obsolete gyp files are also included, along with a pixman test that never functioned but accidentally referenced some of these deleted files.

Review URL: https://codereview.chromium.org/867213004
2015-01-29 10:43:09 -08:00
mtklein
9c3f17d6e8 Fold gmtoskp into DM, as --src gm --config skp.
BUG=skia:

Review URL: https://codereview.chromium.org/885733002
2015-01-28 11:35:18 -08:00
halcanary
a9e84767e4 experimental/skp_to_pdf_md5 optionally also outputs pdf files
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/868333002
2015-01-24 13:04:57 -08:00
scroggo
a1193e4b0e Make SkStream *not* ref counted.
SkStream is a stateful object, so it does not make sense for it to have
multiple owners. Make SkStream inherit directly from SkNoncopyable.

Update methods which previously called SkStream::ref() (e.g.
SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(),
which required the existing owners to call SkStream::unref()) to take
ownership of their SkStream parameters and delete when done (including
on failure).

Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some
cases this means heap allocating streams that were previously stack
allocated.

Respect ownership rules of SkTypeface::CreateFromStream() and
SkImageDecoder::buildTileIndex().

Update the comments for exceptional methods which do not affect the
ownership of their SkStream parameters (e.g.
SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be
explicit about ownership.

Remove test_stream_life, which tested that buildTileIndex() behaved
correctly when SkStream was a ref counted object. The test does not
make sense now that it is not.

In SkPDFStream, remove the SkMemoryStream member. Instead of using it,
create a new SkMemoryStream to pass to fDataStream (which is now an
SkAutoTDelete).

Make other pdf rasterizers behave like SkPDFDocumentToBitmap.

SkPDFDocumentToBitmap delete the SkStream, so do the same in the
following pdf rasterizers:

SkPopplerRasterizePDF
SkNativeRasterizePDF
SkNoRasterizePDF

Requires a change to Android, which currently treats SkStreams as ref
counted objects.

Review URL: https://codereview.chromium.org/849103004
2015-01-21 12:09:53 -08:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
robertphillips
53a8f216a8 Update PdfViewer's SkNulCanvas
This appears to have been missed in https://codereview.chromium.org/831253002/ (move remaining virtual draw methods to onDraw)

Review URL: https://codereview.chromium.org/839433002
2015-01-05 11:11:21 -08:00
halcanary
abe4baa2c3 experimental skp_to_pdf_md5 program.
This program takes a list of Skia Picture (SKP) files and
renders each as a multipage PDF, then prints out the MD5
checksum of the PDF file.  This can be used to verify that
changes to the PDF backend will not change PDF output.

Review URL: https://codereview.chromium.org/832403002
2015-01-05 08:55:24 -08:00
reed
c4fda92f45 remove unused drawData
BUG=skia:

Review URL: https://codereview.chromium.org/830083002
2015-01-02 06:39:51 -08:00
mtklein
f9c9d72e57 Delete old bench expectation code.
Just noticed these were still here.

BUG=skia:

Review URL: https://codereview.chromium.org/801373003
2014-12-15 13:17:01 -08:00
junov
3fcc125c77 Remove SkCanvas::isDrawingToLayer
BUG=3245

Review URL: https://codereview.chromium.org/803913005
2014-12-15 11:34:06 -08:00
bsalomon
0aa5cea869 fix last warnings on w64 and turn on w.a.e.
Review URL: https://codereview.chromium.org/801413002
2014-12-15 09:13:35 -08:00
Florin Malita
c54d8db4d1 Remove SkCanvas::drawBitmapMatrix()
R=mtklein@google.com, reed@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/789033002
2014-12-10 12:02:16 -05:00
robertphillips
266b2adce7 Remove virtual clear in PdfViewer's SkNulCanvas
Causing compilation complaints on Windows

Review URL: https://codereview.chromium.org/783683004
2014-12-08 11:37:35 -08:00
reed
b19ce3146c quick fix to land clear() change
BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/774863003
2014-12-04 08:39:09 -08:00
halcanary
85a5750ffa Fix PdfViewer BGR byte order
BUG=skia:3184

Review URL: https://codereview.chromium.org/775763003
2014-12-03 11:03:52 -08:00
halcanary
84bc52ad26 work in progress
Review URL: https://codereview.chromium.org/769423002
2014-12-02 14:01:46 -08:00
halcanary
742cacdd20 multipage_pdf_profiler, gmtoskp
Review URL: https://codereview.chromium.org/769083003
2014-12-01 12:21:25 -08:00
tfarina
0c9acd5d2e Cleanup: Remove SimpleiOSApp xcode project file.
There is already an GYP version for it in:
https://skia.googlesource.com/skia/+/master/gyp/SimpleiOSApp.gyp

BUG=None
TEST=None
R=caryclark@google.com

Review URL: https://codereview.chromium.org/691133004
2014-11-03 15:10:49 -08:00
mtklein
3eeb156822 patch from issue 697743002
working

The key here was to get everything into a single library.  Our shared library build is the easiest way to do that.  Some light skimming online makes it look like perhaps cgo requires shared libraries, so that may be at play here too.

BUG=skia:

Review URL: https://codereview.chromium.org/698943002
2014-11-03 10:45:50 -08:00
stephana
0b5fc9774f Quick and dirty test to call the C interface from GO.
BUG=skia:

Review URL: https://codereview.chromium.org/670303005
2014-10-31 07:11:19 -07:00
tfarina
38406c82b9 Cleanup: Go with SkDebugf instead of GrPrintf.
Since GrPrintf is just defined to SkDebugf, we can go with the later
directly.

BUG=None
TEST=None
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/695663003
2014-10-31 07:11:12 -07:00
Greg Humphreys
89154343f0 delete webtry from main skia repo; it's been moved to buildbots
BUG=skia:

Review URL: https://codereview.chromium.org/688713002
2014-10-29 12:30:16 -04:00
Greg Humphreys
5abfa688b7 fix issues with simultaneous configs and security jail on skfiddle
BUG=skia:
TBR=jcgregorio

Review URL: https://codereview.chromium.org/688003002
2014-10-29 14:57:10 +00:00
Greg Humphreys
af58b5fcba rework GUI, scripts, and fiddle main for multiple simultaneous configs
You can now select Raster, Ganesh, or both (PDF coming soon), and see
all output simultaneously.

BUG=skia:
R=jcgregorio@google.com
TBR=jcgregorio

Review URL: https://codereview.chromium.org/688433002
2014-10-29 10:31:33 -04:00
jcgregorio
e001da2558 SkV8Sample: Now with Path2D and Path2DBuilder.
BUG=skia:

Review URL: https://codereview.chromium.org/661033005
2014-10-29 05:33:28 -07:00
Greg Humphreys
9571567802 remove the GPU checkbox from the hash / database
We decided last week that GPU rendering wouldn't be associated
with the fiddle itself; options in the left bar will be split into
ones that are bound to the fiddle (so appear in the hash and database)
and ones that are run-specific (like the rendering mode).

This will leave us better placed to do things like rendering in multiple
modes at once.

BUG=skia:
R=jcgregorio@google.com

Review URL: https://codereview.chromium.org/685543002
2014-10-28 13:33:54 -04:00