Commit Graph

9497 Commits

Author SHA1 Message Date
Brian Salomon
bc233135e4 Get EGLimage functions out of GrGLInterface.
Only used in test code which can just directly call these.

Also removed related code in interface assemble/validate generator.

Change-Id: I7e821ebb9328bdd2a54d8ab3af929399ca0517d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213480
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-15 16:29:18 +00:00
Mike Klein
945d1e538c simplify rtree loops in Skia too
Sorry for yanking you around on whether on not this is worth doing.
Seems like SkRTrees are going to stick around for now for Flutter,
so I think we might as well keep both implementations up to date.

This ripples out a little further than in Chromium, as the math we're
deleting here was the only use of the aspect ratio of the passed-in
bounds, that itself the only use of those bounds themselves.  So we can
un-plumb all that too.  I'd still like to see how much we can minimize
the need for those user-provided bounds at all, especially when we're
calculating them all here.

Change-Id: Iea07e8e3d23a4dd31da8bcde512b24caabc96a10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213840
Reviewed-by: James Bankoski <jimbankoski@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 15:42:10 +00:00
Ben Wagner
21bca28bda Move SkMessageBus.h into src/core
Not used by anything else in the include directory, probably don't want
to accidentially expose it either.

Change-Id: I50d255e2cac43d8405305a825fd194bb36edd8fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213826
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-15 15:33:48 +00:00
Michael Ludwig
6e17f1d4d1 Revert "Clear and discard stencil buffers on tilers"
This reverts commit 7b2c85577d.

Reason for revert: nanobench hangs on chromebook bots during mipmap regeneration

Original change's description:
> Clear and discard stencil buffers on tilers
>
> Bug: skia:
> Change-Id: I42e99cb75567825ac7751fc0ec56e4c45132628b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210425
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com

Change-Id: I69e04c4797b6bde934d86c83bf0348c8abadcfc3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213824
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-05-15 15:17:19 +00:00
Ben Wagner
8bd6e8f198 Move SkTSearch.h into src.
No public headers are using it anymore, so move it from include/private
into src/core where SkTSearch.cpp resides.

Change-Id: I4499c629487ff1b8c391b44708616d67567a3e9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213674
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-15 14:15:07 +00:00
Mike Klein
ad44dd500f preserve comments past the #include ""
Tacking on parts[2] lets us keep things like IWYU comments

    #include "something.h" // IWYU pragma: keep

Rerun the script too... not much interesting.

Change-Id: I9f02c81ffece0ecf3e99730d4a12d49e01417ddc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213697
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>
2019-05-14 19:35:34 +00:00
Mike Klein
046ecb1b5e remove SkMiniPicture and co.
This was an optimization for Chromium that I believe is no longer
relevant in a world of PaintOpBuffers.

Change-Id: Ic7526715a0ef1c3cec387a44189b7d56d5107af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213680
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-14 19:19:44 +00:00
Chris Dalton
7b2c85577d Clear and discard stencil buffers on tilers
Bug: skia:
Change-Id: I42e99cb75567825ac7751fc0ec56e4c45132628b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210425
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-05-14 18:47:44 +00:00
Herb Derby
8fae51b699 Introduce SkStrikeSpecStorage.
SkStrikeSpecStorage is the centralized class for creating different sets of
SkScalerContextRecs/Effects for different text rendering methods.

It is initailly called SkStrikeSpecStorage, but as a last stage will be
renamed to SkStrikeSpec as it encompasses the current functionality of
the existing SkStrikeSpec.

I'm breaking up a much larger prototype for this CL and several
following CLs. The prototype is at:

https://skia-review.googlesource.com/c/skia/+/209109

Change-Id: I617eaae6fcb4b0b29914c3f1a82c52c81d81aabe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212733
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-13 21:01:47 +00:00
Herb Derby
9b86955c65 Add thread safety annotations for SkMutex
Introduce SkAutoMutexExclusive for SkMutex RAII.

Unsubclass SkMutex from SkBaseMutex to allow annotations
for class field mutexes separate from global mutexes.

