Commit Graph

18769 Commits

Author SHA1 Message Date
hendrikw
0a1fa5e4c3 skia: Replace CommandBuffer_ with egl
I ended up exporting the egl functions directly, so this
needs to change on the skia side as well

Review URL: https://codereview.chromium.org/1324823002
2015-09-01 09:08:00 -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
joshualitt
dac7005b87 Remove GrGpuTraceMarker hooks until we rethink the design
TBR=bsalomon@google.com
BUG=526308

Review URL: https://codereview.chromium.org/1323823003
2015-09-01 08:19:46 -07:00
wangyix
aeb77eaff8 GrGLBlend::AppendPorterDuffBlend now supports kClear_Mode
BUG=skia:4182

Review URL: https://codereview.chromium.org/1307393005
2015-09-01 07:56:14 -07:00
jvanverth
2dc29940c5 Various minor cross-platform changes
Review URL: https://codereview.chromium.org/1310843007
2015-09-01 07:16:46 -07:00
mtklein
c5281e5b10 SkColorCubeFilter_opts: rounding is actually free here.
(Sk4f(float) is statically initializable, unlike the old SkPMFlor(SkPMColor).)

BUG=skia:4117

Review URL: https://codereview.chromium.org/1317593007
2015-09-01 07:09:22 -07:00
joshualitt
6335a72976 Move PathRenderers to batches folder
BUG=skia:

Review URL: https://codereview.chromium.org/1306143005
2015-09-01 06:50:55 -07:00
msarett
fbccb5995d Call standard libjpeg/libjpeg-turbo APIs
BUG=skia:

Review URL: https://codereview.chromium.org/1322623004
2015-09-01 06:43:41 -07:00
mtklein
a508f3c62d Require Sk4f::toBytes() clamps
BUG=skia:4117

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.android:Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Release-Trybot

Review URL: https://codereview.chromium.org/1312053004
2015-09-01 06:29:45 -07:00
caryclark
580c40ae71 link test to bug
crbug.com/526025 includes a minimized SVG test case.
Translating that test case into native code (fuzzTNG)
did not reproduce the bug. That test case should
have not been included with skia issue 1323813003,
and is deleted here.

Running the minimal test case in a modified version
of chrome isolated the bug. The modified version
generated the test fuzz763_3 with the edit

#define DEBUGGING_PATHOPS_FROM_HOST 1

in src/pathops/SkPathopsOp.cpp line 188.

Rename fuzz763_3 to issue_526025 to associate the test
with the bug. Note that the bug contains the body of the
CL in comment $5.

R=reed@google.com

Review URL: https://codereview.chromium.org/1315503005
2015-09-01 06:22:36 -07:00
robertphillips
f6703fa0aa Make GrTextContext no longer store a GrDrawContext
This, at least, makes GrTextContexts no longer bound to a single GrDrawContext. (Passing in a RenderTarget and praying it matched the DrawContext was always a bit fishy too).

Review URL: https://codereview.chromium.org/1320323004
2015-09-01 05:36:47 -07:00
fmalita
ddc4b46c34 Image generator-backed SkPictureShader
A respin of http://crrev.com/866773002

R=reed@google.com

Review URL: https://codereview.chromium.org/1323863002
2015-08-31 19:54:03 -07:00
mtklein
dde03ff89f Clean up remaining users of SkPMFloat
This switches over SkXfermodes_opts.h and SkColorMatrixFilter to use Sk4f,
and converts the SkPMFloat benches to Sk4f benches.

No pixels should change here, and no code beyond the Sk4f_ benches should change speed.
The benches are faster than the old versions.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1324743002
2015-08-31 15:26:08 -07:00
reed
99138876a6 simplify bitmap scaler and cache
BUG=skia:

Review URL: https://codereview.chromium.org/1320513005
2015-08-31 15:16:17 -07:00
mtklein
aba1dc8c6a Move float<->byte conversions into Sk4f.
This lets us avoid conversions to [0.0, 1.0] space and rounding that aren't necessary
for SkColorCubeFilter_opts.h.

Dropping rounding on the way back to bytes means we'll see a bunch of off-by-1 diffs.

Rough perf effect:
  SSSE3: 110 -> 93  (~15%)
  NEON: 465 -> 375  (~20%)

This is the beginning of the end for SkPMFloat as an entity distinct from Sk4f.
I've kept it for now so I can convert sites one by one and think about how things
that really want to keep PM color order will work.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1319413003
2015-08-31 14:39:59 -07:00
bungeman
b2885d59bc Document SkString::resize(int) as destructive.
It is easy to think in some cases that SkString::resize(int) is not
destructive, since optimizations mean that most of the time the data
is still there after a resize. However, in the general case, the
original string's data is lost and the new SkString contains garbage.

