Commit Graph

8848 Commits

Author SHA1 Message Date
Brian Osman
76aed1ebe1 Add GrColor4h (half-float), for use in Ops and (eventually) vertices
To keep things sane, move SkNx and SkHalf to include/private

Bug: skia:
Change-Id: Iaee8c3f92a2720bf97583c3f326486d4ce462e8b
Reviewed-on: https://skia-review.googlesource.com/c/165344
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-29 15:11:51 +00:00
Mike Reed
7d7c68339d add helpers to SkFont (and SkTypeface)
Bug: skia:2664
Change-Id: I215c951ae2d46fa7ee0ccbff490375fc60694100
Reviewed-on: https://skia-review.googlesource.com/c/165780
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2018-10-29 15:06:45 +00:00
Mike Reed
6e24cd3e28 Reland "hide setTextAlign"
This reverts commit f10ea21088.

Reason for revert: flag added for google3

Original change's description:
> Revert "hide setTextAlign"
> 
> This reverts commit 43c718302e.
> 
> Reason for revert: Google 3 roll.
> 
> Original change's description:
> > hide setTextAlign
> > 
> > Bug: skia:8493
> > Change-Id: Ib3347f600300e90d5bcc47910fd75244039a016c
> > Reviewed-on: https://skia-review.googlesource.com/c/164697
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> 
> TBR=djsollen@google.com,bungeman@google.com,herb@google.com,fmalita@chromium.org,reed@google.com
> 
> Change-Id: I877bf993e71a6e81f1322c799c533bfea6c5813f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8493
> Reviewed-on: https://skia-review.googlesource.com/c/165660
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,brianosman@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I0f224cd560cea12ddac3cd48d244f85ccd943086
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8493
Reviewed-on: https://skia-review.googlesource.com/c/165681
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-27 14:39:05 +00:00
Brian Osman
f10ea21088 Revert "hide setTextAlign"
This reverts commit 43c718302e.

Reason for revert: Google 3 roll.

Original change's description:
> hide setTextAlign
> 
> Bug: skia:8493
> Change-Id: Ib3347f600300e90d5bcc47910fd75244039a016c
> Reviewed-on: https://skia-review.googlesource.com/c/164697
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I877bf993e71a6e81f1322c799c533bfea6c5813f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8493
Reviewed-on: https://skia-review.googlesource.com/c/165660
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-27 12:59:53 +00:00
Mike Reed
43c718302e hide setTextAlign
Bug: skia:8493
Change-Id: Ib3347f600300e90d5bcc47910fd75244039a016c
Reviewed-on: https://skia-review.googlesource.com/c/164697
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-10-27 00:37:29 +00:00
Brian Osman
3b79aa3a5a On second thought, remove GrColor4s
We're going to use half-floats, which are far more future-proof.

Bug: skia:
Change-Id: I6e098017381256d6e750ac546c353072802282cb
Reviewed-on: https://skia-review.googlesource.com/c/165522
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-26 19:29:50 +00:00
Chris Dalton
a944142412 ccpr: Unregister path listeners when their cache entries are evicted
Bug: skia:8452
Change-Id: Ibd49d8f0ed15c568156c09db358eba0415df48f5
Reviewed-on: https://skia-review.googlesource.com/c/165120
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-10-26 16:07:55 +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
Brian Osman
4f598e8c82 GrColor4s, a fixed-point signed short type for wide color vertices
Bug: skia:
Change-Id: I91b9816aae74726762c123d9f3454c5961382b7b
Reviewed-on: https://skia-review.googlesource.com/c/164680
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-24 18:21:16 +00:00
Mike Reed
c157c0a5a6 more setters for SkFont
Bug: skia:2664
Change-Id: Id5a09f8fd6bba99f77b508aed58147b34c02dbb2
Reviewed-on: https://skia-review.googlesource.com/c/164694
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-24 18:14:56 +00:00
Jim Van Verth
f9f073553c Reland "Some more clean-up of YUVA code"
This is a reland of c96740729a

Original change's description:
> Some more clean-up of YUVA code
> 
> * Restore pre-colortype interface
> * Remove other colortype references
> 
> Bug: skia:7903
> Change-Id: I0db6d61e78d719ff941ac195bcbed4416f7d3138
> Reviewed-on: https://skia-review.googlesource.com/c/164610
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:7903
Change-Id: Iae89ccfa370433663bddf74c14cd1a0e5e6b6d4b
Reviewed-on: https://skia-review.googlesource.com/c/164688
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-10-24 15:19:48 +00:00
Mike Reed
472639d9f1 add alignment and lcd to SkFont (for now)
... both of these should be removed eventually. See related bugs to 2664