Leave SkAutoMutexAcquire for handling global mutexes using
SkBaseMutex.

Test using GrSingleOwner.h.

Change-Id: I19d9d0ae0d05206cbb6ef137dc362969048c9c07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213136
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-05-13 15:44:33 +00:00
Robert Phillips
9dbcdcc8ba Alter createTestingOnlyBackendTexture methods
This intended to bring this API more into line with the proposed GrBackendObject API with an eye towards replacing the former with the latter.

TBR=bsalomon@google.com
Change-Id: I4367f03fb10fff788749f21c4843060111a6df1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-13 15:39:33 +00:00
Mike Reed
617d801ff7 Reland "Reland "remove legacy 255-biased colormatrix""
This reverts commit 7cf4242f8a.

Reason for revert: flutter in google3 updated

Original change's description:
> Revert "Reland "remove legacy 255-biased colormatrix""
> 
> This reverts commit b75be23bc4.
> 
> Reason for revert: Flutter also appears to be using this
> 
> third_party/flutter_engine/lib/ui/painting/paint.cc:95:32: error: no member named 'MatrixRowMajor255' in 'SkColorFilters'
>         return SkColorFilters::MatrixRowMajor255(decoded.data());
> 
> Original change's description:
> > Reland "remove legacy 255-biased colormatrix"
> > 
> > This reverts commit 34d286a6d7.
> > 
> > Reason for revert: google3 sites updated (hopefully)
> > 
> > Original change's description:
> > > Revert "remove legacy 255-biased colormatrix"
> > > 
> > > This reverts commit ec654f7397.
> > > 
> > > Reason for revert: Seems to be breaking the Google3 roll
> > > 
> > > Original change's description:
> > > > remove legacy 255-biased colormatrix
> > > > 
> > > > Bug: skia:4872
> > > > Bug: skia:9012
> > > > 
> > > > Change-Id: I7c1ac4e94405404fcb13079b5b578a5a26aad02e
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210628
> > > > Reviewed-by: Mike Reed <reed@google.com>
> > > > Commit-Queue: Mike Reed <reed@google.com>
> > > > Auto-Submit: Mike Reed <reed@google.com>
> > > 
> > > TBR=reed@google.com
> > > 
> > > Change-Id: Ib51de4f5a3f5d28b4870ca61fff43cce96e7426f
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:4872, skia:9012
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211587
> > > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > 
> > TBR=robertphillips@google.com,reed@google.com
> > 
> > Change-Id: I60e966eb05a092c2b590f819db5bacc1fe6db5db
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:4872, skia:9012
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211643
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=robertphillips@google.com,reed@google.com
> 
> Change-Id: I6f0852e6c6c7d7dc38e51112d9e01cd302447772
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:4872, skia:9012
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211655
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,reed@google.com

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

Bug: skia:4872, skia:9012
Change-Id: Ife10b97b48cc6ab214a1bdeb0c990f629f5c3bc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213420
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-05-13 12:57:41 +00:00
Brian Salomon
ab32f65653 Add SkSurface::asyncReadPixels()
Initial version. Current limitations: No Metal support, no color space
conversions, for each src color type only one dst color type is legal (
which may or may not be the src color type), no alpha type conversions.

Bug: skia:8962

Change-Id: I6f046a32342b8f5ffb1799d67d7ba15c250ef9bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212981
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-10 19:13:07 +00:00
Herb Derby
a1b7be612c Add thread safety annotations.
Start out with spinlock. I tried to be more extensive, but some
of our abstractions confused the analysis. Will expand further
in following CLs.

Change-Id: I3e320c957d8ef427065a2b7e7d2187b7c6b0aef1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213060
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-05-10 13:40:38 +00:00
Greg Daniel
797efcac71 Add option to GrContext::flush for GrPrepareForExternalIORequests.
This will allow clients to specify a set of SkImages and SkSurfaces that they
want transitioned to a state which they can use for their own external IO.
Specifically for Vulkan this will move the surface and images back to the queues
in which they were originally wrapped or created with.