Review URL: https://codereview.chromium.org/1304833004
2015-08-31 14:36:48 -07:00
mtklein
46b42f5304 Add empty files to empty targets to appease XCode.
BUG=skia:4117

Review URL: https://codereview.chromium.org/1312703004
2015-08-31 14:21:08 -07:00
senorblanco
9389b871c3 Minor cleanup in GrTessellatingPathRenderer.
Vertex counts are always exact, so don't bother handling the case
where they're different. Just assert.
Rename variables to reflect.

BUG=skia:

Review URL: https://codereview.chromium.org/1322023002
2015-08-31 12:42:23 -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
bsalomon
9ceb6b5447 Revert of By default purge resources that haven't been used for 64 flushes (patchset #4 id:60001 of https://codereview.chromium.org/1316233003/ )
Reason for revert:
Breaking again

Original issue's description:
> By default purge resources that haven't been used for 64 flushes
>
> BUG=skia:4258
>
> Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104
>
> R=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54
>
> Committed: https://skia.googlesource.com/skia/+/bd783cd5b62118277b75933c3cd7b9097129259a

TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4258

Review URL: https://codereview.chromium.org/1322753004
2015-08-31 11:37:57 -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
caryclark
ae576b733d remove duplicate linked list adjustment
The list of intersection points on a curve segment may have
entries that can be safely removed when nearby points have
nearly the same t value and point value. When a path includes
very large curves as well as small ones, as is the case with
this fuzzer, additional points may lie between the similar
points that do not meet the nearby criteria.

After merging the nearby point with its doppelganger,
SkOpSegment::moveNearby() unnecessarily set the doppelganger's
next pointer to the one following the nearby point. While
this usually has no effect, since the merge already updated
the linked list, the explicit call removes the additional
outlier points from the segment.

TBR=reed@google.com
BUG=526025

Review URL: https://codereview.chromium.org/1323813003
2015-08-31 09:46:20 -07:00
borenet
5e04bcfddd Run Appurify bot in release mode
BUG=skia:4093

Review URL: https://codereview.chromium.org/1306953006
2015-08-31 09:30:57 -07:00
caryclark
5ef194c31a Suppress embedding fonts when the skp's fonts match the OS fonts.
The million SKPs generated require >5T of storage. A good deal
of that are copies of system fonts.

Chrome built with
#DEFINE SK_WHITELIST_SERIALIZED_TYPEFACES
will omit the font data if the font matches a precomputed
checksum.

The captured SKP prepends sk_ to the names of fonts that
have their data omitted. The SKP consumer can either add
renamed fonts from the recording machine, or add

gDeserializeTypefaceDelegate = WhitelistDeserializeTypeface;

which strips the sk_ prefix when deserializing typefaces.

whitelist_typefaces --check
Computes the checksums of fallback
fonts and returns 0 if the checksums match the checked-in
file SkWhitelistChecksum.cpp.

whitelist_typefaces --generate
Writes an updated version of SkWhitelistChecksum.cpp.

(Added Mike since this modifies a public header)

R=bungeman@google.com,rmistry@google.com,reed@google.com

Review URL: https://codereview.chromium.org/1317913005
2015-08-31 09:22:38 -07:00
borenet
89971d4537 Use a different download URL for Android toolchains
The current one isn't working on the Appurify bot

BUG=skia:4093

Review URL: https://codereview.chromium.org/1311533006
2015-08-31 08:35:32 -07:00
bsalomon
bd783cd5b6 By default purge resources that haven't been used for 64 flushes
BUG=skia:4258

Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104

R=robertphillips@google.com

Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54

Review URL: https://codereview.chromium.org/1316233003
2015-08-31 08:25:03 -07:00
benjaminwagner
9a40a9e6a5 Provide some detail about valentine password
BUG=skia:
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1317683006

Review URL: https://codereview.chromium.org/1317683006
2015-08-31 07:27:24 -07:00
mtklein
2409abb812 CMake builds on Ubuntu now too.
Punted for now on GL on Linux.  Man that's a beast.

BUG=skia:4269

Review URL: https://codereview.chromium.org/1315753009
2015-08-31 06:59:21 -07:00
msarett
5406d6f39a Scanline decoding for bmp
Redesigns SkScanlineDecoder.h to indicate the ordering
in which the scanlines are provided

Refactors SkSwizzler::Fill() to include the zeroInit check
and to actually be correct.

BUG=skia:3257
BUG=skia:4198

Review URL: https://codereview.chromium.org/1287423002
2015-08-31 06:55:13 -07:00
bsalomon
8db52b6367 Revert of By default purge resources that haven't been used for 64 flushes (patchset #3 id:40001 of https://codereview.chromium.org/1316233003/ )
Reason for revert:
Blocking roll

Original issue's description:
> By default purge resources that haven't been used for 64 flushes
>
> BUG=skia:4258
>
> Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104
>
> R=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54

TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4258