Bug: skia:2664
Change-Id: I49cd78380d84e5383a2a2742fa4dda98cf3d0194
Reviewed-on: https://skia-review.googlesource.com/c/164689
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-10-24 15:01:46 +00:00
Brian Salomon
dc82994e3a Revert "Reland "Reland "Revert "Use OpenGL sampler objects when available.""""
This reverts commit 327955b1ba.

Bug: skia:8471
Change-Id: I56eb9509f0e2d5c4aa9e2a110a73a09723f77c4a
Reviewed-on: https://skia-review.googlesource.com/c/164617
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-24 12:43:42 +00:00
Mike Klein
70bd0b72f3 Revert "Some more clean-up of YUVA code"
This reverts commit c96740729a.

Reason for revert: looks like this broke a bunch of layout tests on the Chrome roll.

Original change's description:
> Some more clean-up of YUVA code
> 
> * Restore pre-colortype interface
> * Remove other colortype references
> 
> Bug: skia:7903
> Change-Id: I0db6d61e78d719ff941ac195bcbed4416f7d3138
> Reviewed-on: https://skia-review.googlesource.com/c/164610
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic04955ad526774080dad79852a974b1b3743dfe0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7903
Reviewed-on: https://skia-review.googlesource.com/c/164683
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-24 06:52:38 +00:00
Jim Van Verth
c96740729a Some more clean-up of YUVA code
* Restore pre-colortype interface
* Remove other colortype references

Bug: skia:7903
Change-Id: I0db6d61e78d719ff941ac195bcbed4416f7d3138
Reviewed-on: https://skia-review.googlesource.com/c/164610
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-23 21:58:21 +00:00
Mike Reed
168801407b remove vert methods (no callers)
Bug: skia:
Change-Id: I24026c24608aecd9877bd3057f972280a6787230
Reviewed-on: https://skia-review.googlesource.com/c/164615
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-23 20:21:09 +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
Mike Reed
fe4fc14854 Change SkFont to match needs of textblob
Tentative roadmap:
- land this
- extend TextBlobBuilder to take SkFont for its runs (eventually removing paint option)
- change SkTextBlob to store SkFont instead of SkRunFont (not critical, but makes sense)

After the above, (or during) also work towards:
- removing callers of SkPaint set... (textsize, textscalex, typeface, etc.)
- eventually physically remove those setters/getters/fields
- rev as desired the SkFont API to clean up flags, hinting, etc.

Bug: skia:2664
Change-Id: I0e323c58aef055e26d697911b078797453cb3626
Reviewed-on: https://skia-review.googlesource.com/c/163783
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-10-22 18:48:19 +00:00
Jim Van Verth
b7f0b9cd5c Remove use of colorTypes from SkYUVSizeInfo
Bug: skia:7903
Change-Id: I7301d943b679a4670511b6cf60c594baf615834a
Reviewed-on: https://skia-review.googlesource.com/c/164261
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-22 18:45:33 +00:00
Brian Salomon
327955b1ba Reland "Reland "Revert "Use OpenGL sampler objects when available."""
This reverts commit bfb3df4cc0.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Reland "Revert "Use OpenGL sampler objects when available."""
> 
> This reverts commit bffe4ed34b.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Reland "Revert "Use OpenGL sampler objects when available.""
> >
> > This reverts commit d46987bb74.
> >
> > Reason for revert: breaking asan bot in chrome roll
> >
> > Original change's description:
> > > Revert "Revert "Use OpenGL sampler objects when available.""
> > >
> > > Put setting GL min/max texture lod behind caps check.
> > >
> > > Bug: skia:8471
> > >
> > >
> > > This reverts commit 1bccae517a.
> > >
> > > Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
> > > Reviewed-on: https://skia-review.googlesource.com/c/163782
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Brian Salomon <bsalomon@google.com>
> >
> > TBR=bsalomon@google.com
> >
> > Change-Id: I8e3a0daea12659721d95967ef94c87f856e21948
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:8471
> > Reviewed-on: https://skia-review.googlesource.com/c/163887
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ia35bb7ad13527ffbd04173b517f7399e4a486ff1
> Bug: skia:8471
> Reviewed-on: https://skia-review.googlesource.com/c/163891
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ie49071bef7f7c20f0b116cd3a7abfda84728de12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/164241
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-22 15:39:26 +00:00
Brian Salomon
bfb3df4cc0 Revert "Reland "Revert "Use OpenGL sampler objects when available."""
This reverts commit bffe4ed34b.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Revert "Use OpenGL sampler objects when available.""
>
> This reverts commit d46987bb74.
>
> Reason for revert: breaking asan bot in chrome roll
>
> Original change's description:
> > Revert "Revert "Use OpenGL sampler objects when available.""
> >
> > Put setting GL min/max texture lod behind caps check.
> >
> > Bug: skia:8471
> >
> >
> > This reverts commit 1bccae517a.
> >
> > Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
> > Reviewed-on: https://skia-review.googlesource.com/c/163782
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com
>
> Change-Id: I8e3a0daea12659721d95967ef94c87f856e21948
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8471
> Reviewed-on: https://skia-review.googlesource.com/c/163887
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ia35bb7ad13527ffbd04173b517f7399e4a486ff1
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/163891
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-10-22 14:12:21 +00:00
Mike Klein
fa5f6ce872 rename some flattenable routines
Initialize felt a little too nebulous, and I think
the verb for "define registrar entry" is "register".

Change-Id: I52f2eb5df5acd46a8b38bb9ea9bb07f4ac8f3789
Reviewed-on: https://skia-review.googlesource.com/c/163990
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-20 14:08:32 +00:00
Mike Klein
6ed2a38a16 move all registration into optional hooks
I don't think there's any reason to register any of these types
for deserialization unless the client is using deserialization.

Change-Id: Iea02670f3b6e99851061ac4ec784a6f372a5903b
Reviewed-on: https://skia-review.googlesource.com/c/163988
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-20 13:13:39 +00:00
Mike Klein
a3d4099b86 small tweaks to SkFlattenable::Register
The NameToType() function and type argument passed to Register are never
used, so remove them.

