Commit Graph

1384 Commits

Author SHA1 Message Date
Mike Klein
54378230f8 Reland "simplify disabling effect deserialization"
This reverts commit 34d7a163a4.

Reason for revert: ok now?

Original change's description:
> Revert "simplify disabling effect deserialization"
>
> This reverts commit 5bbf790b5b.
>
> Reason for revert: flutter GN needs some love
>
> Original change's description:
> > simplify disabling effect deserialization
> >
> > Switch to a simple #define instead of conditional build targets.
> >
> > No one changes skia_enable_effects or skia_enable_effects_imagefilters,
> > so we can merge all that together back into :skia.
> >
> > Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
> > Reviewed-on: https://skia-review.googlesource.com/c/169220
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > Commit-Queue: Mike Klein <mtklein@google.com>
>
> TBR=mtklein@google.com,kjlubick@google.com
>
> Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/169222
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,kjlubick@google.com

Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Release-Flutter_Android
Change-Id: I534346c3ef3561a871f1af6df976bfee0b48014a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/169640
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-08 14:26:52 +00:00
Mike Klein
8e12cc6dfe Reland "Revert "hide nested hinting enum""
This reverts commit f49563bf92.

Reason for revert: Google3 also.

Original change's description:
> Revert "Revert "hide nested hinting enum""
> 
> This reverts commit 6bd19df9fa.
> 
> Restores original CL, but adds guards for flutter.
> 
> Bug: skia:
> Change-Id: I380b4ea87d293355026d734249aa2b8c397da144
> Reviewed-on: https://skia-review.googlesource.com/c/169345
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I26a07555df56ce92e86b114ecf4ab64643e71ed1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/169441
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 23:56:24 +00:00
Mike Reed
f49563bf92 Revert "Revert "hide nested hinting enum""
This reverts commit 6bd19df9fa.

Restores original CL, but adds guards for flutter.

Bug: skia:
Change-Id: I380b4ea87d293355026d734249aa2b8c397da144
Reviewed-on: https://skia-review.googlesource.com/c/169345
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2018-11-07 22:47:53 +00:00
Mike Klein
34d7a163a4 Revert "simplify disabling effect deserialization"
This reverts commit 5bbf790b5b.

Reason for revert: flutter GN needs some love

Original change's description:
> simplify disabling effect deserialization
> 
> Switch to a simple #define instead of conditional build targets.
> 
> No one changes skia_enable_effects or skia_enable_effects_imagefilters,
> so we can merge all that together back into :skia.
> 
> Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
> Reviewed-on: https://skia-review.googlesource.com/c/169220
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,kjlubick@google.com

Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/169222
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 18:52:19 +00:00
Mike Klein
5bbf790b5b simplify disabling effect deserialization
Switch to a simple #define instead of conditional build targets.

No one changes skia_enable_effects or skia_enable_effects_imagefilters,
so we can merge all that together back into :skia.

Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
Reviewed-on: https://skia-review.googlesource.com/c/169220
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 18:20:23 +00:00
Mike Klein
62cc5f5817 move this define to be with its friends in flutter_defines.gni
I'd like to get to the point where the only Flutter-specific
configuration is defines, in flutter_defines.gni.

Change-Id: Idda141c4dcdb5f18275e29d2ab60bb73bf416d59
Reviewed-on: https://skia-review.googlesource.com/c/169102
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 15:56:55 +00:00
Mike Klein
e475f4ee69 remove -DSK_DISABLE_RENDER_TARGET_SORTING from Flutter
It doesn't do anything.

Change-Id: I569421c2ecb1226bd2701e6546f4826e4133a168
Reviewed-on: https://skia-review.googlesource.com/c/169101
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-11-07 15:06:18 +00:00
Mike Klein
a4c277b07f make float divide-by-zero fatal
Change-Id: I9ba1caa4862bdf9ffc9c0e637bd69cce91fd8468
Reviewed-on: https://skia-review.googlesource.com/c/168740
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-06 21:56:27 +00:00
Mike Klein
3674336c33 Reland "make enum santizer fatal"
This is a reland of 166dbd3135

Since last attempt,
   - update SkPath::Direction docs
   - kIllegal is not an advanced blend mode

