Commit Graph

6121 Commits

Author SHA1 Message Date
Nigel Tao
9b9453e907 Have CodecTest's check not skip 'complete' tests
As currently written, some code paths trigger a return, which
inadvertently avoids the "let's run the same test again on full decodes"
at the bottom of the function.

Bug: skia:
Change-Id: I89a06ec6398099d2bfa3b0e81bb9077a28a7f096
Reviewed-on: https://skia-review.googlesource.com/144241
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-08-01 13:44:35 +00:00
Nigel Tao
afea9c32ac Avoid infinite loop in Codec_requiredFrame test
Prior to this commit, the test would finish (and pass) with a correct
SkCodec implementation, but could infinite loop (instead of finish with
failure) with an incorrect implementation.

Bug: skia:
Change-Id: I89e8cfef9837c50e83a23e67a40204a9478a17cb
Reviewed-on: https://skia-review.googlesource.com/144740
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-08-01 13:29:21 +00:00
Brian Salomon
fd98c2c871 Make some GrSurfaceProxy and GrTextureProxy methods easier to access
Move peek[Surface|Texture|RenderTarget]() from GrSurfaceProxyPriv to
to GrSurfaceProxy.

Move proxyMipMapped(), textureType(), and hasRestrictedSampling()
from GrTextureProxyPriv to GrTextureProxy.

Change-Id: I259114d0508c4613d55f7f1faccac362fa6fb281
Reviewed-on: https://skia-review.googlesource.com/144641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-08-01 12:00:47 +00:00
Hal Canary
f107a2fd01 SkUTF
Create new header and namespace, `SkUTF` where we are putting all of our
robust, well documented UTF-8, UTF-16, and UTF-32 functions:
`SkUTF::{Count,Next,To}UTF{8,16,32}()`.

SkUTF.h and SkUTF.cpp do not depend on the rest of Skia and are suitable
for re-use in other modules.

Some of the old UTF-{8,16} functions still live in SkUtils.h; their use
will be phased out in future CLs.

Also added more unit testing and cleaned up old tests.

Removed functions that were unused outside of tests or used only once.

Change-Id: Iaa59b8705abccf9c4ba082f855da368a0bad8380
Reviewed-on: https://skia-review.googlesource.com/143306
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-07-31 20:11:19 +00:00
Brian Salomon
e782f8472f Remove GrResourceIOProcessor.
Fold its functionality into GrPrimitiveProcessor and GrFragmentProcessor.

Make each have its own TextureSampler nested class. Currently the only
difference is that fragment processors lose the ability to inject their
samplers into the vertex shader. However, this facilitates refactoring
GrPrimitiveProcessor's TextureSampler class such that the textures are
specified separately from the TextureSampler.

Bug: skia:
Change-Id: I1e590187e7a6ae79ee3147155d397fcdcf5e4619
Reviewed-on: https://skia-review.googlesource.com/142814
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-31 18:16:11 +00:00
Brian Salomon
ae5f9534b1 Remove unused GrGpuResourceRef and GrTGpuResourceRef
Change-Id: I8b4b323549f51e4601ccb6612f65d354e163e93c
Reviewed-on: https://skia-review.googlesource.com/144504
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-31 16:55:26 +00:00
Timothy Liang
e30739a1e1 implemented copy surface as draw for metal gpu backend
Bug: skia:
Change-Id: Ie61bd6ad9f288b8a025d44f887a0954101a7d710
Reviewed-on: https://skia-review.googlesource.com/142687
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-07-31 16:25:55 +00:00
Ethan Nicholas
0054311bf3 Re-re-land "added GrSkSLFP and converted DitherEffect to use it"
This reverts commit 6c48e4d11c.

Bug: skia:
Change-Id: I7ee78990fc30eec545d1856e59eb6e0573089426
Reviewed-on: https://skia-review.googlesource.com/144348
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-07-31 15:18:03 +00:00
Brian Salomon
f7dcd76c55 Remove array of TextureSampler pointers from GrIOResourceProcessor.
Instead store sampler count on base class and subclasses implement a
virtual to get the ith sampler.