While we're at it, switch the stragglers over to use the
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY macro.  The only remaining direct
calls to Register are for legacy effect names, to be deleted in another
CL.

Change-Id: Ia304f960360a6f55b25f6e4eb2aa45533ee13476
Reviewed-on: https://skia-review.googlesource.com/c/163987
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-20 12:30:58 +00:00
Herb Derby
b9998cdcee Remove unused methods from SkTDArray
Change-Id: I41a78866187c5eff6a093f45bcbce311535d6798
Reviewed-on: https://skia-review.googlesource.com/c/163982
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-10-19 21:29:08 +00:00
Brian Osman
41ba826ad7 (Almost) no one needs to know about SkPixelRef
Bug: skia:
Change-Id: I5c0304cf75f938b20720eaffd2349036da965190
Reviewed-on: https://skia-review.googlesource.com/c/163890
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-19 19:31:37 +00:00
Mike Klein
4fee323522 override getTypeName() instead of using table
This should let getTypeName() and serialization work even
when deserialization factories haven't been registered.

I've made getTypeName() pure virtual like getFactory(),
and moved all the overrides into SK_FLATTENABLE_HOOKS,
cleaning up all the various ways we've done it before.

All the subclasses override getTypeName() and getFactory()
privately, so there should be no need to document them?

Change-Id: I723cb20099d250c2f2a10be266e3aacc6a061937
Reviewed-on: https://skia-review.googlesource.com/c/163543
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-19 18:07:04 +00:00
Greg Daniel
bffe4ed34b Reland "Revert "Use OpenGL sampler objects when available.""
This reverts commit d46987bb74.

Reason for revert: breaking asan bot in chrome roll

Original change's description:
> Revert "Revert "Use OpenGL sampler objects when available.""
> 
> Put setting GL min/max texture lod behind caps check.
> 
> Bug: skia:8471
> 
> 
> This reverts commit 1bccae517a.
> 
> Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
> Reviewed-on: https://skia-review.googlesource.com/c/163782
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I8e3a0daea12659721d95967ef94c87f856e21948
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/163887
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-19 17:58:47 +00:00
Hal Canary
da7a5679ca SkTArray: behave a little more like std::vector
Change-Id: Ia29b5dbda707bfd993cc40396a7fc2127d7f1952
Reviewed-on: https://skia-review.googlesource.com/c/163785
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-10-19 16:41:51 +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
Greg Daniel
eb772c0869 Revert "ccpr: Unregister path listeners when their cache entries are evicted"
This reverts commit f30e49310f.

Reason for revert: Slow down on skps across multiple bots and configs

Original change's description:
> ccpr: Unregister path listeners when their cache entries are evicted
> 
> Bug: skia:8452
> Change-Id: I5cf63c07481db38fc37e920e04ca140bad8966e4
> Reviewed-on: https://skia-review.googlesource.com/c/163560
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com

Change-Id: I1f9859a02d9c78e4a83e68c6b26fd8d3badd2d8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8452
Reviewed-on: https://skia-review.googlesource.com/c/163787
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-19 15:00:18 +00:00
Brian Salomon
d46987bb74 Revert "Revert "Use OpenGL sampler objects when available.""
Put setting GL min/max texture lod behind caps check.

Bug: skia:8471


This reverts commit 1bccae517a.

Change-Id: I8b98df6578a678bbb8b283d8203621a992be4ede
Reviewed-on: https://skia-review.googlesource.com/c/163782
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-19 14:47:41 +00:00
Mike Klein
1bccae517a Revert "Use OpenGL sampler objects when available."
This reverts commit 0f7e55a818.