Original change's description:
> make enum santizer fatal
>
> This enum sanitizer checks that all the values of the enum we use fall
> within the range of the enumerated values.
>
> The main thing this helps point out is that the size of enum types in
> C++ need only be large enough to hold the largest declared value; larger
> values are undefined.  In practice, most enums are implemented as ints
> for compatibility with C, so while this hasn't pointed out anything
> egregiously broken, the sanitizer has found a couple possibly dangerous
> situations in our codebase.
>
> For most types using values outside the enum range, we can just
> explicitly size them to int.  This makes their de facto size de jure.
>
> But we need to actually make GrBlendEquation and GrBlendCoeff not store
> values outside their enumerated range.  They're packed into bitfields
> that really can't represent those (negative) values.  So for these I've
> added new kIllegal values to the enums, forcing us to deal with our
> once-silent illegal values a bit more explicitly.
>
> Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
> Reviewed-on: https://skia-review.googlesource.com/c/168484
> Reviewed-by: Brian Osman <brianosman@google.com>

Cq-Include-Trybots: skia.primary:Housekeeper-PerCommit-Bookmaker,Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Debug-All-Android
Change-Id: Id93b80bbeae11872542c9b76715e3c3cb10609fd
Reviewed-on: https://skia-review.googlesource.com/c/168582
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-06 17:31:00 +00:00
Mike Klein
f2b35e4fb8 Revert "make enum santizer fatal"
This reverts commit 166dbd3135.

Reason for revert: illegal is not advanced, docs

Original change's description:
> make enum santizer fatal
> 
> This enum sanitizer checks that all the values of the enum we use fall
> within the range of the enumerated values.
> 
> The main thing this helps point out is that the size of enum types in
> C++ need only be large enough to hold the largest declared value; larger
> values are undefined.  In practice, most enums are implemented as ints
> for compatibility with C, so while this hasn't pointed out anything
> egregiously broken, the sanitizer has found a couple possibly dangerous
> situations in our codebase.
> 
> For most types using values outside the enum range, we can just
> explicitly size them to int.  This makes their de facto size de jure.
> 
> But we need to actually make GrBlendEquation and GrBlendCoeff not store
> values outside their enumerated range.  They're packed into bitfields
> that really can't represent those (negative) values.  So for these I've
> added new kIllegal values to the enums, forcing us to deal with our
> once-silent illegal values a bit more explicitly.
> 
> Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
> Reviewed-on: https://skia-review.googlesource.com/c/168484
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com

Change-Id: I691c08092340a6273e442c0f098b844f7d0363ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/168581
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-06 16:30:19 +00:00
Mike Klein
166dbd3135 make enum santizer fatal
This enum sanitizer checks that all the values of the enum we use fall
within the range of the enumerated values.

The main thing this helps point out is that the size of enum types in
C++ need only be large enough to hold the largest declared value; larger
values are undefined.  In practice, most enums are implemented as ints
for compatibility with C, so while this hasn't pointed out anything
egregiously broken, the sanitizer has found a couple possibly dangerous
situations in our codebase.

For most types using values outside the enum range, we can just
explicitly size them to int.  This makes their de facto size de jure.

But we need to actually make GrBlendEquation and GrBlendCoeff not store
values outside their enumerated range.  They're packed into bitfields
that really can't represent those (negative) values.  So for these I've
added new kIllegal values to the enums, forcing us to deal with our
once-silent illegal values a bit more explicitly.

Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
Reviewed-on: https://skia-review.googlesource.com/c/168484
Reviewed-by: Brian Osman <brianosman@google.com>
2018-11-06 15:39:50 +00:00
Mike Reed
534e776511 add pathops bench for simplify
Bug: skia:
Change-Id: Ic4aa213d5cb394f47e07cc19a5da89f7389a7c1f
Reviewed-on: https://skia-review.googlesource.com/c/163224
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Allan MacKinnon <allanmac@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-11-05 13:15:21 +00:00
Mike Klein
c9eace8194 add unpremul gm
Change-Id: I3126fb8b055b58e45f1bd0d913413b4d4d38f032
Reviewed-on: https://skia-review.googlesource.com/c/166740
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-31 15:41:30 +00:00
Kevin Lubick
d969932474 Refactor Nima code
There were two copies of a Nima "player" and this moves them out of
samplecode/ and viewer/ to experimental/ where it is a bit more
accessible (e.g. for WebAssembly).