Review URL: https://codereview.chromium.org/1316263003
2015-08-31 03:24:13 -07:00
Brian Salomon
71d0c33068 By default purge resources that haven't been used for 64 flushes
BUG=skia:4258

Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/1316233003 .
2015-08-30 22:12:11 -04:00
rmistry
1a7f8f4a81 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1316403003
2015-08-30 00:19:11 -07:00
bsalomon
6d2a203117 Fix leak in test create for perlin noise fp
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1319723005
2015-08-29 06:27:29 -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
reed
264873d5a8 fix bounds check for ctables (thanks Hal)
BUG=skia:

Review URL: https://codereview.chromium.org/1319973008
2015-08-28 12:38:04 -07:00
benjaminwagner
5b4c69e555 Change 900k to 910k in another location.
BUG=skia:4063
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1317373002

Review URL: https://codereview.chromium.org/1317373002
2015-08-28 12:23:54 -07:00
mtklein
e0f06a4752 Example CMake build for Skia.
This works only on Mac, probably only on 64-bit,
and doesn't support SkCodec.

BUG=skia:4269

Review URL: https://codereview.chromium.org/1319543003
2015-08-28 11:51:07 -07:00
benjaminwagner
fd0eca2583 Update CT documentation on Skia site.
BUG=skia:4063
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1314413002

Review URL: https://codereview.chromium.org/1314413002
2015-08-28 10:34:47 -07:00
reed
b236d1a37b change colortable to use factory for reinflating, check for empty
BUG=525763

Review URL: https://codereview.chromium.org/1307023004
2015-08-28 10:14:18 -07:00
bungeman
62ce0303fb Replace SkPin32 with SkTPin and remove.
SkPin32 is already just forwarding to SkTPin, so convert existing
users and remove SkPin32.

Review URL: https://codereview.chromium.org/1314583003
2015-08-28 09:09:32 -07:00
bungeman
7445cef42f Remove sys/types.h include from SkTypes.h.
It appears this was added to support SkToOffT, but SkToOffT
is no longer used, so it is removed as well.

Review URL: https://codereview.chromium.org/1306963004
2015-08-28 07:39:30 -07:00
msarett
d02b99f106 Interlaced gifs without the iterator
BUG=skia:

Review URL: https://codereview.chromium.org/1315583003
2015-08-28 07:36:55 -07:00
bungeman
761cf6186e Clean up SkTLogic.
This change regularizes Skia's type traits so that when <type_traits>
can finally be used the transition is easier. Various traits are
renamed to match <type_traits> and placed in the skstd namespace.
Current users of these traits are updated.

Review URL: https://codereview.chromium.org/1317593004
2015-08-28 07:09:20 -07:00
bsalomon
4204800cd8 Convert child FPs from refs to pending executions when parent converts
Review URL: https://codereview.chromium.org/1315923004
2015-08-27 16:43:48 -07:00
bungeman
0153dea2f9 Some codec code formatting cleanup.
While looking at users of SkTAddOffset, some unwanted casts were
found. These casts are removed and the lines reformatted. However,
the formatting of the rest of the file was unhappy, so this is really
just a formatting clean-up.

Review URL: https://codereview.chromium.org/1301393010
2015-08-27 16:43:42 -07:00
rmistry
b6bf36785c Revert of By default purge resources that haven't been used for 64 flushes (patchset #2 id:20001 of https://codereview.chromium.org/1316233003/ )
Reason for revert:
Suspect for the failed "webgl_conformance on Intel GPU on Mac" test on 2 DEPS rolls:
https://codereview.chromium.org/1320943002/
https://codereview.chromium.org/1315703003/

Example build: http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/105501

Original issue's description:
> By default purge resources that haven't been used for 64 flushes
>
> BUG=skia:4258
>
> Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104

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

Review URL: https://codereview.chromium.org/1319053002
2015-08-27 13:53:48 -07:00
mdempsky
38f1f6f9e5 Remove overly complicated GR_CREATE_STATIC_PROCESSOR macro
This macro was responsible for producing code like:

    static SkAlignedStorage<sizeof(Foo)> g_gFoo_Storage;
    static Foo* gFoo = new(g_gFoo_Storage.get()) Foo;
    static SkAutoTDestroy<Foo> gFoo_ad(gFoo);

which would allocate static storage for an object of type Foo
(g_gFoo_Storage), lazily instantiate the object in that memory (via
gFoo's initializer), and then ensure that at global destruction time
the object is destroyed (via gFoo_Ad's destructor).

However, the exact same effect is achieved by just writing:

    static Foo gFoo;

Review URL: https://codereview.chromium.org/1314763009
2015-08-27 12:57:01 -07:00
mtklein
6904d1d3f1 Add a note about (x*y+255)/256.
BUG=skia:4117

Review URL: https://codereview.chromium.org/1312283004
2015-08-27 12:05:57 -07:00