Bug: skia:8802
Change-Id: I6a76c4c4a333a8e752632d349899f5fd9921329d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210460
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-09 18:50:06 +00:00
Brian Salomon
f9a1fdf01f Reland "Add flush() to SkImage."
This reverts commit 693bc2bae5.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Add flush() to SkImage."
>
> This reverts commit d0503a72ac.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Add flush() to SkImage.
> >
> > This allows a client to ensure all uses of a texture-backed image have
> > been flushed.
> >
> > Does nothing if the image isn't texture-backed.
> >
> > The implementation adds support for triggering a flush if any of a set
> > of proxies are used rather than just a single proxy.
> >
> > Change-Id: I358882d9737e63c6e69b924c0767f49b8f8f36ec
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212405
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: Ie376bf4225307f45b8fb3eb4a63bf84702365797
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212884
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Idcba378ce2e3af0af9d0eef35737670055539ec5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212960
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-05-09 15:07:51 +00:00
Brian Salomon
693bc2bae5 Revert "Add flush() to SkImage."
This reverts commit d0503a72ac.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add flush() to SkImage.
> 
> This allows a client to ensure all uses of a texture-backed image have
> been flushed.
> 
> Does nothing if the image isn't texture-backed.
> 
> The implementation adds support for triggering a flush if any of a set
> of proxies are used rather than just a single proxy.
> 
> Change-Id: I358882d9737e63c6e69b924c0767f49b8f8f36ec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212405
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ie376bf4225307f45b8fb3eb4a63bf84702365797
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212884
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-05-09 13:48:08 +00:00
Brian Salomon
d0503a72ac Add flush() to SkImage.
This allows a client to ensure all uses of a texture-backed image have
been flushed.

Does nothing if the image isn't texture-backed.

The implementation adds support for triggering a flush if any of a set
of proxies are used rather than just a single proxy.

Change-Id: I358882d9737e63c6e69b924c0767f49b8f8f36ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212405
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-09 13:36:07 +00:00
Ben Wagner
51e15a69ce Use SkTextEncoding enum instead of macros.
Change-Id: I4b6259590fa0693ee0522b4999a1c0fe250b173d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212504
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-07 20:54:16 +00:00
Ben Wagner
07dad1bc42 Fix some documentation for SkFont.
In particular, linear metrics now means 'linearly scalable metrics' as
expected. This also makes the documentation for the setter and getter
for subpixel positioning agree.

Change-Id: I08f5009f32516a0fdaecefc1d7dbe5f43c005a69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212406
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-07 16:54:10 +00:00
Brian Salomon
b0d8b76c4f Make finish flush procs work with GL.
This will be required for async readback support.

This is implemented using sync objects when available and otherwise
calls glFinish.

Relaxes the unit test requirement that providing a callback with no
work to flush always calls the proc immediately.

Bug: skia:8962
Change-Id: Ieefcab6dccc3924e50260343f01904e7303bb12b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212198
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-05-07 10:35:38 +00:00
Kevin Lubick
d6b32ed39d [img-decode] Start on proposed new spec
This adds readPixel and a partial stub of window.createImageData

Change-Id: Iee992312b9331b71852fe2198f844a7e4ae9e963
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211344
Reviewed-by: Mike Reed <reed@google.com>
2019-05-06 17:39:19 +00:00
Brian Osman
5e7fbfd9b0 Add ShaderErrorHandler to GrContextOptions
Allows clients to customize behavior when shaders fail to compile.
Added nicer shader error handling to viewer.

Change-Id: If82b48e40d64fd786f37e88c564fd623b53c7f9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211361
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-06 16:29:13 +00:00
Hal Canary
c2f260ad78 SkColors: Fix new color constants
Change-Id: I4ed40624f64aada1163585aa2a8bd0b643b2ccec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211992
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-05-03 16:50:46 +00:00
Ben Wagner
0b9b1f1847 IWYU for SkTLogic.h
Noticed that there was an include for <array> in there that didn't make
a lot of sense, so cleaned up the others which are hanging around from
older code which was in there.