Bug: skia:
Change-Id: I05419a352f0d13d16b462a374578107513eb1243
Reviewed-on: https://skia-review.googlesource.com/c/166441
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-30 19:32:52 +00:00
Jim Van Verth
e24b587a00 Replace use of SkYUVSizeInfo with SkYUVASizeInfo
Bug: skia:7903
Change-Id: If5acd50711ed8bd4a49efcb93db66fd3d14c8992
Reviewed-on: https://skia-review.googlesource.com/c/164681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-10-30 15:00:34 +00:00
Herb Derby
ab18c8e6cc Move files in GN
Change-Id: I9873a1fb6e72cc0d567bb994b11c1af493ad3dd4
Reviewed-on: https://skia-review.googlesource.com/c/165901
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-29 17:43:18 +00:00
Michael Ludwig
460eb5e746 Reland "Extract per-edge quad vertex tesselation code into reusable interface"
This is a reland of fc3784bd6c

Original change's description:
> Extract per-edge quad vertex tesselation code into reusable interface
> 
> This moves the vertex templates and the edge outset/tessellation code into a new GrPerEdgeAAQuadHelper h/cpp file. The vertex template hierarchy has been expanded to include an optional local coordinate type: void, SkPoint, or SkPoint3. The texture op only uses SkPoint for its local coordinates but the regular rect op will need void and SkPoint3 as well.
> 
> A large part of the added code is providing the tessellation specializations for those new local coordinate types.
> 
> Bug: skia:
> Change-Id: Id8cf2a17342f30b299b16be95e341d4991951c38
> Reviewed-on: https://skia-review.googlesource.com/c/164611
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:
Change-Id: I9cf9fe2e3ccdacc396290b39f839e790a117fa8c
Reviewed-on: https://skia-review.googlesource.com/c/165781
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-10-29 16:11:27 +00:00
Brian Osman
ff78aaa431 Revert "Extract per-edge quad vertex tesselation code into reusable interface"
This reverts commit fc3784bd6c.

Reason for revert: persp_images gold images look bad.

Original change's description:
> Extract per-edge quad vertex tesselation code into reusable interface
> 
> This moves the vertex templates and the edge outset/tessellation code into a new GrPerEdgeAAQuadHelper h/cpp file. The vertex template hierarchy has been expanded to include an optional local coordinate type: void, SkPoint, or SkPoint3. The texture op only uses SkPoint for its local coordinates but the regular rect op will need void and SkPoint3 as well.
> 
> A large part of the added code is providing the tessellation specializations for those new local coordinate types.
> 
> Bug: skia:
> Change-Id: Id8cf2a17342f30b299b16be95e341d4991951c38
> Reviewed-on: https://skia-review.googlesource.com/c/164611
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,rmistry@google.com,brianosman@google.com,michaelludwig@google.com

Change-Id: I6d7b1b46a98d8c5ab7b159439b861d5d4dfcb58d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/165661
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-27 13:02:42 +00:00
Mike Klein
ca4756a368 remove RP bench
Originally I wanted to get it away from using from_srgb/to_srgb
directly, but in the end I just don't care about any of it.

Change-Id: I7ed39a92840f02c98bfe97203bef64057ee0413e
Reviewed-on: https://skia-review.googlesource.com/c/165440
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-26 17:14:31 +00:00
Michael Ludwig
fc3784bd6c Extract per-edge quad vertex tesselation code into reusable interface
This moves the vertex templates and the edge outset/tessellation code into a new GrPerEdgeAAQuadHelper h/cpp file. The vertex template hierarchy has been expanded to include an optional local coordinate type: void, SkPoint, or SkPoint3. The texture op only uses SkPoint for its local coordinates but the regular rect op will need void and SkPoint3 as well.

A large part of the added code is providing the tessellation specializations for those new local coordinate types.

Bug: skia:
Change-Id: Id8cf2a17342f30b299b16be95e341d4991951c38
Reviewed-on: https://skia-review.googlesource.com/c/164611
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-26 16:31:56 +00:00
Mike Klein
d99bd00b24 move unspecialized routines out of SkOpts
No src/opts/SkOpts_foo.cpp ever replaces these function pointers with
a specialized version, so there's no value to the indirection.

I kind of want to rewrite most of this, but I've not done that here.
It's all just the same code moved around.

Change-Id: Iecb81a64aff3e9ed18c1a3c6d2eb1a6e94e966de
Reviewed-on: https://skia-review.googlesource.com/c/165400
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-26 15:44:49 +00:00
Mike Reed
331ccfd8e4 add textutils
These are meant to enable several things (eventually)