Change-Id: I13e2447a6467a09761d8615acb4aa360b87b1476
Reviewed-on: https://skia-review.googlesource.com/141563
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-07-30 19:40:03 +00:00
Brian Salomon
7226c232d7 Make GrTextureProxy store a GrTextureType.
Removes flag indicating rectangle or external as its now redundant.

Bug: skia:
Change-Id: Ia475b557390e7a6b0f19f6e189cf8c27090e397c
Reviewed-on: https://skia-review.googlesource.com/144346
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-30 19:32:13 +00:00
Herb Derby
c3bc69f238 Rename MakeAsTextDraw to MakeFromText
Change-Id: I3fbb4d27b728e5fc5ecec9fc9d9e215dd5a83359
Reviewed-on: https://skia-review.googlesource.com/144123
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-07-27 21:03:26 +00:00
Chris Dalton
49d14e98fe sksl: Add a "sk_Clockwise" built-in
This allows us to identify clockwise-winding triangles, in terms of
Skia device space, in all backends and with all render target origins.

Bug: skia:
Change-Id: I220e1c459e0129d1cc4dee6458ef94277fbedd21
Reviewed-on: https://skia-review.googlesource.com/142662
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-07-27 19:04:46 +00:00
Robert Phillips
6fc3092af1 Fix TSAN bug in TransferPixelsTest
Change-Id: I067d9e86d00ab6bfa91e2d22725b26315a3ec348
Reviewed-on: https://skia-review.googlesource.com/144026
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-07-27 17:07:26 +00:00
Florin Malita
ab54e7394d Hide SkTextBlob::GlyphPositioning from public API
Make private, add corresponding SkTextBlobRunIterator enum.

Also move SkTextBlobRunIterator to SkTextBlobPriv.h.

Change-Id: If3e0beabb0e8484b1ac73c6fc0827e920ca1f93b
Reviewed-on: https://skia-review.googlesource.com/142501
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-07-27 14:10:17 +00:00
Brian Salomon
504dd052b9 Reland "Go back to cleaning up MIP levels on texture export rather than assuming dirty on texture import."
This is a reland of 01d6fc9d84
Chrome layout tests have been suppressed so this shouldn't block a Skia roll.

Original change's description:
> Go back to cleaning up MIP levels on texture export rather than assuming dirty
> on texture import.
>
> Bug: skia:8155
> Change-Id: I23399f442d52c73906829132f798eda260b6d4ae
> Reviewed-on: https://skia-review.googlesource.com/143291
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: skia:8155
Change-Id: Ia3843b66c2453daf15e566b7ecf890c2ff4aed22
Reviewed-on: https://skia-review.googlesource.com/143960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-07-27 13:37:31 +00:00
Herb Derby
b935cf8e12 const all the things
Having the glyph run list be const as it passes through the stack means
that future change can't be introduced in the device code that changes
behavior. Try to force all text changes into the SkGylphRun system.

Change-Id: I9412bc094c7adb8554887c725a6264af306e1d42
Reviewed-on: https://skia-review.googlesource.com/143702
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-07-27 03:13:56 +00:00
Stephen White
d26b4d865a GrTessellator: fix for collinear edge merging.
In some cases, two edges can be collinear when tested on one side
(e.g., left top vs right edge), but non-collinear when tested on the
other (e.g., right top vs left edge). We were actually merging based
on one criterion, but assserting based on the other.

The safest fix is to merge if either condition is true, and then
assert that both conditions are false.

Bug: 866319
Change-Id: Ia1be330caf62f6d7961746752f73993ca098d0a3
Reviewed-on: https://skia-review.googlesource.com/143501
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2018-07-26 14:38:56 +00:00
Mike Klein
e28a6b55df add explicit accessor for sRGB singleton colorspaces
SkColorSpace::MakeSRGB().get() is scary, and causes more ref/unref
pairs than strictly necessary for these singletons.

This time the implementation is still in SkColorSpace.cpp,
so these should really work as singletons.

Change-Id: I40f2942c8dcde3040663a04c4f5330aca90868ae
Reviewed-on: https://skia-review.googlesource.com/143305
Auto-Submit: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-07-25 23:51:15 +00:00
Mike Klein
6668a514ac Revert "Go back to cleaning up MIP levels on texture export rather than assuming dirty"
This reverts commit 01d6fc9d84.