Change-Id: I77acbb0914989e9bf67ab74dfd842a798ea592f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206172
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-02 21:17:37 +00:00
skia-autoroll
752b740ed6 Roll skia/third_party/skcms 668026c511f3..853f66269c16 (2 commits)
https://skia.googlesource.com/skcms.git/+log/668026c511f3..853f66269c16

2019-05-02 brianosman@google.com Remove headers from gni source lists
2019-05-02 brianosman@google.com Remove non-explicit endian 16-bit pixel format aliases


The AutoRoll server is located here: https://autoroll.skia.org/r/skcms-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-blink-rel
TBR=ethannicholas@google.com,mtklein@google.com

Change-Id: I06c0b83cfa584618dafc270f14fdcf8460d87b91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211840
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-05-02 20:33:17 +00:00
Hal Canary
0a7b393e32 SkPaint: new constructor
Change-Id: I5033070bf5d52571869a687387b4f4fc6dddfdd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211597
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-05-02 19:52:07 +00:00
Mike Reed
68eb8c2763 remove deprecated postTranslate255
Change-Id: Id2bdf73b5111c34f0ed1f36da85548a942568dcb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211595
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-05-02 17:28:53 +00:00
Robert Phillips
7cf4242f8a Revert "Reland "remove legacy 255-biased colormatrix""
This reverts commit b75be23bc4.

Reason for revert: Flutter also appears to be using this

third_party/flutter_engine/lib/ui/painting/paint.cc:95:32: error: no member named 'MatrixRowMajor255' in 'SkColorFilters'
        return SkColorFilters::MatrixRowMajor255(decoded.data());

Original change's description:
> Reland "remove legacy 255-biased colormatrix"
> 
> This reverts commit 34d286a6d7.
> 
> Reason for revert: google3 sites updated (hopefully)
> 
> Original change's description:
> > Revert "remove legacy 255-biased colormatrix"
> > 
> > This reverts commit ec654f7397.
> > 
> > Reason for revert: Seems to be breaking the Google3 roll
> > 
> > Original change's description:
> > > remove legacy 255-biased colormatrix
> > > 
> > > Bug: skia:4872
> > > Bug: skia:9012
> > > 
> > > Change-Id: I7c1ac4e94405404fcb13079b5b578a5a26aad02e
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210628
> > > Reviewed-by: Mike Reed <reed@google.com>
> > > Commit-Queue: Mike Reed <reed@google.com>
> > > Auto-Submit: Mike Reed <reed@google.com>
> > 
> > TBR=reed@google.com
> > 
> > Change-Id: Ib51de4f5a3f5d28b4870ca61fff43cce96e7426f
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:4872, skia:9012
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211587
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> 
> TBR=robertphillips@google.com,reed@google.com
> 
> Change-Id: I60e966eb05a092c2b590f819db5bacc1fe6db5db
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:4872, skia:9012
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211643
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,reed@google.com

Change-Id: I6f0852e6c6c7d7dc38e51112d9e01cd302447772
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:4872, skia:9012
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211655
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-01 22:29:01 +00:00
Brian Osman
8518f2e56a Add an AssertOnShaderCompileFailure GrContextOption
Part of a multi-step plan:

1) Add this option (which is *not* GL specific).
2) Disable this in Chromium at context-creation.
3) Finish adding the shader error handler, with default
   behavior controlled via this flag, and remove Chromium
   driver checks from the corresponding code at the same time.

Change-Id: I7e50c8404a05c1f291f187cf48481d0cbb34066a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211646
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-05-01 18:48:44 +00:00
Mike Reed
b75be23bc4 Reland "remove legacy 255-biased colormatrix"
This reverts commit 34d286a6d7.

Reason for revert: google3 sites updated (hopefully)