- fission Align off of paint
- fission TextEncoding off of paint
- fission SkFont of of paint

The first one is explicitly enabled here. The others will (I plan) follow later.

The final state of the world (the goal)
- paint has no font-ish parameters (no typeface or size)
- font has no paint-ish parameters (no aa or lcd)
- neither has alignment or encoding

Bug: skia:8493, skia:8501
Change-Id: I5fcb945b6bcab30ef5e7019dfccb682661f56230
Reviewed-on: https://skia-review.googlesource.com/c/165061
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-25 17:50:20 +00:00
Mike Klein
a6c3517e76 stub SkReadBuffer when SK_DISABLE_READBUFFER
This seems like a way to disable SkReadBuffer that won't
require other preprocessor checks in the various effects.

Disable SkReadBuffer in Flutter too, for about 20K.

Change-Id: I87039b67d90ad372a21940d7e96fc46bf5114bfd
Reviewed-on: https://skia-review.googlesource.com/c/165021
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-25 16:45:40 +00:00
Mike Klein
b11ab578ad remove src/jumper
The distinction between SkJumper and SkRasterPipeline used
to be important, but it's no longer.  This CL moves everything
under src/jumper to the appropriate SkRasterPipeline file.

Change-Id: I1181fffafccb3dc4c4eb5f33b442c719ee370462
Reviewed-on: https://skia-review.googlesource.com/c/164627
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-24 11:15:58 +00:00
Hal Canary
f952073c11 SkFiddle sees SkFont.h
Change-Id: I725f8ae52411c39c7df54bfeb4be2ffa25429493
Reviewed-on: https://skia-review.googlesource.com/c/164613
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-23 18:37:19 +00:00
Pirama Arumuga Nainar
a4d700d74b Add back -Wover-align
Android's Clang now correctly handles the default alignment for
new/malloc.  The flag is still set in BUILD.gn since outside of an
Android tree, we don't have control over the Clang used to build Skia.

Bug: skia:
Change-Id: Ifc71c033c18232a3b0d2faed6f1ecb7eee8b364e
Reviewed-on: https://skia-review.googlesource.com/c/163647
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-23 17:26:08 +00:00
Mike Reed
c88cc779ef remove (unused) vertical-text
Bug: skia:8487
Change-Id: Ia6715346a0214b0db2fc67294e45b5e04c1c24d8
Reviewed-on: https://skia-review.googlesource.com/c/163889
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-10-23 16:33:02 +00:00
Cary Clark
b46c4d0925 remove extra include
a duplicate include messes up msvs sometimes

R=egdaniel@google.com

Bug: skia:
Change-Id: I3f16c4896064e00213aaf640575c694d1c59a462
Reviewed-on: https://skia-review.googlesource.com/c/164603
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-10-23 15:32:56 +00:00
Mike Klein
f2526331b4 move SFDot6 inverse table into SkAnalyticEdge
The 8K table in SkFDot6Constants.cpp is only used by SkAnalyticEdge and
its unit test, so to help LTO trim this when SkAnalyticEdge isn't used,
move it to SkAnalyticEdge.cpp and delete the unit test.  (I suspect the
table is never going to change.)

I've also moved setLine() out-of-line into SkAnalyticEdge.cpp to make
this work, and done a little bit of refactoring and renaming.

Change-Id: If1d234f387d100dd58d8860dccac000e5493a2c1
Reviewed-on: https://skia-review.googlesource.com/c/164182
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-22 15:22:55 +00:00
Mike Klein
3c9fbae23c cut out the rest of blend modes in flutter
SkXfermode_opts.h is moot when SK_FORCE_RASTER_PIPELINE_BLITTER is
defined.  There are a couple other blitters and routines and things
that are also just there for 565/8888 performance, so I think we
can just turn on SK_FORCE_RASTER_PIPELINE_BLITTER and start guarding
the rest of them similarly.

Looks like maybe cuts another 13K?

Change-Id: Ib3894b07da649a93e93b6a4cb7686772a57b6def
Reviewed-on: https://skia-review.googlesource.com/c/164181
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-22 14:46:28 +00:00
Mike Klein
4c683fce8f remove unused SkReadBuffer features
No need to keep the list of all those old unsupported version tags.

Everything related to SkDeduper.h was dead code.

fMemoryPtr was just an always null pointer.

SkReadBuffer::clone() doesn't do anything interesting.