Reason for revert: layout tests.

Original change's description:
> Go back to cleaning up MIP levels on texture export rather than assuming dirty
> on texture import.
> 
> Bug: skia:8155
> Change-Id: I23399f442d52c73906829132f798eda260b6d4ae
> Reviewed-on: https://skia-review.googlesource.com/143291
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ice4cb4e253e52d67eb8bd6e2a12ccc844b7bfa8d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8155
Reviewed-on: https://skia-review.googlesource.com/143380
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-07-25 19:16:47 +00:00
Khushal
1c94a8fabe fonts: Don't recompute device descs on glyph cache hit.
Testing using serialization PaintOpPerfTest, this had the following
improvement in serialization speed:

Before: ~515,000 ops/s
After:  ~600,000 ops/s

R=herb@google.com

Change-Id: Iefd80467ea4ff7cc88e8ca1f431883502d249857
Reviewed-on: https://skia-review.googlesource.com/142972
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
2018-07-25 18:07:46 +00:00
Hal Canary
4014ba6ec7 SkUtils: remove some versions of UTF routines.
Change-Id: Ib1f776ae472117c23d2145253adf25fceb412b32
Reviewed-on: https://skia-review.googlesource.com/143111
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-07-25 17:21:56 +00:00
Brian Salomon
01d6fc9d84 Go back to cleaning up MIP levels on texture export rather than assuming dirty
on texture import.

Bug: skia:8155
Change-Id: I23399f442d52c73906829132f798eda260b6d4ae
Reviewed-on: https://skia-review.googlesource.com/143291
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-07-25 16:21:56 +00:00
Cary Clark
2587f41f26 handle failing pathop tests
Some tests isolated from GrShapes_arcs do not
fail gracefully, so make sure errors are properly
handled.

TBR=reed@google.com

Bug: skia:
Change-Id: Ia8c9903e64ef755ec11c398df3e5d258ca1f5f8b
Reviewed-on: https://skia-review.googlesource.com/143112
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-07-24 17:08:55 +00:00
Herb Derby
81ecdbb7ff Clean up bitmap path
Change-Id: If149194fd86f14bea289ad68262ea99cbbc398b6
Reviewed-on: https://skia-review.googlesource.com/142817
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-07-24 14:53:25 +00:00
Jim Van Verth
0067369061 Reland "Reland "Add some optimizations to PolyUtils""
This is a reland of 946c37057f

Original change's description:
> Reland "Add some optimizations to PolyUtils"
> 
> This is a reland of 8bb0db3d07
> 
> Original change's description:
> > Add some optimizations to PolyUtils
> > 
> > * Switch inset/offset code to use a linked list rather than an array
> > * Use std::set to store active edge list for IsSimplePolygon rather than array
> > * Pre-alloc the priority queue for IsSimplePolygon
> > * When adding radial curves, expand the array all at once rather than pushing
> > one at a time.
> > 
> > Bug: skia:
> > Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4
> > Reviewed-on: https://skia-review.googlesource.com/140787
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 
> Bug: skia:
> Change-Id: I3f5d42cfb941deab2b28bed020b37ce199e91d3d
> Reviewed-on: https://skia-review.googlesource.com/142200
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Bug: skia:
Change-Id: I598d4be9108d009d0f885cfa72bf9197fc286b3a
Reviewed-on: https://skia-review.googlesource.com/142920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-07-23 15:50:56 +00:00
Hal Canary
98caedd213 SkPDF: only draw text with SkglyphRuns
Change-Id: I24e79c73a9c65a5d6a974bf52b0d0aee21be07db
Reviewed-on: https://skia-review.googlesource.com/142695
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-07-23 15:14:24 +00:00
Herb Derby
1a9971ed47 Convert remote glyph cache to use glyp runs
Change-Id: I763a3570ff6b970cfcbf172d786370c77a0db0d7
Reviewed-on: https://skia-review.googlesource.com/142507
Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2018-07-20 18:17:56 +00:00
Greg Daniel
8e9b4c4757 Reland "Don't require mips in GrTextureProducer if texture is 1x1."
This reverts commit c861eee3a6.