Original change's description:
> Revert "remove legacy 255-biased colormatrix"
> 
> This reverts commit ec654f7397.
> 
> Reason for revert: Seems to be breaking the Google3 roll
> 
> Original change's description:
> > remove legacy 255-biased colormatrix
> > 
> > Bug: skia:4872
> > Bug: skia:9012
> > 
> > Change-Id: I7c1ac4e94405404fcb13079b5b578a5a26aad02e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210628
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > Auto-Submit: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com
> 
> Change-Id: Ib51de4f5a3f5d28b4870ca61fff43cce96e7426f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:4872, skia:9012
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211587
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,reed@google.com

Change-Id: I60e966eb05a092c2b590f819db5bacc1fe6db5db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:4872, skia:9012
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211643
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-05-01 17:46:14 +00:00
Robert Phillips
6db27c28c6 Reduce opList splitting by default in Skia
Local Skia and DDL recording will always attempt to reduce opList splitting.
Android, Flutter, Google3 and non-DDL Chrome will not.

Note that this is a bit aggressive. Intermediate flushes based on memory usage have not yet been implemented.

The plan is to run this locally in Skia until the next Chrome branch and then enable it everywhere else (when intermediate flushes have been implemented).

OpList splitting reduction in Chrome is disabled in the following Chrome-side CL:

https://chromium-review.googlesource.com/c/chromium/src/+/1588756/ (Disable opList splitting reduction in Skia)

It is disabled in Android in:

https://googleplex-android-review.git.corp.google.com/c/platform/external/skia/+/7259923 (Update #defines to suppress Ganesh features in SkUserConfigManual.h)

It is disabled in Flutter and Google3 w/in this CL.

Change-Id: I59ff448d2c42629fab6cffccb2894d030c73431d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211101
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-05-01 15:24:08 +00:00
Robert Phillips
34d286a6d7 Revert "remove legacy 255-biased colormatrix"
This reverts commit ec654f7397.

Reason for revert: Seems to be breaking the Google3 roll

Original change's description:
> remove legacy 255-biased colormatrix
> 
> Bug: skia:4872
> Bug: skia:9012
> 
> Change-Id: I7c1ac4e94405404fcb13079b5b578a5a26aad02e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210628
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: Ib51de4f5a3f5d28b4870ca61fff43cce96e7426f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:4872, skia:9012
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211587
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-05-01 15:20:49 +00:00
Mike Reed
ec654f7397 remove legacy 255-biased colormatrix
Bug: skia:4872
Bug: skia:9012

Change-Id: I7c1ac4e94405404fcb13079b5b578a5a26aad02e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210628
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-05-01 13:50:48 +00:00
Mike Klein
159a959596 Revert "Temporarily revert runtime decoder registration."
This reverts commit bcbf9633db.

Next patch set implements a local shared spinlock
rather than depending on SkSharedMutex.

Next patch removes the thread safety and the unit test.

Original change's description:
> Temporarily revert runtime decoder registration.
>
> Some builds in Google3 can't find SkSharedMutex at link time.
>
> This reverts commit ff7006ff80.
> This reverts commit 05f45b21b7.
>
> Change-Id: I889e9a3169cf017b8d5daacf75099663fc996d73
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210785
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Change-Id: I6df8e2dfb64a92c780b62acddf7a797f24ba8e31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210792
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-30 17:34:12 +00:00
Chris Dalton
f91b755b34 Reland "ccpr: Set atlas proxy size to draw bounds rather than backing size"
This is a reland of 46d0f9aad1

Original change's description:
> ccpr: Set atlas proxy size to draw bounds rather than backing size
> 
> Bug: skia:
> Change-Id: I6605754ecc5377b1c25847fdda478f8246979a2f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209808
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Bug: skia:
Change-Id: Ic13317fd021843961989a79050735c225702ad45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211181
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-04-29 23:32:34 +00:00
Brian Osman
3d47f37cb5 Add skcms' LICENSE to include/third_party/skcms
Bug: skia:9031
Change-Id: I3b6fb817a63040911fe43378410f3baa7366e90e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211102
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-29 18:45:46 +00:00
Brian Osman
ea236bf818 Move skcms.h to include/third_party/skcms
Add a shim to redirect until clients are updated

