mtklein
c92c129ff8
Sketch splitting SkPicture into an interface and SkBigPicture.
...
Adds small pictures for drawRect(), drawTextBlob(), and drawPath().
These cover about 89% of draw calls from Blink SKPs,
and about 25% of draw calls from our GMs.
SkPicture handles:
- serialization and deserialization
- unique IDs
Everything else is left to the subclasses:
- playback(), cullRect()
- hasBitmap(), hasText(), suitableForGPU(), etc.
- LayerInfo / AccelData if applicable.
The time to record a 1-op picture improves a good chunk
(2 mallocs to 1), and the time to record a 0-op picture
greatly improves (2 mallocs to none):
picture_overhead_draw: 450ns -> 350ns
picture_overhead_nodraw: 300ns -> 90ns
BUG=skia:
Review URL: https://codereview.chromium.org/1112523006
2015-05-07 13:41:07 -07:00
joshualitt
2fbd4068bd
tesselating path renderer unit tests
...
BUG=skia:
Review URL: https://codereview.chromium.org/1127183006
2015-05-07 13:06:42 -07:00
halcanary
96287f7af7
SkPDF: detect YUV-JPEG without relying on ImageGenerator
...
JPEG/JFIF References:
* http://www.w3.org/Graphics/JPEG/itu-t81.pdf
* http://www.w3.org/Graphics/JPEG/jfif3.pdf
BUG=476721
BUG=446940
Review URL: https://codereview.chromium.org/1133443003
2015-05-07 11:46:59 -07:00
bsalomon
e64eb570a5
Iterate over instanced draws in GrGpu rather than above GrBatchTarget
...
Review URL: https://codereview.chromium.org/1127273007
2015-05-07 11:35:55 -07:00
joshualitt
3b58d75170
Initial CL to create Reorder command builder behind a flag
...
BUG=skia:
Review URL: https://codereview.chromium.org/1129943004
2015-05-07 11:14:30 -07:00
mtklein
fc00a7c501
SK_ARRAY_COUNT shouldn't work on pointers.
...
Simpler version of https://codereview.chromium.org/1123923002/
BUG=skia:3593
R=brucedawson@chromium.org ,reed@google.com,tfarina@chromium.org
No public API changes.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1114283003
2015-05-07 10:58:44 -07:00
bungeman
4a8d622e1d
Add default resourcePath to SampleApp on Android.
...
Currently SampleApp on Android cannot find resources. This sets the
resourcePath to /data/local/tmp/skia/resources/ which is the path
used in documentationo. A future change will allow this default to be
overridden.
BUG=skia:3815
Review URL: https://codereview.chromium.org/1125363004
2015-05-07 10:57:02 -07:00
mtklein
e44b5084d8
DM: use SkFunction to make required argument type clearer.
...
Previously it was hard to tell that DrawFn took an SkCanvas* and returned an Error. Now it's clear from the type.
BUG=skia:
Review URL: https://codereview.chromium.org/1125233002
2015-05-07 10:53:34 -07:00
mtklein
4525f438a8
We don't use boxBlurY.
...
Also noticed nobody sets SK_DISABLE_BLUR_DIVISION_OPTIMIZATION.
BUG=skia:
Review URL: https://codereview.chromium.org/1134513003
2015-05-07 10:51:55 -07:00
mtklein
32618cb857
Test sp-8888 mode on a few fast bots.
...
(It's not particularly slow, but this mode doesn't really need global coverage.)
BUG=skia:
Review URL: https://codereview.chromium.org/1129903003
2015-05-07 10:26:44 -07:00
robertphillips
e40d397259
Isolate GrBufferAllocPools inside GrBatchTarget
...
This CL refactors the location of the GrBufferAllocPools so they reside entirely inside the GrBatchTarget. This is in preparation for making them use scratch resources.
Review URL: https://codereview.chromium.org/1131553002
2015-05-07 09:51:43 -07:00
joshualitt
0acd0d33fd
adding uniqueID to GrContext
...
BUG=skia:
Review URL: https://codereview.chromium.org/1128873009
2015-05-07 08:23:19 -07:00
joshualitt
622d3aded2
Adding unit tests for limited subset of DefaultPathRenderer
...
BUG=skia:
Review URL: https://codereview.chromium.org/1129203002
2015-05-07 08:13:11 -07:00
cdalton
797e906c74
Re-enable validation for glBlendBarrierKHR and glBlendEquation
...
BUG=skia:
Review URL: https://codereview.chromium.org/1103673002
2015-05-06 13:53:12 -07:00
cdalton
8917d62ef4
Implement support for KHR_blend_equation_advanced
...
Uses KHR(or NV)_blend_equation_advanced to implement custom Xfer modes
in hardware.
BUG=skia:
Review URL: https://codereview.chromium.org/1037123003
2015-05-06 13:40:21 -07:00
mtklein
e0cab96599
Really use SSE4 (and SSSE3) in SkBlurImage_SSE4
...
We don't seem to be making good use of the available instruction set.
SSE4.1 gives us an easy way to unpack a pixel into an __m128i, and
SSSE3 gave us an easy way to do the reverse.
This should be bit-perfect and about a 10% speedup.
BUG=skia:
Review URL: https://codereview.chromium.org/1123263003
2015-05-06 13:22:02 -07:00
cdalton
0ce02c3ac1
Place nvpr above tesselating path renderer in the chain
...
BUG=skia:
Review URL: https://codereview.chromium.org/1123343003
2015-05-06 13:16:43 -07:00
reed
c1e1faae07
use floor for mip-level choice
...
this chrome change must land first: https://codereview.chromium.org/1131663002/
BUG=skia:
Review URL: https://codereview.chromium.org/1131613002
2015-05-06 13:02:37 -07:00
reed
a85d4d0814
Make drawImage a virtual on SkDevice
...
This reverts commit 06dad4b92f
.
BUG=485243
Review URL: https://codereview.chromium.org/1129843003
2015-05-06 12:56:48 -07:00
mtklein
44d43d8d6e
Add a control benchmark.
...
I'm thinking of using this in perf with something like:
ratio(fill(filter("test=foo")), fill(filter("test=control")))
Does that make sense to you?
Not sure that this is really a good control bench on all bots,
but I propose we just run it a bit and find out if it needs work.
BUG=skia:
Review URL: https://codereview.chromium.org/1129823003
2015-05-06 12:42:04 -07:00
cdalton
e4017d8ca7
Add layout qualifiers to GrGLShaderBuilder
...
BUG=skia:
Review URL: https://codereview.chromium.org/1114813002
2015-05-06 11:48:56 -07:00
mtklein
6fbf4b3a7f
Do we still need this DOUBLE_LOOP feature?
...
If so, let's do it this way so it works for all source types and doesn't need
to be chosen at compile time.
BUG=skia:
Review URL: https://codereview.chromium.org/1129693003
2015-05-06 11:35:40 -07:00
halcanary
bc4696b917
SkPDF: Move utility fns to SkPDFUtils
...
BUG=skia:3585
Review URL: https://codereview.chromium.org/1124193003
2015-05-06 10:56:04 -07:00
reed
06dad4b92f
Revert of Revert of Revert of Make drawImage a virtual on SkDevice (patchset #1 id:1 of https://codereview.chromium.org/1126273002/ )
...
Reason for revert:
still breaking webglconformance
Original issue's description:
> Revert of Revert of Make drawImage a virtual on SkDevice (patchset #1 id:1 of https://codereview.chromium.org/1124003002/ )
>
> Reason for revert:
> retry now that some fixes (onDrawImage overrides) have landed in chrome/blink
>
> Original issue's description:
> > Revert of Make drawImage a virtual on SkDevice (patchset #4 id:60001 of https://codereview.chromium.org/1122643005/ )
> >
> > Reason for revert:
> > speculative to see if it unblocks DEPS roll
> >
> > Original issue's description:
> > > Make drawImage a virtual on SkDevice
> > >
> > > Now with patch for SkDeferredCanvas
> > >
> > > This reverts commit 119468b71f
.
> > >
> > > BUG=skia:
> > >
> > > Committed: https://skia.googlesource.com/skia/+/14fe8fd3e53b5e988aac189a8bc3ed28904d85c8
> >
> > TBR=robertphillips@google.com ,mtklein@google.com,reed@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/3538e3bfe2e00bc1b5b48d977fa7adff64d8c96b
>
> TBR=robertphillips@google.com ,mtklein@google.com,reed@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/620ba3afe09d4173c87537040fe50c1c1895fb1a
TBR=robertphillips@google.com ,mtklein@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1127993004
2015-05-06 10:16:02 -07:00
borenet
d9b6be197f
Remove upright-matrix- configs from Android bots
...
The Android bots are flaking like crazy. I'm not sure if these configs
are hurting the situation, but let's see if this helps.
TBR=mtklein,halcanary
BUG=skia:
Review URL: https://codereview.chromium.org/1131603002
2015-05-06 08:33:51 -07:00
reed
620ba3afe0
Revert of Revert of Make drawImage a virtual on SkDevice (patchset #1 id:1 of https://codereview.chromium.org/1124003002/ )
...
Reason for revert:
retry now that some fixes (onDrawImage overrides) have landed in chrome/blink
Original issue's description:
> Revert of Make drawImage a virtual on SkDevice (patchset #4 id:60001 of https://codereview.chromium.org/1122643005/ )
>
> Reason for revert:
> speculative to see if it unblocks DEPS roll
>
> Original issue's description:
> > Make drawImage a virtual on SkDevice
> >
> > Now with patch for SkDeferredCanvas
> >
> > This reverts commit 119468b71f
.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/14fe8fd3e53b5e988aac189a8bc3ed28904d85c8
>
> TBR=robertphillips@google.com ,mtklein@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3538e3bfe2e00bc1b5b48d977fa7adff64d8c96b
TBR=robertphillips@google.com ,mtklein@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1126273002
2015-05-06 07:54:38 -07:00
mtklein
7882924c10
DM: add Via abstract class
...
BUG=skia:
Review URL: https://codereview.chromium.org/1117183007
2015-05-06 07:54:07 -07:00
mtklein
0d992db1cf
Make SkFunction copyable so it can go in containers.
...
This totally overhauls the implementation to use ordinary inheritance-based type erasure. I give up for now getting my manual vtable shenanigans to work with MSVC. Still those same "expected ; before ), also expected ) before ;" errors.
I added support for uninitialized SkFunctions and operator=(), because it was fairly straightforward with this implementation.
The main downside here is that I've removed the inline implementation. All SkFunctions involve a heap allocation, even when just wrapping function pointers.
BUG=skia:
Review URL: https://codereview.chromium.org/1056673002
2015-05-06 07:40:26 -07:00
joshualitt
444987fea8
small fix to correct bounds on distance field text
...
BUG=skia:
Review URL: https://codereview.chromium.org/1122253003
2015-05-06 06:46:01 -07:00
robertphillips
84b008873b
Add GrAAConvexTessellator class
...
This CL adds a GrAAConvexTessellator class. It does not connect it to the GrAAConvexPathRenderer.
Review URL: https://codereview.chromium.org/1084943003
2015-05-06 05:15:57 -07:00
robertphillips
91d06bcc6c
Reduce the API surface of GrBufferAllocPool and its derivatives
...
This utility class is going to be revamped and moved. This CL shrinks it a bit so there will be less to shuffle around.
Review URL: https://codereview.chromium.org/1126753003
2015-05-06 04:38:36 -07:00
reed
3538e3bfe2
Revert of Make drawImage a virtual on SkDevice (patchset #4 id:60001 of https://codereview.chromium.org/1122643005/ )
...
Reason for revert:
speculative to see if it unblocks DEPS roll
Original issue's description:
> Make drawImage a virtual on SkDevice
>
> Now with patch for SkDeferredCanvas
>
> This reverts commit 119468b71f
.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/14fe8fd3e53b5e988aac189a8bc3ed28904d85c8
TBR=robertphillips@google.com ,mtklein@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1124003002
2015-05-05 17:30:45 -07:00
joshualitt
d96a67bcb1
small cleanup in GrOvalRenderer
...
BUG=skia:
Review URL: https://codereview.chromium.org/1126723004
2015-05-05 14:09:05 -07:00
joshualitt
0c14bccc31
trivial fix for drawvertices bounds
...
BUG=skia:
Review URL: https://codereview.chromium.org/1127633003
2015-05-05 13:58:20 -07:00
bsalomon
301f989c65
Fix vertex/index buffer leaks
...
TBR=robertphillips@google.com
Review URL: https://codereview.chromium.org/1123823004
2015-05-05 13:20:09 -07:00
borenet
e3aeaec7dd
Add matrix configs to DM
...
BUG=skia:832
Review URL: https://codereview.chromium.org/1125793002
2015-05-05 13:11:27 -07:00
mtklein
d31c13d044
DM: add a Via to simulate SP pictures.
...
Will use this to test the other CL that adds small SkPicture implementations.
Not quite sure why patch_primitive doesn't draw the same in 8888 and sp-8888, but everything else does, so I'm not going to let that hold me back for now.
BUG=skia:
Review URL: https://codereview.chromium.org/1126613005
2015-05-05 12:59:56 -07:00
reed
14fe8fd3e5
Make drawImage a virtual on SkDevice
...
Now with patch for SkDeferredCanvas
This reverts commit 119468b71f
.
BUG=skia:
Review URL: https://codereview.chromium.org/1122643005
2015-05-05 12:54:33 -07:00
reed
beedb81a7f
add DeferredCanvas mode to SampleApp
...
BUG=skia:
Review URL: https://codereview.chromium.org/1129603002
2015-05-05 12:14:45 -07:00
joshualitt
af242958a5
create GrInOrderCommandBuilder
...
BUG=skia:
Review URL: https://codereview.chromium.org/1118403003
2015-05-05 11:55:39 -07:00
mtklein
a16e69ec6c
DM: add draw_to_canvas() to trim some boilerplate for Vias.
...
BUG=skia:
Review URL: https://codereview.chromium.org/1123743007
2015-05-05 11:38:45 -07:00
reed
d1290843c3
remove dead code behind BOOL_ONGETINFO
...
need this to land in chrome first https://codereview.chromium.org/1125573002
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1123473004
2015-05-05 11:36:02 -07:00
halcanary
002653e78c
SkPDF: Remove unused deprecated functions in SkPDFTypes
...
depends on:
http://crrev.com/1107923002
http://crrev.com/1103163002
http://crrev.com/1110533002
http://crrev.com/1107913002
http://crrev.com/1106163002
BUG=skia:3585
Review URL: https://codereview.chromium.org/1113583002
2015-05-05 11:28:55 -07:00
joshualitt
ad17cfc8c7
Move RectBatch to GrRect
...
BUG=skia:
Review URL: https://codereview.chromium.org/1127713002
2015-05-05 10:45:57 -07:00
mtklein
e4b19c4593
Add presubmit to run {dm,nanobench}_flags.py test
when changed.
...
BUG=skia:
Review URL: https://codereview.chromium.org/1129443005
2015-05-05 10:28:44 -07:00
halcanary
bf51cfdbd9
SkPDF: clean up uses of deprecated calls in SkPDFFont
...
BUG=skia:3585
Review URL: https://codereview.chromium.org/1110533002
2015-05-05 10:24:09 -07:00
bsalomon
cb8979d088
Move DrawInfo out from GrDrawTarget and rename to GrVertices.
...
Review URL: https://codereview.chromium.org/1124733004
2015-05-05 09:51:38 -07:00
joshualitt
e46760e8b2
Create GrCommandBuilder
...
BUG=skia:
Review URL: https://codereview.chromium.org/1113313003
2015-05-05 08:41:50 -07:00
borenet
f4e0857fe9
Blacklist tiles_rt-gpu gm imagefilterscropped on GalaxyS4
...
BUG=skia:3802
Review URL: https://codereview.chromium.org/1115303004
2015-05-05 08:28:23 -07:00
reed
06a22f618c
add deferred config to DM
...
BUG=skia:
Review URL: https://codereview.chromium.org/1113273006
2015-05-05 08:11:33 -07:00