Reason for revert: Relanding with fix for gray8 not copyable

Original change's description:
> Revert "Don't require mips in GrTextureProducer if texture is 1x1."
>
> This reverts commit 5191fd7555.
>
> Reason for revert: breaking angle
>
> Original change's description:
> > Don't require mips in GrTextureProducer if texture is 1x1.
> >
> > Bug: chromium:862921
> > Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d
> > Reviewed-on: https://skia-review.googlesource.com/142586
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
>
> Change-Id: Iaef7a56b061cb41f4c75ec20d8df77d3e52b194d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862921
> Reviewed-on: https://skia-review.googlesource.com/142600
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I52378fa43efe2fdf583335f5fa8aa5b04a68ae2f
Bug: chromium:862921
Reviewed-on: https://skia-review.googlesource.com/142760
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-07-20 17:23:16 +00:00
Greg Daniel
c861eee3a6 Revert "Don't require mips in GrTextureProducer if texture is 1x1."
This reverts commit 5191fd7555.

Reason for revert: breaking angle

Original change's description:
> Don't require mips in GrTextureProducer if texture is 1x1.
> 
> Bug: chromium:862921
> Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d
> Reviewed-on: https://skia-review.googlesource.com/142586
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Iaef7a56b061cb41f4c75ec20d8df77d3e52b194d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862921
Reviewed-on: https://skia-review.googlesource.com/142600
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-07-19 21:33:16 +00:00
Greg Daniel
5191fd7555 Don't require mips in GrTextureProducer if texture is 1x1.
Bug: chromium:862921
Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d
Reviewed-on: https://skia-review.googlesource.com/142586
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-07-19 21:02:55 +00:00
Ethan Nicholas
6c48e4d11c Reland "Revert "added GrSkSLFP and converted DitherEffect to use it""
This reverts commit 97ae0c8902.

Reason for revert: Breaking ANGLE.

Original change's description:
> Revert "Revert "added GrSkSLFP and converted DitherEffect to use it""
> 
> This reverts commit f203078309.
> 
> Bug: skia:
> Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e
> Reviewed-on: https://skia-review.googlesource.com/137391
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I65d6d2707fceab0a99121c528d1b848d23e34bfa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/142588
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-07-19 20:10:46 +00:00
Timothy Liang
a8046af0b0 implemented onWritePixels and related tests for metal gpu backend
Bug: skia:
Change-Id: Iab8bc8611a9de8afcf0eaeb58a8ef46fdc38d4f1
Reviewed-on: https://skia-review.googlesource.com/140571
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-07-19 19:26:15 +00:00
Ethan Nicholas
97ae0c8902 Revert "Revert "added GrSkSLFP and converted DitherEffect to use it""
This reverts commit f203078309.

Bug: skia:
Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e
Reviewed-on: https://skia-review.googlesource.com/137391
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-19 19:00:55 +00:00
Cary Clark
785586af7d remove unused serialization in textblob
The SKTextBlob serialization code that is tested by Skia is
unused by Chrome. The serialization code that is
used by Chrome is untested by Skia.

Remove the unused code; test the used code.

The code path introduced nearly a year ago,
likely for slimming paint, attempts to make
text blobs smarter by allowing the reuse of typefaces.

Maybe there needs to be a Chrome bug / feature
request to use this?

If if turns out there is no interest to do so,
This CL aligns used interfaces with tests.

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

Bug: skia:6818
Change-Id: I9b3ec0c326495322986ba26f20f901bcb208be73
Reviewed-on: https://skia-review.googlesource.com/141542
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-07-19 14:32:45 +00:00
Ben Wagner
e9dd316a00 Revert "Reland "Add some optimizations to PolyUtils""
This reverts commit 946c37057f.

Reason for revert: strict weak ordering: ((__x LT __y) && (__y LT __x)) != false