Reason for revert: Chrome roll, even alone (https://chromium-review.googlesource.com/c/chromium/src/+/1290785), maybe Android roll too?

Original change's description:
> Use OpenGL sampler objects when available.
> 
> Bug: skia:8471
> Change-Id: Ida3d08aa72772b8bbd08707048182bee5d27407c
> Reviewed-on: https://skia-review.googlesource.com/c/163123
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ieee6823e83b9992a7281806b5a9156cd91fb22b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/163780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-19 11:38:50 +00:00
Chris Dalton
f30e49310f ccpr: Unregister path listeners when their cache entries are evicted
Bug: skia:8452
Change-Id: I5cf63c07481db38fc37e920e04ca140bad8966e4
Reviewed-on: https://skia-review.googlesource.com/c/163560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-10-19 01:59:27 +00:00
Brian Salomon
0f7e55a818 Use OpenGL sampler objects when available.
Bug: skia:8471
Change-Id: Ida3d08aa72772b8bbd08707048182bee5d27407c
Reviewed-on: https://skia-review.googlesource.com/c/163123
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-19 01:38:56 +00:00
Chris Dalton
9a986cfd5f ccpr: Use SkMessageBus for thread-safe eviction of cache entries
Bug: skia:
Change-Id: I87725b95761deb689333315ce681a4968d98190a
Reviewed-on: https://skia-review.googlesource.com/c/163511
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-10-19 00:25:20 +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
Mike Reed
e92aae6b36 make legacy shadercontext optional
Current savings : 96K on intel mac

Breaks -- these subclass don't have a pipeline
- emboss
- perlinnoise

For now, shadercontext is still on -- clients must opt-out with SK_DISABLE_LEGACY_SHADERCONTEXT

Bug: skia:
Change-Id: Idd14cae4013e8de92f16b0707f8b8d43bb6d11dd
Reviewed-on: https://skia-review.googlesource.com/c/162362
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-17 17:19:26 +00:00
Mike Reed
6a388006f5 be consistent about int for incReserve
Bug: 883666
Change-Id: I4070c958ef9ac5891ea75a8ef349e3d362c97f54
Reviewed-on: https://skia-review.googlesource.com/c/162620
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-16 20:39:28 +00:00
Brian Osman
495993a5e3 Remove GrColor4f
All uses have been converted to SkPMColor4f (or similar).

Bug: skia:
Change-Id: I220bd5eaf6c35b17321c1e8bc92ace7ff92908c4
Reviewed-on: https://skia-review.googlesource.com/c/162749
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-16 20:37:58 +00:00
Brian Salomon
a2a94a4c59 Add GrGLInterface support for sampler objects and GrGLCaps detection.
BUGL skia:8471

Change-Id: If67dbbcdca2d3130f6e10720c052c55a3b16482f
Reviewed-on: https://skia-review.googlesource.com/c/162561
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-16 20:30:58 +00:00
Brian Osman
cb3d087e71 Remove all remaining GrColor4f (other than gradients)
This adds SkPMColor4f conversions to/from RGBA bytes (ie GrColor).
I had previously made some free functions that did the same thing.
I'm ambivalent about which option is nicer, but wanted to have one
method, so I converted everything to use the new versions.

Bug: skia:
Change-Id: I4194c44b5bd12228075fd1932a14cf31c8d6a3c1
Reviewed-on: https://skia-review.googlesource.com/c/162560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-16 19:45:53 +00:00
Brian Osman
82727ad0eb Add documentation to SkRGBA4f
Bug: skia:
Change-Id: I11109b35558630e60118653c9c72a976bc6e4650
Reviewed-on: https://skia-review.googlesource.com/c/159151
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-15 20:33:21 +00:00
Mike Reed
09bc78b18a remove unused isABitmap code
Waiting on CL to remove calls in Android.

Bug: skia:
Change-Id: I9672ec1602ee3953ab2baa4475f5cdf25e907163
Reviewed-on: https://skia-review.googlesource.com/c/162036
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2018-10-15 20:09:48 +00:00
Brian Salomon
0087c83a7c Make GrTextureOp disable filtering/aa in more cases.
Previously we didn't do this at all for multiple-texture ops.

Improve the test detecting when filtering can be disabled.

Make draw_image_set GM create tiles with pixel of overlap for correct
filtering.

Add draw_image_set_rect_to_rect to exercise filtering/aa disablement
in combination with tiling.

Makes SkGpuDevice filter out inverted src rects (as is done implicitly
in SkBaseDevice by relying on drawImageRect).

Puts GrTextureOp::fFilter in bitfield.

Change-Id: Iee96cb54d665877c7f4aee422a3a7af2b249b1d6
Reviewed-on: https://skia-review.googlesource.com/c/161641
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2018-10-15 19:28:05 +00:00
Herb Derby
ebde1ab518 Change 0 extraSize allocation behavior for SkArenaAlloc
Change the behavior from allocating only the memory needed for T.
to an exponential growth starting at 1024.

Change-Id: Id37e0fb9e269feebf669ebc73f9e26dcd0589452
Reviewed-on: https://skia-review.googlesource.com/c/162102
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-10-15 17:59:25 +00:00
Heather Miller
01815d76af Update Skia milestone to 72
No API changes
TBR=reed
NOTRY=TRUE

Bug: skia:
Change-Id: I1ffde14bc6ebf0cf3d89735f70fb9a385b35d167
Reviewed-on: https://skia-review.googlesource.com/c/161940
Commit-Queue: Heather Miller <hcm@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
2018-10-13 01:46:43 +00:00
Brian Osman
a9667fbb73 Revert "Tie mip map cache purging to Images, not Bitmaps/PixelRefs"
This reverts commit 11422c63d3.

Reason for revert: Perf regression

Original change's description:
> Tie mip map cache purging to Images, not Bitmaps/PixelRefs
> 
> We were potentially using different keys for lookup vs. add, because we
> were adding with a key based on the pixelRef, which may not have the
> same uniqueID as the originating image.
> 
> Bug: skia:
> Change-Id: Ib4d3d5ead9f5a574cf6d1920080bc9c4ae66c1d0
> Reviewed-on: https://skia-review.googlesource.com/c/161625
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I9bdce1c6b1d9bf13cc477d2e7f20f7cc0f204b2f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/161828
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-12 20:18:35 +00:00
Jim Van Verth
21bd60daa3 Connect up YUVA images for testing.
* Fixes isTextureBacked() for SkImage_GpuYUVA
* Hooks in SkImage_GpuYUVA::MakePromiseYUVATexture()
* Pass down plane texture sizes to MakePromiseYUVATexture()
* Move some other methods to SkImage_GpuBase.

Bug: skia:7901
Change-Id: I33d62c16b426abba5830f7168f9f8fd54a0cb093
Reviewed-on: https://skia-review.googlesource.com/c/161149
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-10-12 19:31:08 +00:00
Brian Salomon
7d94bb5d1a Skip visiting for allocator gathering in GrTextureOp when all proxies
are not recyclable.

Change-Id: I5ff9c48b3d7b37531a3f052bd5188a8afcacf3cb
Reviewed-on: https://skia-review.googlesource.com/c/161860
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-10-12 19:08:31 +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 Osman
11422c63d3 Tie mip map cache purging to Images, not Bitmaps/PixelRefs
We were potentially using different keys for lookup vs. add, because we
were adding with a key based on the pixelRef, which may not have the
same uniqueID as the originating image.

Bug: skia:
Change-Id: Ib4d3d5ead9f5a574cf6d1920080bc9c4ae66c1d0
Reviewed-on: https://skia-review.googlesource.com/c/161625
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-12 16:04:21 +00:00
Greg Daniel
6dd96080d5 Have old GrBackend name still available.
Bug: skia:
Change-Id: Ief77cb6df7b8762a45b30a4b9ca0e7644f830610
Reviewed-on: https://skia-review.googlesource.com/c/161623
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-12 15:19:39 +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
Greg Daniel
bdf12ad8d5 Move GrBackend enum to enum class.
Bug: skia:
Change-Id: I8add2470313549723be6720b543091c444d2eb4f
Reviewed-on: https://skia-review.googlesource.com/c/161680
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-12 14:01:58 +00:00
Brian Salomon
0a0304c426 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>
2018-10-12 13:14:24 +00:00
Mike Reed
a631669e50 Revert "Revert "remove unneeded flag SK_SUPPORT_LEGACY_RECTMAKELARGEST""
No clients set this flag

This reverts commit c6471ebc67.

Docs-Preview: https://skia.org/?cl=161151
Bug: skia:
Change-Id: I6100b9f26c588c68cde2172c021f6f3ebe71164f
Reviewed-on: https://skia-review.googlesource.com/c/161151
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-11 19:15:53 +00:00
Brian Osman
3ea317cb6f Remove checks that insist on kOpaque for some color types
For destinations, Premul vs. Unpremul is actually meaningful
for these color types - it determines whether or not we divide
through by alpha after blending. Opaqueness ought to just be
a performance hint, and only for sources.

Bug: skia:
Change-Id: I801a64316ec9c92642982cd2096f8bec9a7855f3
Reviewed-on: https://skia-review.googlesource.com/c/161423
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-11 15:30:55 +00:00
Brian Osman
9c37cd96e4 Revert "Fix image info checking for always-opaque color types"
This reverts commit 9835dd51b3.

Reason for revert: Chrome unit tests failing?

Original change's description:
> Fix image info checking for always-opaque color types
> 
> The old code overlooked 101010x and 888x. The GPU code for
> readPixels tried to enfore this, but incorrectly, and the
> writePixels code missed it entirely.
> 
> Bug: skia:
> Change-Id: Ib69473703f2ae7604d4b21ec6728b7d764becd9a
> Reviewed-on: https://skia-review.googlesource.com/c/161148
> Commit-Queue: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Auto-Submit: Brian Osman <brianosman@google.com>

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

Change-Id: I360375f2bf21576db914f5e177ac56e398ca7023
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/161380
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-11 12:57:52 +00:00
Brian Osman
9835dd51b3 Fix image info checking for always-opaque color types
The old code overlooked 101010x and 888x. The GPU code for
readPixels tried to enfore this, but incorrectly, and the
writePixels code missed it entirely.

Bug: skia:
Change-Id: Ib69473703f2ae7604d4b21ec6728b7d764becd9a
Reviewed-on: https://skia-review.googlesource.com/c/161148
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2018-10-10 21:38:28 +00:00
Mike Reed
c6471ebc67 Revert "remove unneeded flag SK_SUPPORT_LEGACY_RECTMAKELARGEST"
This reverts commit 1e29525d5f.

Reason for revert: forgot to also delete float version, and update dox

Original change's description:
> remove unneeded flag SK_SUPPORT_LEGACY_RECTMAKELARGEST
> 
> Bug: skia:
> Change-Id: I42ada9845f4cefd4029c0420d64508decc8eef7a
> Reviewed-on: https://skia-review.googlesource.com/c/161147
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: If207292c23b1d3c60de2bc83795b8e845d8fdda2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/161150
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-10 21:08:16 +00:00
Mike Klein
c1db610f6f Revert "SkTArray: clean up, no change to behaviour"
This reverts commit c0a74a1f76.

Reason for revert: made flutter 7K bigger for no real gain.

Original change's description:
> SkTArray: clean up, no change to behaviour
> 
> Change-Id: I15883216995a0ffe1ee1b183291cf0ea5867f613
> Reviewed-on: https://skia-review.googlesource.com/c/161042
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I10756cd384c352ede68636a08e7cdd83c6833e4f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/161260
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-10 21:01:52 +00:00
Mike Reed
1e29525d5f remove unneeded flag SK_SUPPORT_LEGACY_RECTMAKELARGEST
Bug: skia:
Change-Id: I42ada9845f4cefd4029c0420d64508decc8eef7a
Reviewed-on: https://skia-review.googlesource.com/c/161147
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-10 20:37:37 +00:00
Hal Canary
c0a74a1f76 SkTArray: clean up, no change to behaviour
Change-Id: I15883216995a0ffe1ee1b183291cf0ea5867f613
Reviewed-on: https://skia-review.googlesource.com/c/161042
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-10 19:13:30 +00:00
Jim Van Verth
f00b16233d Fix up SkImage_GpuYUVA MakePromiseYUVATexture
Bug: skia:7901
Change-Id: I8722373148f99cb16e2aa9c825832bb83fa4e979
Reviewed-on: https://skia-review.googlesource.com/c/161043
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-10-10 17:41:23 +00:00
Robert Phillips
6ba8c83234 Fix yuv_to_rgb_effect GM
This bug was introduced in https://skia-review.googlesource.com/c/skia/+/160162 (Make GrYUVtoRGBEffect more flexible)

I don't know why I wasn't seeing this locally!

Change-Id: Ic4d9b88b70c6d691d1e30d5ee0dc592a00b9b4e7
Reviewed-on: https://skia-review.googlesource.com/c/161044
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-10-10 16:19:25 +00:00
Hal Canary
42137de2b2 SkPDF: stop using linked list of dynamic memory streams.
also:
     delete src/core/SkSinglyLinkedList.h
     add prependToAndReset() to SkDynamicMemoryWStream.

All test PDFs are identical.

Change-Id: I528873f2f5061f07dd416a71f39d97ee97ef3c7d
Reviewed-on: https://skia-review.googlesource.com/c/159323
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-10-09 19:01:49 +00:00
Robert Phillips
46acf9dac3 Add context option to reduce opList splitting
This is split out of: https://skia-review.googlesource.com/c/skia/+/143113 (Reduce arbitrary opList splitting when sorting (take 3)).
It needs to be behind a context option because, without mini-flushes, it can cause OOM on smaller devices (e.g., Nexus7 and AndroidOne).

Change-Id: Icde3302bd033a9c4634bb0ca97c950456e73db7c
Reviewed-on: https://skia-review.googlesource.com/c/160763
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-10-09 17:08:26 +00:00
Brian Osman
9e737fe32f Remove unused (Android-only) stable ID from SkPixelRef
Bug: skia:
Change-Id: Ibfe5d7e4c713bf637318f3e2ecc219495bd62879
Reviewed-on: https://skia-review.googlesource.com/c/160767
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-09 15:52:46 +00:00
Mike Klein
0d8084db91 remove deprecated SK_ATTR_DEPRECATED
Change-Id: I73a35fb4d408fb5eeabbb99f0362bd75e8814c7d
Reviewed-on: https://skia-review.googlesource.com/c/159485
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-09 15:25:33 +00:00
Jim Van Verth
8bbce0e29e More SkImage_GpuYUV updates
Bug: skia:7901
Change-Id: If5f747ff95c65ac95cfed8c1282cc08019d8006a
Reviewed-on: https://skia-review.googlesource.com/c/160024
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-10-08 20:22:58 +00:00
Herb Derby
434377abfb Split out SkRunFont and SkPaint
Coping paints take significant time. The ApplyFontToPaint
idiom requires a copy and a dtor. This CL keeps the paint and
font in parallel through the code until a paint is actually
needed, then a special ctor is used to create it.

Also, inline a bunch of text blob calls that were showing up
in perf.

Change-Id: I7da746a287e4d3942e45e9536ef9acdc64f084d4
Reviewed-on: https://skia-review.googlesource.com/c/159222
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-10-05 16:10:07 +00:00
Robert Phillips
b6df1c1e59 Expose the SkYUVAIndex version of the SkImage factories
TBR=bsalomon@google.com
Bug: skia:7903
Change-Id: Ib5a3bdba99da4cfb79115d1ff7b2c014272a5556
Reviewed-on: https://skia-review.googlesource.com/c/159520
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-10-05 15:24:59 +00:00
Mike Klein
d945698c5d remove SkColorSpaceTransferFn::operator()()
Looks like SkColorSpaceXformSteps is its only user,
and it can easily switch over to skcms instead.

We're now making 3-6 function calls instead of inlining,
but on the other hand, they're replacing 3-6 calls to powf()...

Guarded with SK_LEGACY_TF_APPLY.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I502d4b3979a4e912820c925b63a174406801be0b
Reviewed-on: https://skia-review.googlesource.com/c/159762
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-04 22:35:03 +00:00
Mike Klein
7e587330c8 Reland "remove deprecated SkRect::MakeFromIRect()"
This is a reland of 4fea17393a

Original change's description:
> remove deprecated SkRect::MakeFromIRect()
> 
> Needs https://chromium-review.googlesource.com/c/chromium/src/+/1261818
> 
> Change-Id: I529a2cd16d46ad13bc1eb9d3746e3587e25e9dbe
> Reviewed-on: https://skia-review.googlesource.com/c/159481
> Reviewed-by: Cary Clark <caryclark@google.com>

Change-Id: I53e5b23f765d5b28df50bea70cd8d8f9aac7e740
Reviewed-on: https://skia-review.googlesource.com/c/159821
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-04 22:05:27 +00:00
Hal Canary
2e01805298 SkDynamicMemoryWStream: make moveable
Motivation:  using this in an experiment of mine (I want a
std::vector<SkDynamicMemoryWStream>.)

Change-Id: I28e2c468156ace2f9e7d5e09937e05bc8b7e8200
Reviewed-on: https://skia-review.googlesource.com/c/159326
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-10-04 21:29:49 +00:00
Mike Klein
4302eb9a6e Revert "remove deprecated SkRect::MakeFromIRect()"
This reverts commit 4fea17393a.

Reason for revert: one more in Google3.

Original change's description:
> remove deprecated SkRect::MakeFromIRect()
> 
> Needs https://chromium-review.googlesource.com/c/chromium/src/+/1261818
> 
> Change-Id: I529a2cd16d46ad13bc1eb9d3746e3587e25e9dbe
> Reviewed-on: https://skia-review.googlesource.com/c/159481
> Reviewed-by: Cary Clark <caryclark@google.com>

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

Change-Id: I02872a3dd6031e360ce7c1988c8a73c9b7096067
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/159820
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-04 20:57:58 +00:00
Mike Klein
d295dff5c6 remove SkColorSpaceTransferFn::invert()
Looks like DM may be its only user?
That was me and just for convenience... I can fold it through.

Change-Id: I4ed6ee659df4192e3d6db7ce5b055c4c923673bd
Reviewed-on: https://skia-review.googlesource.com/c/159761
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-04 20:33:20 +00:00
Hal Canary
d18d7bd294 SK_SUPPORT_LEGACY_DOCUMENT_FACTORY: clean up part 2/2
Change-Id: Ibab2f420c779e0307f4df214f229609b377acf29
Reviewed-on: https://skia-review.googlesource.com/c/156369
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-10-04 20:00:24 +00:00
Mike Klein
ae16b74365 Reland "hash tf, and whole colorspace"
This is a reland of 58887bc3c1

Original change's description:
> hash tf, and whole colorspace
> 
> Change-Id: I088124ead162d369c5c9f8bdd3fc0a39b2b3de46
> Reviewed-on: https://skia-review.googlesource.com/c/159486
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Idec6b6817f7a2136083caecd20c35e1eb9f2f388
Reviewed-on: https://skia-review.googlesource.com/c/159622
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-04 19:33:04 +00:00
Mike Klein
4fea17393a remove deprecated SkRect::MakeFromIRect()
Needs https://chromium-review.googlesource.com/c/chromium/src/+/1261818

Change-Id: I529a2cd16d46ad13bc1eb9d3746e3587e25e9dbe
Reviewed-on: https://skia-review.googlesource.com/c/159481
Reviewed-by: Cary Clark <caryclark@google.com>
2018-10-04 19:09:42 +00:00
Mike Klein
5959353a31 remove SkColorSpace::toXYZD50()
Change-Id: I005623828b6f074077d5ba6a4e72f3192bfbfb12
Reviewed-on: https://skia-review.googlesource.com/c/159623
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-04 18:50:24 +00:00
Brian Osman
11c221a5ce Remove unused Options parameter from SkImageGenerator::getPixels
I'd like to remove this from the virtual onGetPixels as well, but that
requires staging a chromium change.

Bug: skia:
Change-Id: I078e5135daaa77803d8474027a98da2973556afb
Reviewed-on: https://skia-review.googlesource.com/c/159522
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2018-10-04 18:22:12 +00:00
Hal Canary
363a3f838c SkCanvas: remove unused SkCanvas::InitFlags
Change-Id: Ib5a0a873ebe6a3c8c671afc1e9f7f102cfee4aa7
Reviewed-on: https://skia-review.googlesource.com/c/159580
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-04 16:49:34 +00:00
Mike Klein
5c99c210e0 Revert "hash tf, and whole colorspace"
This reverts commit 58887bc3c1.

Reason for revert: hash collisions reported on 32-bit x86

Original change's description:
> hash tf, and whole colorspace
> 
> Change-Id: I088124ead162d369c5c9f8bdd3fc0a39b2b3de46
> Reviewed-on: https://skia-review.googlesource.com/c/159486
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ia8580074bd94a9fa158cdd98dc6b021ee5650883
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/159620
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-04 16:40:34 +00:00
Mike Klein
58887bc3c1 hash tf, and whole colorspace
Change-Id: I088124ead162d369c5c9f8bdd3fc0a39b2b3de46
Reviewed-on: https://skia-review.googlesource.com/c/159486
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-04 16:20:42 +00:00
Mike Klein
fe5ad67dea remove deprecated SkBitmap::eraseRGB()
Change-Id: I1adf711d39f441154aa1c032d49583d0c45d2568
Reviewed-on: https://skia-review.googlesource.com/c/159482
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-10-04 15:37:27 +00:00
Mike Klein
5f8ef8c1da remove deprecated SkMatrix44::map() 2x
Change-Id: Iac32934a454da7c6edf02aec36fa12e4dbbae408
Reviewed-on: https://skia-review.googlesource.com/c/159483
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-04 14:55:23 +00:00
Brian Osman
f28e55d5a1 Add SkPMColor4f support to SkSL
Convert GrConstColorProcessor to store SkPMColor4f

Bug: skia:
Change-Id: I6c505856653a02e576ae11fca59dc307545437f7
Reviewed-on: https://skia-review.googlesource.com/c/159152
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-04 14:55:04 +00:00
Robert Phillips
66a9734934 Make SkYUVAIndex publicly accessible
Change-Id: I3da7c566cdf9256e57ac7e7f30fee18b9c1a144d
Reviewed-on: https://skia-review.googlesource.com/c/159460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-10-04 14:14:23 +00:00
Mike Klein
4429a4f82c re-precate SkMatrix44::SkMatrix44()
It's been driving me nuts that I can't just write `SkMatrix44 m;`,
and I often don't care whether it's initialized or not.  The default
identity constructor would be nice to use, but it's deprecated.

By tagging this constructor deprecated, we're only hurting ourselves;
our big clients disable warnings about deprecated routines and use it
freely.

A quick tally in Skia shows we mostly use the uninitialized constructor,
but sometimes the identity constructor, and there is a spread of all
three in Chromium.  So I've left the two explicit calls available.

I switched a bunch of calls in Skia to use the less verbose constructor
where it was clear that it didn't matter if the matrix was initialized.
Literally zero of the kUninitialized constructor calls looked important
for performance, so the only place I've kept is its lone unit test.

A few places read clearer with an explicit "identity" to read.

Change-Id: I0573cb6201f5a36f3b43070fb111f7d9af92736f
Reviewed-on: https://skia-review.googlesource.com/c/159480
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-04 14:01:11 +00:00
Brian Osman
781e35071d Remove SkPM4f
Bug: skia:
Change-Id: If5ed79680f215ac5087469b4c04942885bdb5fd0
Reviewed-on: https://skia-review.googlesource.com/c/159322
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-10-03 20:21:58 +00:00
Leon Scroggins III
712476ecdb Remove SkCodec::fSrcInfo
This object is now redundant with fEncodedInfo. It holds an
SkColorSpace, which is never used now that SkCodec uses skcms.

SkCodec::getInfo() no longer returns a reference, but creates an
SkImageInfo from the SkEncodedInfo the same way fSrcInfo was
previously created.

Add SkCodec::bounds() and ::dimensions() to replace calling these
methods on getInfo().

Remove srcInfo from SkMaskSwizzler::Create, which just wants to know
whether the src is opaque.

Remove the srcColorType from conversionSupported. Only the base class
version used it. Make it look at fEncodedInfo.color() instead.

Bug: skia:6839
Bug: chromium:887372
Change-Id: I2c0583cae76121211c1a6b49979972fa86daf077
Reviewed-on: https://skia-review.googlesource.com/c/157563
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-03 20:14:18 +00:00
Mike Klein
9e0efe3189 remove SkColorSpaceXform
Change-Id: I08181d2f5a81a4f0781304dd7fab2cb1452b2c30
Reviewed-on: https://skia-review.googlesource.com/c/159300
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-03 20:08:48 +00:00
Greg Daniel
b4d895606f Reland "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
This reverts commit a55e214bbe.

Reason for revert:google3 should be fixed now

Original change's description:
> Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
> 
> This reverts commit 55aea84baa.
> 
> Reason for revert: Google3 roll failing like
> 
> third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found
> #include "../../../third_party/vulkan/SkiaVulkan.h"
> 
> 
> Original change's description:
> > Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> > 
> > This reverts commit 684b506f35.
> > 
> > Reason for revert: Chrome change has landed to fix broken chrome roll.
> > 
> > Original change's description:
> > > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> > >
> > > This reverts commit 6e2d607334.
> > >
> > > Reason for revert: chrome roll
> > >
> > > Original change's description:
> > > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> > > >
> > > > This should allow a client to build a skia library that doesn't use vulkan but still
> > > > has all the public headers defined so that they don't have to build two versions of
> > > > their code.
> > > >
> > > > Bug: chromium:862144
> > > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > > > Reviewed-on: https://skia-review.googlesource.com/158661
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
> > >
> > > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: chromium:862144
> > > Reviewed-on: https://skia-review.googlesource.com/c/159000
> > > Reviewed-by: Mike Klein <mtklein@google.com>
> > > Commit-Queue: Mike Klein <mtklein@google.com>
> > 
> > TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> > 
> > Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:862144
> > Reviewed-on: https://skia-review.googlesource.com/c/159145
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> 
> Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159155
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I58f7f8ca5281cd5fe0c145c01e9b9465c9b9ec31
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/159260
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-10-03 18:44:59 +00:00
Mike Klein
a55e214bbe Revert "Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN.""
This reverts commit 55aea84baa.

Reason for revert: Google3 roll failing like

third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found
#include "../../../third_party/vulkan/SkiaVulkan.h"


Original change's description:
> Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> 
> This reverts commit 684b506f35.
> 
> Reason for revert: Chrome change has landed to fix broken chrome roll.
> 
> Original change's description:
> > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> >
> > This reverts commit 6e2d607334.
> >
> > Reason for revert: chrome roll
> >
> > Original change's description:
> > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> > >
> > > This should allow a client to build a skia library that doesn't use vulkan but still
> > > has all the public headers defined so that they don't have to build two versions of
> > > their code.
> > >
> > > Bug: chromium:862144
> > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > > Reviewed-on: https://skia-review.googlesource.com/158661
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
> >
> > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:862144
> > Reviewed-on: https://skia-review.googlesource.com/c/159000
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Mike Klein <mtklein@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
> 
> Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159145
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159155
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-03 16:34:23 +00:00
Mike Reed
964aedb5e3 play with animated gif
Bug: skia:
Change-Id: If86314cda6aa84f4824958cca30cde88a78d4b59
Reviewed-on: https://skia-review.googlesource.com/c/158562
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-10-03 14:43:18 +00:00
Greg Daniel
55aea84baa Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
This reverts commit 684b506f35.

Reason for revert: Chrome change has landed to fix broken chrome roll.

Original change's description:
> Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
>
> This reverts commit 6e2d607334.
>
> Reason for revert: chrome roll
>
> Original change's description:
> > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> >
> > This should allow a client to build a skia library that doesn't use vulkan but still
> > has all the public headers defined so that they don't have to build two versions of
> > their code.
> >
> > Bug: chromium:862144
> > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > Reviewed-on: https://skia-review.googlesource.com/158661
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
>
> Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159000
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org

Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159145
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-10-03 13:30:30 +00:00