DEBUG_NON_DETERMINISTIC_ASSERT doesn't do anything at all.

The whole custom factory feature was unused except by its unit test
and one other, which was using it to avoid a race to register those
types as deserializable.  I think some good old fashioned static
initialization can come to our rescue here...

Change-Id: Ie99dc957fc1035886bb55eaa3fc3339e73f9c320
Reviewed-on: https://skia-review.googlesource.com/c/163984
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-20 12:05:58 +00:00
Greg Daniel
64cc9aaaf1 Add drawDrawable support to GrRenderTargetContext.
This also includes adding drawable Op and plumbing it through to the GPU.

BUG=skia:

Change-Id: I0b2464c5a458c2fbf05b9528e47b9e6e3ac27d57
Reviewed-on: https://skia-review.googlesource.com/c/9645
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-10-19 19:48:03 +00:00
Greg Daniel
9ed1a2cd71 Add ability for an SkDevice to handle the drawing of an SkDrawable.
If supported, an Sk*Device can take charge of handling of an SkDrawable.
The specific use case right now will be to use this to execute Vulkan
specific SkDrawable's that need to know information about our Vulkan state
and objects at the time the SkDrawable is executed. If a device does not
support the SkDrawable we fall back to the cavans version like we did
previously.

BUG=skia:

Change-Id: I821fa600a80ff645412f296be36990ef390ae0a9
Reviewed-on: https://skia-review.googlesource.com/c/7740
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-19 15:21:54 +00:00
Mike Klein
2ba047972a split out effect deserialization, disable in flutter
I think this ought to cut out a bunch of effects in Flutter,
provided they're not looking to deserialize .skps.

Serialization should still work.

Size ought to drop from ~1346880 to 1265506.

Change-Id: I2cd5d7c9b2e890cbe91b02cd00868872f033de5c
Reviewed-on: https://skia-review.googlesource.com/c/163441
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-18 18:54:05 +00:00
Jim Van Verth
8f11e43f8b Reland: Widen internal API to support more complex YUV formats
Bug: skia:7901
Change-Id: Ic83e9f0c2a493335671fe431ffba6f649812d406
Reviewed-on: https://skia-review.googlesource.com/c/163481
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-18 18:44:26 +00:00
Jim Van Verth
f99a67403a Revert "Widen internal API to support more complex YUV formats"
This reverts commit 0c583af06d.

Reason for revert: DDL is failing

Original change's description:
> Widen internal API to support more complex YUV formats
> 
> Bug: skia:7901
> Change-Id: I46fec08711b8b483cf58ccae733e4dc2a9689231
> Reviewed-on: https://skia-review.googlesource.com/c/162280
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com

Change-Id: Ibe3dd7abbce4a3b6afe74c565198dadc61a9f439
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7901
Reviewed-on: https://skia-review.googlesource.com/c/163257
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-10-18 16:13:28 +00:00
Jim Van Verth
0c583af06d Widen internal API to support more complex YUV formats
Bug: skia:7901
Change-Id: I46fec08711b8b483cf58ccae733e4dc2a9689231
Reviewed-on: https://skia-review.googlesource.com/c/162280
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-18 15:10:39 +00:00
Kevin Lubick
32dfdbe1af [canvaskit] Slice out SkPicture
Removes about 120k uncompressed, 40k gzipped

Bug: skia:
Change-Id: I7e0b404f18fc3c6d4ff6b01d2c9bcd657b7d5e07
Reviewed-on: https://skia-review.googlesource.com/c/163246
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-18 14:15:47 +00:00
Nigel Tao
c96bf2f643 Rename EncoderBench.cpp to EncodeBench.cpp
Dropping the "r" makes it consistent with both the class name and
Benchmark::getName.

Bug: skia:
Change-Id: I17bcf699d162c678daabf92b4e39b7230428b98b
Reviewed-on: https://skia-review.googlesource.com/c/163280
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-17 23:26:37 +00:00
Mike Klein
89e2f3c873 disable legacy shaders in flutter
All of Flutter's non-test drawing is done with Ganesh,
and the few shaders that are legacy-only are not used by Flutter.

This should cut a bunch of essentially-dead code from Flutter, though
some of the Flutter test images may change because those test images are
software rasterized.  Hopefully nothing should look terribly different.

Looks like this cuts ~27K from Flutter.