Original change's description:
> Reland "Add some optimizations to PolyUtils"
> 
> This is a reland of 8bb0db3d07
> 
> Original change's description:
> > Add some optimizations to PolyUtils
> > 
> > * Switch inset/offset code to use a linked list rather than an array
> > * Use std::set to store active edge list for IsSimplePolygon rather than array
> > * Pre-alloc the priority queue for IsSimplePolygon
> > * When adding radial curves, expand the array all at once rather than pushing
> > one at a time.
> > 
> > Bug: skia:
> > Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4
> > Reviewed-on: https://skia-review.googlesource.com/140787
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 
> Bug: skia:
> Change-Id: I3f5d42cfb941deab2b28bed020b37ce199e91d3d
> Reviewed-on: https://skia-review.googlesource.com/142200
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: Ie8cdf2375613c51dedaf0d11125d6d22d88821df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/142281
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-18 21:28:02 +00:00
Robert Phillips
715d08c381 Fix explicit allocation bug
Change-Id: I9866f563e02b2ab290cc46ede05f8eda21f6d3b2
Reviewed-on: https://skia-review.googlesource.com/142163
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-07-18 18:51:02 +00:00
Jim Van Verth
946c37057f Reland "Add some optimizations to PolyUtils"
This is a reland of 8bb0db3d07

Original change's description:
> Add some optimizations to PolyUtils
> 
> * Switch inset/offset code to use a linked list rather than an array
> * Use std::set to store active edge list for IsSimplePolygon rather than array
> * Pre-alloc the priority queue for IsSimplePolygon
> * When adding radial curves, expand the array all at once rather than pushing
> one at a time.
> 
> Bug: skia:
> Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4
> Reviewed-on: https://skia-review.googlesource.com/140787
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Bug: skia:
Change-Id: I3f5d42cfb941deab2b28bed020b37ce199e91d3d
Reviewed-on: https://skia-review.googlesource.com/142200
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-07-18 18:37:03 +00:00
Timothy Liang
760dbc4b53 Reland "implemented metal gpu backend texture upload testing"
This reverts commit a80a012456.

Reason for revert: Fix bot failure.

Original change's description:
> Revert "implemented metal gpu backend texture upload testing"
>
> This reverts commit 36848f6b30.
>
> Reason for revert: Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR failing.
>
> Original change's description:
> > implemented metal gpu backend texture upload testing
> >
> > Bug: skia:
> > Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71
> > Reviewed-on: https://skia-review.googlesource.com/140248
> > Commit-Queue: Timothy Liang <timliang@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,ethannicholas@google.com,timliang@google.com
>
> Change-Id: Idf40fc78b82aec1efbcc64221b6d2bbf63353960
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/141182
> Reviewed-by: Timothy Liang <timliang@google.com>
> Commit-Queue: Timothy Liang <timliang@google.com>

Bug: skia:
Change-Id: Ib8c5b2e0cf9de25c11c14741a32846bcc874d712
Reviewed-on: https://skia-review.googlesource.com/141183
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-07-18 18:17:32 +00:00
Herb Derby
4b3a5152a3 MakeAsDrawText for SkTextBlob
Change-Id: I04ebca6b318e0654cc1e598aa323cfb9a21e5a5e
Reviewed-on: https://skia-review.googlesource.com/141960
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2018-07-17 22:16:41 +00:00
Jim Van Verth
3229e65886 Revert "Add some optimizations to PolyUtils"
This reverts commit 8bb0db3d07.

Reason for revert: Breaking Google3.

Original change's description:
> Add some optimizations to PolyUtils
> 
> * Switch inset/offset code to use a linked list rather than an array
> * Use std::set to store active edge list for IsSimplePolygon rather than array
> * Pre-alloc the priority queue for IsSimplePolygon
> * When adding radial curves, expand the array all at once rather than pushing
> one at a time.
> 
> Bug: skia:
> Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4
> Reviewed-on: https://skia-review.googlesource.com/140787
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: Ie8afecd899fa9bd79d22fdf46ec82a0c9e94e893
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/141980
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-07-17 20:22:51 +00:00
Jim Van Verth
8bb0db3d07 Add some optimizations to PolyUtils
* Switch inset/offset code to use a linked list rather than an array
* Use std::set to store active edge list for IsSimplePolygon rather than array
* Pre-alloc the priority queue for IsSimplePolygon
* When adding radial curves, expand the array all at once rather than pushing
one at a time.