Change-Id: Ib43614e5620b1a24ca18187c1646a8ed1a9ee7a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211003
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-29 15:02:45 +00:00
Robert Phillips
d425dee662 Enable opList sorting everywhere
This should have very little impact until we enable opList-splitting-reduction.

Change-Id: Iacc3d1b34c390b65b5ee185bcbdd118d5023aaa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210630
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-04-29 14:00:46 +00:00
Stan Iliev
4732dd3158 Fix C API example
Test: built and ran skia-c-example.c
Change-Id: I5691fa474f3efb6198c389180653ccded67e4f7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210633
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2019-04-28 01:09:13 +00:00
Mike Klein
bcbf9633db Temporarily revert runtime decoder registration.
Some builds in Google3 can't find SkSharedMutex at link time.

This reverts commit ff7006ff80.
This reverts commit 05f45b21b7.

Change-Id: I889e9a3169cf017b8d5daacf75099663fc996d73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210785
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-26 15:41:56 +00:00
Mike Reed
4e1b07e09f stage naming change in colorfilter
1. want to standardize on naming convention (matching shaders asA...)
2. want to eliminate legacy asColorMatrix with its 255 bias

Bug: skia:
Change-Id: I43258aa3a406b92a3246e13e5dd996fcc207c784
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210621
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-04-26 01:52:53 +00:00
Mike Klein
05f45b21b7 runtime registration for decoders
What do you think of this sort of thing for letting
users register codecs at runtime instead of at build time?

Change-Id: I448ea3466862326c283ad9b2f1b7eea56cffc80c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210449
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-04-25 21:43:12 +00:00
Chris Dalton
2185f39667 Revert "ccpr: Set atlas proxy size to draw bounds rather than backing size"
This reverts commit 46d0f9aad1.

Reason for revert: Didn't switch to GrTexture size for clipping ops.

Original change's description:
> ccpr: Set atlas proxy size to draw bounds rather than backing size
> 
> Bug: skia:
> Change-Id: I6605754ecc5377b1c25847fdda478f8246979a2f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209808
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,csmartdalton@google.com

Change-Id: I9ea5f9939e7e7fe498a165a71a71b0a6e28cff6c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210424
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-04-25 17:44:50 +00:00
Robert Phillips
10d172169f Remove GrInternalSurfaceFlags::kNoPendingIO as it is no longer needed
Since explicit allocation is always enabled now, the resource allocator explicitly manages reuse of GrSurfaces and this flag isn't used/needed.

Change-Id: I5703bf4624e21f9aff9da76575f4ef757b1d2589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-04-25 13:37:59 +00:00
Chris Dalton
46d0f9aad1 ccpr: Set atlas proxy size to draw bounds rather than backing size
Bug: skia:
Change-Id: I6605754ecc5377b1c25847fdda478f8246979a2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209808
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-04-25 00:25:04 +00:00
Mike Klein
f0a5369d0c cut SK_SAMPLES_FOR_X, simplify SK_?32_SHIFT
SK_SAMPLES_FOR_X doesn't do anything other than set the SK_?32_SHIFT
macros, so we can just set them instead, and further we can derive
everything we need from SK_R32_SHIFT.

Change-Id: I766d00c868da04939208353d09201f189a99c0c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210121
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-04-24 20:58:58 +00:00
Mike Klein
b45d86256a flip static initializer default
Disallowing static global initializers is more Skia-user friendly.

Does it make sense to nest these both together under is_skia_dev_build
(built from our GN tree && !is_official_build)?  Seems like maybe we
can also do the Android TODO?

Change-Id: I882f917c1a8156102ecc9cec58d2aba638015b9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210210
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-24 20:15:48 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Hal Canary
0c22997075 SkTInternalLList: remove SkPtrWrapper, SkNoncopyable
Change-Id: I24fb1c38eb4cd9ec27b81a4e0010b1268442a29f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210063
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-04-24 14:34:00 +00:00