Change-Id: I4c8078db17fe9d24b15ed9d8c6adb528a382f02a
Reviewed-on: https://skia-review.googlesource.com/c/163165
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-17 18:50:38 +00:00
Ethan Nicholas
eace935298 Revert "converted AARectEffect to new FP system"
This reverts commit 222e275b0a.

Reason for revert: perf regression

Original change's description:
> converted AARectEffect to new FP system
> 
> Bug: skia:
> Change-Id: I0e4141c7f547bab92c65a6abff120ed04d5c2c66
> Reviewed-on: https://skia-review.googlesource.com/c/153550
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: I3d7036a78d8582d6790c77b20a60e6e5257d1881
Reviewed-on: https://skia-review.googlesource.com/c/162283
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-10-15 20:43:26 +00:00
Mike Klein
921ec97655 another NVPR-only op
Change-Id: If29580a039aaafcd8bc8392325e4035e708a3129
Reviewed-on: https://skia-review.googlesource.com/c/162201
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-15 18:53:27 +00:00
Mike Klein
26a6049beb Flutter also won't need NVPR.
The intersection of devices that Flutter targets
and devices that support NVPR is very slim.

Change-Id: Idcb1278df4895ed253a4c0eb6044c4cc53c68cb8
Reviewed-on: https://skia-review.googlesource.com/c/162100
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-15 15:34:21 +00:00
Mike Reed
a5abc7aac1 removed unused LEGACY_VULKAN_INTERFACE
Bug: skia:
Change-Id: I8916b541ececb902b23cfbe2577a54247038b314
Reviewed-on: https://skia-review.googlesource.com/c/162027
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-10-15 14:46:57 +00:00
Kevin Lubick
4bf2c26b93 Remove nvpr from CanvasKit
Saves about 20k uncompressed, 7k compressed.

Bug: skia:
Change-Id: I060c58380f3e3266bca9028ba5ba6aa17ce178dc
Reviewed-on: https://skia-review.googlesource.com/c/161942
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-10-15 14:11:29 +00:00
Ethan Nicholas
222e275b0a converted AARectEffect to new FP system
Bug: skia:
Change-Id: I0e4141c7f547bab92c65a6abff120ed04d5c2c66
Reviewed-on: https://skia-review.googlesource.com/c/153550
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-10-12 18:54:54 +00:00
Mike Klein
36528e91c2 clean up SkPipe
One less SkCanvas subclass to deal with...

Change-Id: I21e81648026be5d732e8d9a28baed55015492a04
Reviewed-on: https://skia-review.googlesource.com/c/161584
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-12 16:50:21 +00:00
Mike Klein
419709dbb1 disable lowp raster pipeline stages in Flutter
Flutter barely needs the float stages, and
probably doesn't care at all about these.

Change-Id: I663e5496f4f9a6c689c1ef0137b2318177fb3760
Reviewed-on: https://skia-review.googlesource.com/c/161582
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-10-12 16:10:01 +00:00
Brian Salomon
d7065e72da Revert "Revert "Add experimental API to draw a set of SkImages in one SkCanvas call.""
This reverts commit 8d5b41b553.

Bug: skia:8444
Change-Id: I29b52c6fe9475c6113ec954b7918cf591111846c
Reviewed-on: https://skia-review.googlesource.com/c/161627
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-12 16:09:21 +00:00
Brian Salomon
8d5b41b553 Revert "Add experimental API to draw a set of SkImages in one SkCanvas call."
This reverts commit 0a0304c426.

Reason for revert: Breaking metal

Original change's description:
> Add experimental API to draw a set of SkImages in one SkCanvas call.
> 
> The client provides a src and dst rect for each image as well as
> a bitfield that indicates whether each edge of the image should be
> antialiased. This per-edge AA is useful for tiled compositors.
> 
> Rather than take a full SkPaint this API only takes an alpha, a filter
> quality (which is pinned to kLow), and a blend mode. This is a likely
> point of future evolution.
> 
> Currently the API is only fully implemented for kSrcOver on the GPU
> backend. With other blend modes or on other backends AA will be ignored
> for images that do not have all four edge AA flags set.
> 
> BUG: skia:8444
> 
> Change-Id: I143998dda8ad6a25f64e18cd600392ba553030ac
> Reviewed-on: https://skia-review.googlesource.com/c/159062
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com,reed@google.com

Change-Id: I815baaeee5de9c6722cf2b9d071a8e2f7c1b6a96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/161622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-12 14:25:06 +00:00