Bug: skia:
Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4
Reviewed-on: https://skia-review.googlesource.com/140787
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-07-17 18:47:11 +00:00
Robert Phillips
a8cdbd7431 Restore SkLightingShader and associated classes
This reverts https://skia-review.googlesource.com/c/skia/+/31140 (Remove SkLightingShader and associated classes) and updates the classes to ToT

Change-Id: I3b1df1704cca8907aa00f081a7e93339b65ad4fa
Reviewed-on: https://skia-review.googlesource.com/141545
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-07-17 17:24:50 +00:00
Ruiqi Mao
b609e6dc6a added byte and ubyte types to SKSL
created new GMs for skinning

Bug: skia:
Change-Id: I15fb2bd02fba8beb6dd2dd3f3716da016ea92192
Reviewed-on: https://skia-review.googlesource.com/140241
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-07-17 15:08:40 +00:00
Ben Wagner
f35a1c1b24 Remove SkRefDict.
It is unused. Remove it.

Change-Id: If62a93a58d21bfccd6df112e92a709bff4d11c97
Reviewed-on: https://skia-review.googlesource.com/141566
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-16 22:23:49 +00:00
Stephen White
71ed661963 GrTessellator: collinear edges during sanitize.
When three collinear edges occur during the sanitize_contours() pass,
their vertices may not yet have been discovered to be coincident.  So
we must do the vertex comparison by point, rather than by pointer.

Bug: 860655
Change-Id: I89dc7526905bb5473206661348fee431371731a0
Reviewed-on: https://skia-review.googlesource.com/141523
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2018-07-16 17:57:19 +00:00
Timothy Liang
a80a012456 Revert "implemented metal gpu backend texture upload testing"
This reverts commit 36848f6b30.

Reason for revert: Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR failing.

Original change's description:
> implemented metal gpu backend texture upload testing
> 
> Bug: skia:
> Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71
> Reviewed-on: https://skia-review.googlesource.com/140248
> Commit-Queue: Timothy Liang <timliang@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,ethannicholas@google.com,timliang@google.com

Change-Id: Idf40fc78b82aec1efbcc64221b6d2bbf63353960
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/141182
Reviewed-by: Timothy Liang <timliang@google.com>
Commit-Queue: Timothy Liang <timliang@google.com>
2018-07-13 19:19:45 +00:00
Timothy Liang
36848f6b30 implemented metal gpu backend texture upload testing
Bug: skia:
Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71
Reviewed-on: https://skia-review.googlesource.com/140248
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-07-13 18:38:14 +00:00
Robert Phillips
4a17501f5b Revert "update SkColor4f::FromColor() to preserve transfer function"
This reverts commit 9e229233a6.

Reason for revert: See if blocking Android roll

Original change's description:
> update SkColor4f::FromColor() to preserve transfer function
> 
> This kills off some sRGB tables,
> and lots of call sites can now use SkColor4f::FromColor().
> 
> It doesn't seem important to keep this test.
> 
> Change-Id: Ia79ec8ace45e80bbc7a1e33f560f59289e61b2fb
> Reviewed-on: https://skia-review.googlesource.com/141046
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I9d76e4ccf8a101853a7404abb33bdab9e0c64c25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/141181
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-07-13 13:19:04 +00:00
Herb Derby
8a6348e6d2 Introduce text blob processing but don't wire it up
Have all the old code paths start using lists in preparation
for introducing text blobs.

Change-Id: I65cc02ee3da63bc3c9492db78a08b0eee3b1f931
Reviewed-on: https://skia-review.googlesource.com/141081
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-13 03:21:54 +00:00
Stephen White
1c5fd18927 GrTessellator: missing intersection rewind fix.
Some "missing" intersections (see
https://skia.googlesource.com/skia/+/89042d5f13a56d6b663657aa58f17593123a344e)
cause the active edge list to go out of order. In that case, we need
to rewind the active list, just as we do before edge splitting for
regular intersections.

BUG=860453

Change-Id: I1f7b32157a73b427a4fd94c14c1eb440f26c0743
Reviewed-on: https://skia-review.googlesource.com/141038
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2018-07-13 03:00:24 +00:00