Commit Graph

8169 Commits

Author SHA1 Message Date
Brian Osman
44b61204d9 Add 1010102 support to Ganesh
Adds gl1010102, gles1010102, vk1010102, and mtl1010102
configs to DM.

This uses the same saveLayer approach as CPU, switching
to 8888 so that we have enough alpha precision.

Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb
Reviewed-on: https://skia-review.googlesource.com/110500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-03-01 18:34:35 +00:00
Robert Phillips
4bc7011802 Separate creation time & flush time behavior in GrDrawOpAtlas (take 3)
This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache.

For the GrDrawOpAtlas:
  At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated.

  The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush

  GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time.

  During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive.

The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas
  It now carries a GrProxyProvider for when it needs to create an atlas
  It passes in a GrResourceProvider* at flush time to allow instantiation.

  It does not, yet, allocate that GrDrawOpAtlases it might ever require.

TBR=bsalomon@google.com
Change-Id: I276d339d81e7b709140e082a7b58c5584f73ab70
Reviewed-on: https://skia-review.googlesource.com/111100
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-03-01 15:47:34 +00:00
Cary Clark
65e409faca make SkDestinationSurfaceColorMode private
R=brianosman@google.com, reed@google.com
Bug: skia:
Change-Id: Ibbf91a664cc504737137717d9170ce4de09b017c
Reviewed-on: https://skia-review.googlesource.com/111161
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-02-28 20:31:33 +00:00
Jim Van Verth
a556684b10 Remove deprecated drawShadow interfaces
Bug: skia:7263
Change-Id: I90fcc35e8d070b324287139ebecc3d15dbec0137
Reviewed-on: https://skia-review.googlesource.com/109164
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-02-28 19:07:29 +00:00
Robert Phillips
ba7a165194 Revert "Revert "Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)"""
This reverts commit 934c3d0c54.

Reason for revert: Chrome

Original change's description:
> Revert "Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)""
> 
> This reverts commit 84d823a5e2.
> 
> Reason for revert: The DFT diffs don't repro on Windows so I'm chalking it up to minor device differences
> 
> Original change's description:
> > Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)"
> > 
> > This reverts commit 96165ebeaa.
> > 
> > Reason for revert: DFT GMs w/ LCD text are slightly different
> > 
> > Original change's description:
> > > Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)
> > > 
> > > This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache.
> > > 
> > > For the GrDrawOpAtlas:
> > >   At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated.
> > > 
> > >   The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush
> > > 
> > >   GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time.
> > > 
> > >   During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive.
> > > 
> > > The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas
> > >   It now carries a GrProxyProvider for when it needs to create an atlas
> > >   It passes in a GrResourceProvider* at flush time to allow instantiation.
> > > 
> > >   It does not, yet, allocate that GrDrawOpAtlases it might ever require.
> > > 
> > > Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc
> > > Reviewed-on: https://skia-review.googlesource.com/109749
> > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > 
> > TBR=jvanverth@google.com,robertphillips@google.com
> > 
> > Change-Id: I62efc61c8394477e54d6e79fa2f65180c91a4515
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/110220
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> 
> TBR=jvanverth@google.com,robertphillips@google.com
> 
> Change-Id: I7c87b4523f9b53285f0de5c2d741a25893522d9a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/110221
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

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

Change-Id: I7dd73ab0159f38595f21b21eef3becc10aa0934d
Reviewed-on: https://skia-review.googlesource.com/111080
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-28 17:42:11 +00:00
Robert Phillips
5c56af1790 Revert "Fission GrAtlasGlyphCache in two"
This reverts commit acf17904d6.

Reason for revert: Chrome

Original change's description:
> Fission GrAtlasGlyphCache in two
> 
> This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager.
> 
> The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager)
> and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation
> time and provides access to the proxies backing the atlases. The full GrAtlasManager is
> only available at flush time and allows instantiation of the proxies and uploading to them.
> 
> In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the
> GrAtlasManager in the main thread. This future atlas manager will have had all of its
> GrDrawOpAtlases created (but not instantiated) so there should be no race conditions.
> 
> Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08
> Reviewed-on: https://skia-review.googlesource.com/108001
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I7c760ea1a9f041a310b96d552aa1497ee5902cd8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/111040
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-28 16:37:47 +00:00
Robert Phillips
0551818a01 Revert "Move atlas manager creation to GrContext derived classes"
This reverts commit e5b7ceeac8.

Reason for revert: Breaking Mus/Viz tests in Chrome roll

Original change's description:
> Move atlas manager creation to GrContext derived classes
> 
> This CL relies on: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two)
> 
> TBR=bsalomon@google.com
> Change-Id: Ic3f91cea2238221b970f8ebbda99b10202925cd8
> Reviewed-on: https://skia-review.googlesource.com/110621
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I3973463b7b837145d9732171a91d82f0f0cea148
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/110821
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-28 14:19:16 +00:00
Brian Salomon
3d86a19f42 Refactor GrCaps::renderTargetWritePixelsSupported to support for some GL workarounds
Make indirect path in writeSurfacePixels2 use a copy rather than a draw.

Fix issue in GrVkGpu where render target dirty region is not updated after copy-as-draw

Remove unnecessary resolve of MSAA RT in GrVkCopyManager.

Splits WritePixelsNonTexture_Gpu test into MSAA and non-MSAA variants. MSAA variant blacklisted
on Adreno because of:

Bug: skia:7663

~~~~~~AND~~~~~~~

Revert "Suppress CopySurface test on Nexus 7"

This reverts commit b42b6169d5.

Bug: skia:7658
Change-Id: I8337d718efb41e266537744bbf5ff8b1545322a7
Reviewed-on: https://skia-review.googlesource.com/110700
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-28 03:14:25 +00:00
Robert Phillips
e5b7ceeac8 Move atlas manager creation to GrContext derived classes
This CL relies on: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two)

TBR=bsalomon@google.com
Change-Id: Ic3f91cea2238221b970f8ebbda99b10202925cd8
Reviewed-on: https://skia-review.googlesource.com/110621
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-28 00:20:06 +00:00
Robert Phillips
acf17904d6 Fission GrAtlasGlyphCache in two
This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager.

The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager)
and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation
time and provides access to the proxies backing the atlases. The full GrAtlasManager is
only available at flush time and allows instantiation of the proxies and uploading to them.

In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the
GrAtlasManager in the main thread. This future atlas manager will have had all of its
GrDrawOpAtlases created (but not instantiated) so there should be no race conditions.

Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08
Reviewed-on: https://skia-review.googlesource.com/108001
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-02-27 22:05:55 +00:00
Mike Reed
bb586b2eeb fix crasher in path-->region
Bug: skia:7491
Change-Id: I7e8b9fbe43098094d5935331107c3f40fb6971ec
Reviewed-on: https://skia-review.googlesource.com/110721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2018-02-27 21:03:49 +00:00
Cary Clark
7595939168 updated includes
update includes to latest
bookmaker docs

TBR=reed@google.com
Bug: skia:6898
Change-Id: If42ab25f98a0f0d8b410ae30ca1cd641e19ce89f
Reviewed-on: https://skia-review.googlesource.com/107021
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-02-27 16:37:39 +00:00
Brian Salomon
5f33a8ccac Start on new GPU pixel ops implementation.
The new ops attempt to be less optimal by falling back to CPU conversions
rather than relying on intermediate draws and complex coordination between
GrContext and GrGpu to determine how conversions are performed.

This adds the new writePixels implementation.

Change-Id: I7496d86d5a40277ed2ca63668881c160e54d80d3
Reviewed-on: https://skia-review.googlesource.com/109880
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-26 20:43:18 +00:00
Jim Van Verth
a947e29bfd Add some additional checks for shadow generation
Change-Id: I4dae4173ad879827e4e1fa3ad12aa0447d1df252
Reviewed-on: https://skia-review.googlesource.com/110360
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-02-26 20:02:38 +00:00
Greg Daniel
8385a8a44b Revert "Revert "Fixes to alignment issues with regards to mapped vulkan memory.""
This reverts commit 88fdee9bde.

Reason for revert: Pre Fixes landed in other repos

Original change's description:
> Revert "Fixes to alignment issues with regards to mapped vulkan memory."
> 
> This reverts commit 9fb6cf4c49.
> 
> Reason for revert: breaks fuchsia
> 
> Original change's description:
> > Fixes to alignment issues with regards to mapped vulkan memory.
> > 
> > Bug: skia:
> > Change-Id: Ida9813fe774580a6d157b8eb8d330488c8e8c4bc
> > Reviewed-on: https://skia-review.googlesource.com/109483
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> 
> TBR=djsollen@google.com,egdaniel@google.com,jvanverth@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: skia:
> Change-Id: If1223313cab27737ada401d1f3fe4b7ab849d03f
> Reviewed-on: https://skia-review.googlesource.com/110040
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: skia:
Change-Id: Ifeebf535c3617674846f7ef25e686ee11ceee65c
Reviewed-on: https://skia-review.googlesource.com/110160
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-26 18:59:38 +00:00
Robert Phillips
934c3d0c54 Revert "Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)""
This reverts commit 84d823a5e2.

Reason for revert: The DFT diffs don't repro on Windows so I'm chalking it up to minor device differences

Original change's description:
> Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)"
> 
> This reverts commit 96165ebeaa.
> 
> Reason for revert: DFT GMs w/ LCD text are slightly different
> 
> Original change's description:
> > Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)
> > 
> > This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache.
> > 
> > For the GrDrawOpAtlas:
> >   At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated.
> > 
> >   The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush
> > 
> >   GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time.
> > 
> >   During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive.
> > 
> > The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas
> >   It now carries a GrProxyProvider for when it needs to create an atlas
> >   It passes in a GrResourceProvider* at flush time to allow instantiation.
> > 
> >   It does not, yet, allocate that GrDrawOpAtlases it might ever require.
> > 
> > Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc
> > Reviewed-on: https://skia-review.googlesource.com/109749
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> 
> TBR=jvanverth@google.com,robertphillips@google.com
> 
> Change-Id: I62efc61c8394477e54d6e79fa2f65180c91a4515
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/110220
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I7c87b4523f9b53285f0de5c2d741a25893522d9a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/110221
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-26 16:49:28 +00:00
Robert Phillips
84d823a5e2 Revert "Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)"
This reverts commit 96165ebeaa.

Reason for revert: DFT GMs w/ LCD text are slightly different

Original change's description:
> Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)
> 
> This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache.
> 
> For the GrDrawOpAtlas:
>   At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated.
> 
>   The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush
> 
>   GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time.
> 
>   During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive.
> 
> The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas
>   It now carries a GrProxyProvider for when it needs to create an atlas
>   It passes in a GrResourceProvider* at flush time to allow instantiation.
> 
>   It does not, yet, allocate that GrDrawOpAtlases it might ever require.
> 
> Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc
> Reviewed-on: https://skia-review.googlesource.com/109749
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I62efc61c8394477e54d6e79fa2f65180c91a4515
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/110220
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-26 16:03:58 +00:00
Robert Phillips
96165ebeaa Separate creation time & flush time behavior in GrDrawOpAtlas (take 2)
This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache.

For the GrDrawOpAtlas:
  At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated.

  The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush

  GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time.

  During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive.

The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas
  It now carries a GrProxyProvider for when it needs to create an atlas
  It passes in a GrResourceProvider* at flush time to allow instantiation.

  It does not, yet, allocate that GrDrawOpAtlases it might ever require.

Change-Id: Ie9b64b13e261b01ee14be09fbf7e17841b7781dc
Reviewed-on: https://skia-review.googlesource.com/109749
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-26 14:56:17 +00:00
Greg Daniel
88fdee9bde Revert "Fixes to alignment issues with regards to mapped vulkan memory."
This reverts commit 9fb6cf4c49.

Reason for revert: breaks fuchsia

Original change's description:
> Fixes to alignment issues with regards to mapped vulkan memory.
> 
> Bug: skia:
> Change-Id: Ida9813fe774580a6d157b8eb8d330488c8e8c4bc
> Reviewed-on: https://skia-review.googlesource.com/109483
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

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

Bug: skia:
Change-Id: If1223313cab27737ada401d1f3fe4b7ab849d03f
Reviewed-on: https://skia-review.googlesource.com/110040
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-25 14:00:39 +00:00
Greg Daniel
9fb6cf4c49 Fixes to alignment issues with regards to mapped vulkan memory.
Bug: skia:
Change-Id: Ida9813fe774580a6d157b8eb8d330488c8e8c4bc
Reviewed-on: https://skia-review.googlesource.com/109483
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-02-23 20:17:16 +00:00
Chris Dalton
2612baecd8 ccpr: Prefer atlas sizes under 4k on ARM
Bug: skia:
Change-Id: Ib5afb84647efe2e64a3ec2f9da422b39228431e9
Reviewed-on: https://skia-review.googlesource.com/108871
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-22 21:06:05 +00:00
Mike Reed
242135a402 move some RRect methods into priv
also, return radii by value instead of reference, in possible prep for changing underlying representation

Bug: skia:7649
Change-Id: Iff42a49c53cc48171fc63462be366cc3500b2273
Reviewed-on: https://skia-review.googlesource.com/109385
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-22 19:09:10 +00:00
Robert Phillips
59ddc6d5ee Revert "Separate creation time & flush time behavior in GrDrawOpAtlas"
This reverts commit 056c1a821a.

Reason for revert: GM issues

Original change's description:
> Separate creation time & flush time behavior in GrDrawOpAtlas
> 
> This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache.
> 
> For the GrDrawOpAtlas:
>   At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated.
> 
>   The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush
> 
>   GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time.
> 
>   During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive.
> 
> The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas
>   It now carries a GrProxyProvider for when it needs to create an atlas
>   It passes in a GrResourceProvider* at flush time to allow instantiation.
> 
>   It does not, yet, allocate that GrDrawOpAtlases it might ever require.
> 
> Change-Id: I54909b7a3ba4bec2db5f1218f6a2a3a1636f66d6
> Reviewed-on: https://skia-review.googlesource.com/108520
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I36eafe46209380f533aa84e831d1c9d18844b6be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/109280
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-21 21:56:47 +00:00
Mike Reed
267ecccfed change path serialization version to 4
New format should be much simpler:
- only store public data (e.g. points, verbs, filltype)
- deserialize just uses public APIs

Refactor reading code to manage different (older) versions, to make
it clear (hopefully) what we can delete when we can abandon version
3 support.

Bug: skia:
Change-Id: I30465f891cba3f044ae1cb2c13c04f04fdc9da78
Reviewed-on: https://skia-review.googlesource.com/109160
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-21 21:22:37 +00:00
Peng Huang
df285ce3be Fix the link error for component build
Bug: skia:
Change-Id: I670eeee09547edb46db498a9439c5d6066c6fe55
Reviewed-on: https://skia-review.googlesource.com/109106
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-21 19:49:16 +00:00
Robert Phillips
056c1a821a Separate creation time & flush time behavior in GrDrawOpAtlas
This CL clarifies what is going on in the GrDrawOpAtlas and GrAtlasGlyphCache.

For the GrDrawOpAtlas:
  At creation time all the allowed pages are created (with their backing GrTextureProxies) but they aren't instantiated.

  The GrDrawOpAtlas::instantiate call is called in preFlushCB and allocates any pages known to be needed at the start of flush

  GrDrawOpAtlas::addToAtlas is called at flush time and, if a new page is activated, will instantiated it at that time.

  During compaction, an unused page will be deInstantiated but its Plots and backing GrTextureProxy will remain alive.

The GrAtlasGlyphCache reflects the changes to the GrDrawOpAtlas
  It now carries a GrProxyProvider for when it needs to create an atlas
  It passes in a GrResourceProvider* at flush time to allow instantiation.

  It does not, yet, allocate that GrDrawOpAtlases it might ever require.

Change-Id: I54909b7a3ba4bec2db5f1218f6a2a3a1636f66d6
Reviewed-on: https://skia-review.googlesource.com/108520
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-02-21 19:46:56 +00:00
Mike Reed
cbb85a7275 remove deprecated method
Bug: skia:
Change-Id: Icd5c3b83c97f5039a530f87a3a813e4d9e9f8833
Reviewed-on: https://skia-review.googlesource.com/108662
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-02-20 21:41:44 +00:00
Robert Phillips
f3690dd416 Change signature of GrAtlasGlyphCache::getProxies
Split out of https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two)

TBR=bsalomon@google.com
Change-Id: I573730fdeddf178915eb5f5b8cf59a3ab29e0654
Reviewed-on: https://skia-review.googlesource.com/108441
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-20 21:16:53 +00:00
Mike Reed
0c3137c4f4 hide complex versions of isOval and isRRect
Bug: skia:
Change-Id: I9fa899d409470f424fdfbef5b0c3bb528bcce40e
Reviewed-on: https://skia-review.googlesource.com/108660
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-20 19:33:53 +00:00
Brian Salomon
c320b15768 Introduce GrColorType
This begins the journey towards using different types to refer to CPU data and GPU texture formats. This is one part of removing GrPixelConfig and more directly using GL/VK texture formats

GrColorType represents a particular layout of color/gray/alpha channels in CPU memory. It does not refer to texture formats or sRGB-encoding. It is basically SkColorType specialized to the GPU backend with some formats added and some removed.

Read/WritePixel interfaces use GrColorType to describe the CPU side of the transaction.

There's still a lot of punting to GrPixelConfig in API-specific code. There's a lot more to be done.

Bug: 6718
Bug: 7580

Change-Id: I8d813ae9a4416a06596f22a4b87da02091989718
Reviewed-on: https://skia-review.googlesource.com/107264
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-02-20 19:30:13 +00:00
Florin Malita
eb420457fd Add SkRect::contains(SkScalar x, SkScalar y)
Similar to its SkIRect counterpart.

Change-Id: I6872694d8602ed4181a1a15b4cd1c2c32aeab3f9
Reviewed-on: https://skia-review.googlesource.com/108506
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-02-20 17:57:53 +00:00
Chris Dalton
535ba8d2b8 Drop unused support for MSAA sample locations
Bug: skia:
Change-Id: I96f0c25732d79c5881e400b121e81c5696a747a6
Reviewed-on: https://skia-review.googlesource.com/107441
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-02-20 17:19:13 +00:00
Chris Dalton
7fe33c0a42 Drop unused shader support for multisample interpolation
Bug: skia:
Change-Id: Ie19f13877bf6828ab94ffbb20e6f74e0e376f6cb
Reviewed-on: https://skia-review.googlesource.com/107359
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-20 16:41:43 +00:00
Greg Daniel
2a30390ce6 Update createWrappedRenderTargetProxy with BackendRT to work with lazy proxies.
This change also triggered a bunch of side changes thanks to WrappedProxyTest
fixing/improving how we handle wrapped proxies in genernal.

Bug: skia:
Change-Id: I743a458923cff1c2e947627d0e9154a4c808a668
Reviewed-on: https://skia-review.googlesource.com/108102
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-20 15:32:33 +00:00
Mike Reed
a3d9e21f04 don't trust stored segment mask
Bug: skia:7604
Change-Id: I508bbdc006e1c6edce2006be0c43b037038c876b
Reviewed-on: https://skia-review.googlesource.com/108360
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-20 15:13:23 +00:00
Mike Reed
19d7bd6504 hide virtual and rename to onMakeComposed
Bug: skia:
Change-Id: Ic18ee2af3273f81ebec9c9031162e808186c0acd
Reviewed-on: https://skia-review.googlesource.com/108300
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-19 19:40:14 +00:00
Mike Reed
dfc0e910df add decal tilemode to shaders
Plenty more to follow-up:
- gradients
- gpu impl

Bug: skia:7638
Change-Id: I8e54fd0e24921f040f178c793b36c7fb855b136e
Reviewed-on: https://skia-review.googlesource.com/107420
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-16 23:19:47 +00:00
Chris Dalton
46563d1d91 Forward internal_private_accessTopLayerRenderTargetContext from SkPaintFilterCanvas
Fixes viewer slides that need direct access to Ganesh.

Bug: skia:
Change-Id: Icfdd814e53ce333f4a20353e8bc4dddde3cc72df
Reviewed-on: https://skia-review.googlesource.com/108020
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-02-16 20:10:47 +00:00
Greg Daniel
f6f7b67ac2 When creating emptyp MipMap proxies, don't instantiate them immediately. Attempt 3
original: https://skia-review.googlesource.com/106966

Bug: skia:
Change-Id: I779985cef2d3c4f36a0129d8ecedd12e510bec7e
Reviewed-on: https://skia-review.googlesource.com/107781
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-15 20:13:32 +00:00
Chris Dalton
602836138e Drop unused shader support for sample variables
Bug: skia:
Change-Id: I9e2b7da8c916703027d8dd4303ae67f4e69bcf87
Reviewed-on: https://skia-review.googlesource.com/107356
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-02-15 19:37:52 +00:00
Mike Reed
36c0b57698 use safe increment for edge walker
Bug: oss-fuzz:6126
Change-Id: I8f6865cbbbfbe37acf940cc2d4ae93204ba7168d
Reviewed-on: https://skia-review.googlesource.com/107783
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-15 17:14:19 +00:00
Greg Daniel
7080a431a7 Revert "Revert "Revert "When creating emptyp MipMap proxies, don't instantiate them immediately."""
This reverts commit 95edb43251.

Reason for revert: breaking Ubuntu Linux GMs

Original change's description:
> Revert "Revert "When creating emptyp MipMap proxies, don't instantiate them immediately.""
> 
> This reverts commit 0ee866dac7.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert "When creating emptyp MipMap proxies, don't instantiate them immediately."
> > 
> > This reverts commit 8242c5c199.
> > 
> > Reason for revert: Hitting assert on intel bots on skbug6850overlay2.skp, SkASSERT(proxy->getUniqueKey().isValid()); in processInvalidProxyUniqueKey
> > 
> > Original change's description:
> > > When creating emptyp MipMap proxies, don't instantiate them immediately.
> > > 
> > > This chnages makes it match how we handle non mipped proxies where we
> > > don't actually instantiate them until we need to.
> > > 
> > > Bug: skia:
> > > Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279
> > > Reviewed-on: https://skia-review.googlesource.com/106966
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > 
> > TBR=egdaniel@google.com,robertphillips@google.com
> > 
> > Change-Id: I1fa6165b69c5bbb1d6bb10abba33dcdb55a27ba3
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/107263
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,robertphillips@google.com
> 
> Bug: skia:
> Change-Id: Ice34283f9ac183faed6e061d8162cf2226b18289
> Reviewed-on: https://skia-review.googlesource.com/107320
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I53f166d508cc8ccd71e7473934a12a52f2eba7bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/107321
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-14 21:10:15 +00:00
Brian Salomon
9b009bb069 Prepare sRGB encoding conversion for the removal of GrPixelConfig
Standardizes that GrGpu subclass's onRead/WritePixels never do sRGB<->linear conversion. This means that they can eventually take a color type rather than config. It also means direct callers of GrGpu::read/writePixels can never expect conversion (which in practice is no change).

Consolidate logic about whether to do sRGB<->linear encoding conversions in GrContext::read/writeSurfacePixels helpers. No change in when conversions are done (yet). This prepares this logic to operate on SkColorSpace and color type rather than config WRT the CPU data.

Bug: skia:6718
Change-Id: I346d669624861578f1bb9ea465a7ab4b549117fa
Reviewed-on: https://skia-review.googlesource.com/105286
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-14 19:58:14 +00:00
Greg Daniel
95edb43251 Revert "Revert "When creating emptyp MipMap proxies, don't instantiate them immediately.""
This reverts commit 0ee866dac7.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "When creating emptyp MipMap proxies, don't instantiate them immediately."
> 
> This reverts commit 8242c5c199.
> 
> Reason for revert: Hitting assert on intel bots on skbug6850overlay2.skp, SkASSERT(proxy->getUniqueKey().isValid()); in processInvalidProxyUniqueKey
> 
> Original change's description:
> > When creating emptyp MipMap proxies, don't instantiate them immediately.
> > 
> > This chnages makes it match how we handle non mipped proxies where we
> > don't actually instantiate them until we need to.
> > 
> > Bug: skia:
> > Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279
> > Reviewed-on: https://skia-review.googlesource.com/106966
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=egdaniel@google.com,robertphillips@google.com
> 
> Change-Id: I1fa6165b69c5bbb1d6bb10abba33dcdb55a27ba3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/107263
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Bug: skia:
Change-Id: Ice34283f9ac183faed6e061d8162cf2226b18289
Reviewed-on: https://skia-review.googlesource.com/107320
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-14 19:55:24 +00:00
Robert Phillips
7d79e7b588 Use a lazy proxy in OnFlushCallbackTest to fulfill some old TODOs
Change-Id: I194e38c87c2f341f16a5048f02027165d7c28ae9
Reviewed-on: https://skia-review.googlesource.com/107022
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-14 16:31:47 +00:00
Greg Daniel
0ee866dac7 Revert "When creating emptyp MipMap proxies, don't instantiate them immediately."
This reverts commit 8242c5c199.

Reason for revert: Hitting assert on intel bots on skbug6850overlay2.skp, SkASSERT(proxy->getUniqueKey().isValid()); in processInvalidProxyUniqueKey

Original change's description:
> When creating emptyp MipMap proxies, don't instantiate them immediately.
> 
> This chnages makes it match how we handle non mipped proxies where we
> don't actually instantiate them until we need to.
> 
> Bug: skia:
> Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279
> Reviewed-on: https://skia-review.googlesource.com/106966
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I1fa6165b69c5bbb1d6bb10abba33dcdb55a27ba3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/107263
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-14 14:40:48 +00:00
Greg Daniel
8242c5c199 When creating emptyp MipMap proxies, don't instantiate them immediately.
This chnages makes it match how we handle non mipped proxies where we
don't actually instantiate them until we need to.

Bug: skia:
Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279
Reviewed-on: https://skia-review.googlesource.com/106966
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-14 14:07:47 +00:00
Robert Phillips
fc711a2b01 Add SkCharacterization creation helper to GrContextThreadSafeProxy (take 2)
TBR=bsalomon@google.com
Change-Id: Id96d4fdbb6889065f10a4a7e0c22a03ad9aa5fef
Reviewed-on: https://skia-review.googlesource.com/107000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-14 12:42:18 +00:00
Robert Phillips
ce5209a8a5 Make fully lazy proxies possess an origin
Change-Id: Icd3d68bce78568562aa12167a58b6d6e5064b124
Reviewed-on: https://skia-review.googlesource.com/106901
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-13 21:25:53 +00:00
Mike Reed
655bf8f022 saturate IPoint math, handle NaN in isEmpty
Bug: skia:7507
Change-Id: Ibdb40584effdea70e6499eab1bb64bb4b2260d06
Reviewed-on: https://skia-review.googlesource.com/106972
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-02-13 18:14:20 +00:00
Cary Clark
559823d1fe Revert "Add SkCharacterization creation helper to GrContextThreadSafeProxy"
This reverts commit d76e56d93c.

Reason for revert: broke NexusPlayer Vulkan

Original change's description:
> Add SkCharacterization creation helper to GrContextThreadSafeProxy
> 
> Change-Id: I8ad7cf335f2b586cf501eaa70573690fbbd53efa
> Reviewed-on: https://skia-review.googlesource.com/106105
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I72b75ff700d39839f7207955566e48bb544aaf6b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/106968
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-02-13 17:02:31 +00:00
Brian Osman
8a83ca4e9a Add "sharpen" option to SkSL, to LOD bias all textures
This adds a fixed bias (-0.5) to the computed LOD of all
mip-mapped texture fetches. (Technically, to all texture
fetches, but that only matters for mip-mapped ones).

Clients can opt-in with a new GrContextOption.

Bug: skia:7541
Bug: chromium:562162
Change-Id: Ie3cd0679c4ab66f62d2dc32e7e68e5c99355115e
Reviewed-on: https://skia-review.googlesource.com/106322
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-02-13 16:30:20 +00:00
Robert Phillips
d76e56d93c Add SkCharacterization creation helper to GrContextThreadSafeProxy
Change-Id: I8ad7cf335f2b586cf501eaa70573690fbbd53efa
Reviewed-on: https://skia-review.googlesource.com/106105
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-13 16:03:50 +00:00
Brian Osman
3fc79ea031 Remove image functions from GrGLInterface, part two
First part is at:
https://skia-review.googlesource.com/c/skia/+/106120

Change-Id: I52c79a8635dcfb9eaf4c70f3a48b11349f9540d5
Reviewed-on: https://skia-review.googlesource.com/106268
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-02-12 20:45:43 +00:00
Mike Reed
faffa86771 begin to wrap all float divides
Bug: skia:7607 skia:6134
Change-Id: Id126e92816bef1df1372bd531238cda9f3b36fab
Reviewed-on: https://skia-review.googlesource.com/106261
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-12 19:04:19 +00:00
Greg Daniel
d2d8e92e5e Remove tracking of SkDestinationSurfaceColorMode on GrTextureProxy for mips
When we create a new surface from a proxy we were always using legacy and
when we wrapped an existing surface we never actaully had to use the value
we pulled off of it since the proxy was already instantiatied.

Bug: skia:
Change-Id: Ifcb5f3ac2f1dcf41b01a98c554d682ae57028d5a
Reviewed-on: https://skia-review.googlesource.com/106207
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-12 18:51:28 +00:00
Kevin Lubick
2416f968a6 Add 2 fuzz targets for image decoding (oss-fuzz)
This also adds in a few small guards to prevent libfuzzer from frequently
running out of memory when an image claims to have billions of pixels.

Bug: skia:
Change-Id: I47a9daac832c4d85a42000698482b61721c38880
Reviewed-on: https://skia-review.googlesource.com/106264
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-02-12 15:25:59 +00:00
Mike Reed
0a5f99ccdf can't cheat on contains due to underflow
Bug: skia:
Change-Id: Ic7fc4e1b843f885a2d52cd54861679f6c500eff4
Reviewed-on: https://skia-review.googlesource.com/106267
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-10 02:37:31 +00:00
Greg Daniel
3081508215 Remove unused code resulted from deleting DeferredTextureImage
Bug: skia:
Change-Id: Iaedc09880bd6a2d8fda4ce52f1644a944dd72605
Reviewed-on: https://skia-review.googlesource.com/106266
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-02-10 01:22:11 +00:00
Mike Reed
1617899b67 add helper to know when a colortype is always opaque
Now that surface creation is more picky about its imageinfo, we need to
allow clients to know when they should clean-up their alphatype (like
our own gm)

Bug: skia:
Change-Id: Ic110c75769e0154a8343d7e2160d3351f02cf48f
Reviewed-on: https://skia-review.googlesource.com/106320
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-10 01:00:41 +00:00
Mike Reed
7fcfb62199 move a bunch of helpers from SkImageInfo.h into priv
Bug: skia:
Change-Id: I8c91cfdb89e4f22448d1201d391556fe43d86dca
Reviewed-on: https://skia-review.googlesource.com/105289
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-02-09 20:38:32 +00:00
Greg Daniel
3b2ebbb2d4 When querying mipmapped on proxies return targets state if possible
In the non-ddl world where we are still using lazy proxies, we may create
those proxies with no mipmaps, but when we instantiate them immediately we
end up getting a surface with mips. This allows future queries on that
proxy to take advatage of the fact that we actaully have mips.

For lazy ddl proxies, this makes it work in a world where we may decide to
uninstantiate the proxies and we continue to track the request mip level as
well as the actually one from instantiation.

Bug: skia:
Change-Id: I4824e74d5e2a2fdf860709c85469aa8cf74632d5
Reviewed-on: https://skia-review.googlesource.com/106121
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-09 16:14:51 +00:00
Brian Osman
426e6c5cba Remove (unused) NV_bindless_texture from GL interface
Change-Id: I232c200c30f348da4f61cd7d6d73f3f3b46e0770
Reviewed-on: https://skia-review.googlesource.com/105984
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-02-09 15:01:41 +00:00
Brian Salomon
67f8584b6f Revert "Revert "Remove SkImage deferred texture image data APIs.""
This reverts commit aae533e418.

Change-Id: I0434892d8946490a75e17620c49c594eaa18158e
Reviewed-on: https://skia-review.googlesource.com/100603
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-09 14:19:51 +00:00
Brian Osman
0ee0190173 Remove EXT_direct_state_access (unused)
Change-Id: I501fab7be512f5a0c4b26d666bbf883de4b73a59
Reviewed-on: https://skia-review.googlesource.com/105902
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-02-09 13:51:19 +00:00
Greg Daniel
457469c7a0 Make non-ddl lazy proxys clean-up and delete their callbacks immediately after instanstation.
This makes sure resources are released and free'd as soon as possible if we
no longer need them.

Bug: skia:
Change-Id: Ic216987649c54183f8cbbff90a633860a97754b3
Reviewed-on: https://skia-review.googlesource.com/105721
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-08 20:33:40 +00:00
Mike Reed
4c790bd7dd add writePixels to SkSurface --> so we can remove it from canvas
Bug: skia:
Change-Id: Ib35d7bdc113c3fd9f6dfacb42ec61aaa448cb165
Reviewed-on: https://skia-review.googlesource.com/105623
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-08 19:34:50 +00:00
Robert Phillips
a3f70261cc Switch MDB GrContextOptions over to Enable style
Change-Id: Id6541c346a13649c89ca3b9ccb13972976f9b973
Reviewed-on: https://skia-review.googlesource.com/105603
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-08 16:28:30 +00:00
Cary Clark
4f5a79c676 remove kRW_LegacyBitmapMode
experiment to see if there are any unknown dependencies
on kRW_LegacyBitmapMode

R=reed@google.com,fmalita@chromium.org,bungeman@google.com
Bug: skia:5615
Change-Id: I2cc578570ac18cd31c3520e1bd801f4a7a669347
Reviewed-on: https://skia-review.googlesource.com/105283
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-02-08 13:34:49 +00:00
Robert Phillips
4150eea6c4 Move control of explicit GPU resource allocation to GrContextOptions
Change-Id: Ic284acc79bab5936f0007d5ae5fb1e7a9929e2af
Reviewed-on: https://skia-review.googlesource.com/104880
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-08 12:36:29 +00:00
Robert Phillips
383c418ec9 Remove GrStencilAndCoverTextContext
TBR=bsalomon@google.com
Change-Id: Ibbb26e2ba74df43c3156f95bea258cda998500cb
Reviewed-on: https://skia-review.googlesource.com/105260
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-02-07 18:28:22 +00:00
Mike Klein
e083f7c9f2 Reland "remove SkCanvas::kIsOpaque_SaveLayerFlag"
This reverts the revert 9ff8c8c073.

Original:

    This is a performance-only hint that no one but fuzzers
    is using.  It's even explicitly filtered out in Android.

    The fuzzers have noticed they can trick us into allocating
    uninitialized memory and treating it as opaque, blending
    uninitialized pixels, etc.

    Since no one's using this, we can just kill the bit.

    Bug: skia:7566, chromium:808830

Docs-Preview: https://skia.org/?cl=105282
Change-Id: I4326c663f777aa373ff7ec9f319519da9729350d
Reviewed-on: https://skia-review.googlesource.com/105282
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-02-07 18:18:52 +00:00
Robert Phillips
8e546043c6 Revert "Re-enable explicit resource allocation in Skia (take 2)"
This reverts commit ed858ec095.

Reason for revert: Breaking some text GMs

Original change's description:
> Re-enable explicit resource allocation in Skia (take 2)
> 
> Unsurprisingly, given how we're adding them to the opList's deferredProxy list, a proxy can appear twice.
> 
> Change-Id: I474357a1c3ee8cedf51dbeffcd0e0a96f396375c
> Reviewed-on: https://skia-review.googlesource.com/103701
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I90aa30c37bfc506e5a8e4c2ccf3bd1b968fd9c5f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/105100
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-07 16:02:50 +00:00
Robert Phillips
ed858ec095 Re-enable explicit resource allocation in Skia (take 2)
Unsurprisingly, given how we're adding them to the opList's deferredProxy list, a proxy can appear twice.

Change-Id: I474357a1c3ee8cedf51dbeffcd0e0a96f396375c
Reviewed-on: https://skia-review.googlesource.com/103701
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-07 14:22:58 +00:00
Mike Klein
9ff8c8c073 Revert "remove SkCanvas::kIsOpaque_SaveLayerFlag"
This reverts commit 9a7a2ee5ad.

Reason for revert: still need to update blink_headless in Google3

Original change's description:
> remove SkCanvas::kIsOpaque_SaveLayerFlag
> 
> This is a performance-only hint that no one but fuzzers
> is using.  It's even explicitly filtered out in Android.
> 
> The fuzzers have noticed they can trick us into allocating
> uninitialized memory and treating it as opaque, blending
> uninitialized pixels, etc.
> 
> Since no one's using this, we can just kill the bit.
> 
> Bug: skia:7566, chromium:808830
> 
> Change-Id: Id74a85e51bc4d0907b4127eb9ac5b02576f8f0a7
> Reviewed-on: https://skia-review.googlesource.com/104441
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

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

Change-Id: I10d3c7e5184b9322715a5bfb6a7106292c8876a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7566, chromium:808830
Reviewed-on: https://skia-review.googlesource.com/104781
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-02-07 01:58:56 +00:00
Mike Klein
9a7a2ee5ad remove SkCanvas::kIsOpaque_SaveLayerFlag
This is a performance-only hint that no one but fuzzers
is using.  It's even explicitly filtered out in Android.

The fuzzers have noticed they can trick us into allocating
uninitialized memory and treating it as opaque, blending
uninitialized pixels, etc.

Since no one's using this, we can just kill the bit.

Bug: skia:7566, chromium:808830

Change-Id: Id74a85e51bc4d0907b4127eb9ac5b02576f8f0a7
Reviewed-on: https://skia-review.googlesource.com/104441
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-02-07 00:00:25 +00:00
Mike Reed
5dd202dc90 Revert "Revert "move GrColor.h to private, IWYU""
This reverts commit 63cc29304a.

Reason for revert: pdfium updated

Original change's description:
> Revert "move GrColor.h to private, IWYU"
> 
> This reverts commit e602f39581.
> 
> Reason for revert: Breaks PDFIUM
> 
> Original change's description:
> > move GrColor.h to private, IWYU
> > 
> > Bug: skia:
> > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
> > Reviewed-on: https://skia-review.googlesource.com/104160
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,reed@google.com
> 
> Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/104440
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I22fa5c0e0628b5c1f3b5f13879c7d1a4528cc93a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/104561
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-06 23:05:46 +00:00
Mike Reed
be33bab92b add maskfilter+localmatrix to fix savelayer
Bug: skia:7590
Change-Id: I0fcaf342f0dece9a2ddce39f72ad2694626544c7
Reviewed-on: https://skia-review.googlesource.com/104324
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-06 21:39:45 +00:00
Brian Salomon
63cc29304a Revert "move GrColor.h to private, IWYU"
This reverts commit e602f39581.

Reason for revert: Breaks PDFIUM

Original change's description:
> move GrColor.h to private, IWYU
> 
> Bug: skia:
> Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
> Reviewed-on: https://skia-review.googlesource.com/104160
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/104440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-06 18:33:26 +00:00
Mike Reed
e602f39581 move GrColor.h to private, IWYU
Bug: skia:
Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e
Reviewed-on: https://skia-review.googlesource.com/104160
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-02-06 15:42:15 +00:00
Brian Salomon
5711133a1b Remove integer texture support
Change-Id: I0db1c4d705711b8d980bbe0d986013daec6c8ef3
Reviewed-on: https://skia-review.googlesource.com/103762
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-06 12:56:46 +00:00
Mike Reed
b915b978e3 move SkMask.h to src
Bug: skia:
Change-Id: Ie51476412fb52df7cc07fdbd4dbbbfc89d9c08a7
Reviewed-on: https://skia-review.googlesource.com/104081
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-06 02:50:15 +00:00
Mike Reed
245af1ff99 fix symbol for intersection
Bug: skia:
Change-Id: I51e85eeba9975d20d897672f44935f573654619d
Reviewed-on: https://skia-review.googlesource.com/104141
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-02-06 02:40:16 +00:00
Peng Huang
52347e7d77 Fix link error with compoent build
Bug: skia:
Change-Id: I5f390b7e7cb4351cb08bfdeb2af93f5851e001b2
Reviewed-on: https://skia-review.googlesource.com/103900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-05 19:37:56 +00:00
Robert Phillips
11bdbe0013 Revert "Re-enable explicit resource allocation in Skia"
This reverts commit ac18b46904.

Reason for revert: erg - bit rot

Original change's description:
> Re-enable explicit resource allocation in Skia
> 
> I can no longer repro the bug (assignment of the same GrTexture to both
> sides of a dest read) locally. Let's see what the bots have to say.
> 
> Change-Id: Ia71bb6fb44c5b8dc3dd870f7b20e12a6db70e26c
> Reviewed-on: https://skia-review.googlesource.com/103581
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I5264986d3ddd439e5944c801b5d9113283921308
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/103660
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-05 16:19:57 +00:00
Robert Phillips
ac18b46904 Re-enable explicit resource allocation in Skia
I can no longer repro the bug (assignment of the same GrTexture to both
sides of a dest read) locally. Let's see what the bots have to say.

Change-Id: Ia71bb6fb44c5b8dc3dd870f7b20e12a6db70e26c
Reviewed-on: https://skia-review.googlesource.com/103581
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-02-05 15:56:06 +00:00
Robert Phillips
e8fabb2665 Update LazyProxy creation to allow for a non-textureable result
Change-Id: Ic284b4f4220afa714159e07f57798a94fd40d63a
Reviewed-on: https://skia-review.googlesource.com/102484
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-04 20:01:28 +00:00
Brian Salomon
bdecacfbe4 Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""""
This reverts commit 3a2cc2c2ec.

Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version

Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab
Reviewed-on: https://skia-review.googlesource.com/103181
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-03 01:59:59 +00:00
Brian Salomon
3a2cc2c2ec Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""
This reverts commit 5bb82cbecd.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
> 
> This reverts commit 18c52a7b52.
> 
> Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"
> 
> 
> Bug: skia:
> Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
> Reviewed-on: https://skia-review.googlesource.com/102940
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/103220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-03 00:25:20 +00:00
Brian Salomon
5bb82cbecd Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend.""""
This reverts commit 18c52a7b52.

Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types"


Bug: skia:
Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947
Reviewed-on: https://skia-review.googlesource.com/102940
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-02 23:37:59 +00:00
Brian Salomon
18c52a7b52 Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""
This reverts commit d0d7270fcc.

Revert "More sample count cleanup:"

This reverts commit d653cac70e.

Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types"

This reverts commit 85ae7159c9.


Need to understand NVPR perf changes before relanding

Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b
Reviewed-on: https://skia-review.googlesource.com/102780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-02 12:19:52 +00:00
Brian Salomon
85ae7159c9 Add new GrContext queries for imagability, surfacability, and max sample count of color types
Bug: skia:7538
Change-Id: I235fc1aa947ba57faa7aef5e7e7ce9241b315fff
Reviewed-on: https://skia-review.googlesource.com/99704
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-02 00:16:28 +00:00
Brian Salomon
d653cac70e More sample count cleanup:
rename getSampleCount -> getRenderTargetSampleCount because it will return
0 when a config is not renderable but *is* supported as a texture format.
(Old name kept around until Chrome stops calling it)

Add virtual GrCaps::maxRenderTargetSampleCount(GrPixelConfig).

Devirtualize isConfigRenderable() and implement as maxRTSC != 0. Separate implementation for version with bool withMSAA param to be removed after Flutter is updated to no longer call.

Consolidate various file static GrSurfaceDesc validators fns into GrCaps::validateSurfaceDesc().


Bug: skia:
Change-Id: Ie30a291aa027e910df3bd90fac8518ccdb39e53f
Reviewed-on: https://skia-review.googlesource.com/102141
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-01 21:56:49 +00:00
Brian Salomon
d0d7270fcc Revert "Revert "Redefine the meaning of sample counts in GPU backend.""
Fixes gpu config default samples to be 1 and updates config parsing test accordingly.

This reverts commit c1ce2f7966.

Bug: skia:
Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f
Reviewed-on: https://skia-review.googlesource.com/102147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 21:15:39 +00:00
Brian Salomon
c1ce2f7966 Revert "Redefine the meaning of sample counts in GPU backend."
This reverts commit 48825b11ad.

Reason for revert: nanobench

Original change's description:
> Redefine the meaning of sample counts in GPU backend.
> 
> Old: 0  -> nonMSAA
>      1+ -> MSAA
> 
> New:
>      0  -> error/unsupported
>      1  -> nonMSAA
>      2+ -> MSAA
> 
> We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:
> 
> 1) SkSurface factories
> 2) GrBackendRenderTarget constructors
> 3) GrCaps::getSampleCnt()'s requestedCount parameter
> 
> However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.
> 
> This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.
> 
> 
> Bug: skia:
> Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
> Reviewed-on: https://skia-review.googlesource.com/101560
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic257619a8a5ee9ac15419ecf10259e42daed7f82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/102662
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 18:34:40 +00:00
Brian Salomon
48825b11ad Redefine the meaning of sample counts in GPU backend.
Old: 0  -> nonMSAA
     1+ -> MSAA

New:
     0  -> error/unsupported
     1  -> nonMSAA
     2+ -> MSAA

We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility:

1) SkSurface factories
2) GrBackendRenderTarget constructors
3) GrCaps::getSampleCnt()'s requestedCount parameter

However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally.

This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case.


Bug: skia:
Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33
Reviewed-on: https://skia-review.googlesource.com/101560
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-02-01 18:16:58 +00:00
Greg Daniel
0a375db9a4 Have lazy proxies keep their callbacks around and clean up their lambdas in the dtor
I believe after this CL we will be at a place where we just have to null out the
fTarget of a lazy proxy and it will reinstantiate itself.

Bug: skia:
Change-Id: I88fdc70e149eba4514a0823da99383583394005c
Reviewed-on: https://skia-review.googlesource.com/102021
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-02-01 17:24:38 +00:00
Robert Phillips
6200036929 Implement GPU/OpList DDLs
This relies on https://skia-review.googlesource.com/c/skia/+/102101 (Add SkSurface_Gpu::MakeWrappedRenderTarget method) landing first

TBR=bsalomon@google.com
Change-Id: I4d2d66af5800407f638ef32d7b19ce49084bd4e4
Reviewed-on: https://skia-review.googlesource.com/102263
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-02-01 15:00:53 +00:00
Mike Reed
3d5a6b5f25 add saturate helper for float2int64
Bug: skia:
Change-Id: I157f8c047145874c4585ae870018163908389b26
Reviewed-on: https://skia-review.googlesource.com/102321
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-01-31 21:21:36 +00:00
Robert Phillips
d5f9cdd4b3 Add SkSurface_Gpu::MakeWrappedRenderTarget method
This is pulled out of https://skia-review.googlesource.com/c/skia/+/101480 (Implement GPU/OpList DDLs)

Change-Id: I12b1ac346c7c1fa10f2120bc92bee63c93fc2249
Reviewed-on: https://skia-review.googlesource.com/102101
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-31 21:15:45 +00:00
Mike Reed
1c5906f562 saturate some irect ops for fuzzers
Bug: skia:
Change-Id: I1c4f879a455048652abb619814841cd687a0474a
Reviewed-on: https://skia-review.googlesource.com/101881
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-30 21:50:30 +00:00
Leon Scroggins III
495e0f079c Simplify SkAnimatedImage
Bug: b/63908092

Rather than keeping track of the time and whether the animation is
running, leave that up to the client. Offer a single method to decode
the next frame, allowing the client to stay one frame ahead.

Change-Id: I546013e32e3a0874181b0dce1349bbec07aaadd4
Reviewed-on: https://skia-review.googlesource.com/101544
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-30 18:46:35 +00:00
Greg Daniel
6a0176bf03 Add ref counted wrapped around GrTexture ReleaseProc
Bug: skia:
Change-Id: I0cd11a539fd6b16d4b3f9512694f84e0a429518c
Reviewed-on: https://skia-review.googlesource.com/101341
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-30 14:50:00 +00:00
Robert Phillips
7f861927fc Revert "Drop support for unused MSAA extensions"
This reverts commit 7df27465c4.

Reason for revert: experimental revert to see if this is the cause of the tree redness

Original change's description:
> Drop support for unused MSAA extensions
> 
> Bug: skia:
> Change-Id: I113b80e3f991f195155148625ceb29242ea82776
> Reviewed-on: https://skia-review.googlesource.com/101403
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I4fa4123e2d176bef88cd76a09a14053d9ac5809f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/101680
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-30 13:13:56 +00:00
Mike Reed
2f5b8d81c2 don't draw non-finite contexts in imagefilters
Bug: skia:7507
Change-Id: Ifc210951c17f74770f15de1c2e13b42117a3354e
Reviewed-on: https://skia-review.googlesource.com/101202
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-01-30 02:02:42 +00:00
Brian Salomon
e41e1769e7 Add kRGBX_8888, kRGBA_1010102, and kRGBX_1010102 color types. Unused for now.
BUG= skia:7533

Change-Id: I4b3f6b827fd833ba2d07895884d2abc9a3132366
Reviewed-on: https://skia-review.googlesource.com/99781
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-30 01:59:31 +00:00
Chris Dalton
7df27465c4 Drop support for unused MSAA extensions
Bug: skia:
Change-Id: I113b80e3f991f195155148625ceb29242ea82776
Reviewed-on: https://skia-review.googlesource.com/101403
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-01-29 23:37:51 +00:00
Brian Salomon
7f1a074600 Remove some unused sample count caps
Change-Id: I4acb620b4b7b4c5bd83d7c7d65808ca8ebbd6804
Reviewed-on: https://skia-review.googlesource.com/101360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-29 19:46:31 +00:00
Brian Salomon
1c80e99dd5 Allow printf style var args for messages in REPORTER_ASSERT.
Remove REPORTER_ASSERT_MESSAGE.

Change-Id: I6d00715901159c93e22d182fe24aac92b5fdbcf4
Reviewed-on: https://skia-review.googlesource.com/100361
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-01-29 15:17:09 +00:00
Mike Klein
fbe6620284 add SkPicture::MakePlaceholder()
Bug: skia:7536

Change-Id: I6ca7c680ef4fd69419254dc7f1af27343dbb8e89
Reviewed-on: https://skia-review.googlesource.com/99664
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-28 00:18:37 +00:00
Mike Klein
88d90714fa Revert "hide picture virtuals (no public callers)"
This reverts commit 8005bff7e6.

Reason for revert: hwui, flutter, and headless blink in G3 all still using these.

Original change's description:
> hide picture virtuals (no public callers)
> 
> This prepares the way for a clean impl of a "placeholder" picture that never unrolls
> 
> Bug: skia:
> Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473
> Reviewed-on: https://skia-review.googlesource.com/100260
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>

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

Change-Id: I385789dd420588ea9a9390c8a44c6ecb96c7f358
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/100880
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-01-27 17:30:15 +00:00
Mike Reed
8005bff7e6 hide picture virtuals (no public callers)
This prepares the way for a clean impl of a "placeholder" picture that never unrolls

Bug: skia:
Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473
Reviewed-on: https://skia-review.googlesource.com/100260
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-01-27 04:02:55 +00:00
Leon Scroggins III
da3e9ad894 Make SkAndroidCodec (optionally) respect origin
Bug: b/63909536

ImageDecoder will respect the origin, but BitmapFactory will maintain
its current behavior of not respecting it. Add an option to respect it.

In addition, add support for reading the EXIF data from a WEBP. This
seems to be an uncommon use case, but is occasionally used when
converting from a JPEG. Add 8 WEBPs, all converted (with cwebp) from
their analogous JPEG files already checked in.

Change-Id: I38afca58c86fa99ee9ab7d1dc83aaa4f23132c11
Reviewed-on: https://skia-review.googlesource.com/95300
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-26 22:13:34 +00:00
Leon Scroggins III
abe639caf4 Add SkAnimatedImage::getRepetitionCount
Bug: b/63908092

Android does not need to have its end listener attached if the
repetition count is infinite. Provide an accessor so it will know.

Change-Id: I481b048994a6e86ae88c913a5dcca3788b92bae2
Reviewed-on: https://skia-review.googlesource.com/99883
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-26 20:08:40 +00:00
Mike Klein
8f11d4dcaf eliminate SK_BUILD_FOR_WIN32
SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing.

Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007

Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561
Reviewed-on: https://skia-review.googlesource.com/99340
Reviewed-by: Mike Reed <reed@google.com>
2018-01-26 19:52:04 +00:00
Brian Salomon
33bf56d6b4 Remove GrContext::getRecommendedSampleCount and SkPictureContentInfo::suitableForGpuRasterization
Change-Id: I8c5521f87c5eae185e68622aa104cb8911efa8c8
Reviewed-on: https://skia-review.googlesource.com/100183
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-26 17:13:00 +00:00
Mike Reed
1bd556a177 use coverage modes instead of blend modes
Bug: skia:
Change-Id: Ib3aa0137644358173ea4087693f33dbc2118c6d2
Reviewed-on: https://skia-review.googlesource.com/99661
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-26 17:03:58 +00:00
Mike Reed
20dc672821 compose and combine maskfilters
Bug: skia:
Change-Id: Id470124021d00ee25cf4ae392a4ee345ced84110
Reviewed-on: https://skia-review.googlesource.com/97760
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-25 01:54:21 +00:00
Robert Phillips
a83d0132ba Misc guarding of enums in ImageFilter CreateProcs
Change-Id: I51886aaf2a4670f46ca489b2369dc00e60403c75
Reviewed-on: https://skia-review.googlesource.com/99328
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-24 21:54:30 +00:00
Cary Clark
745c398754 minor imageinfo fixes
teeny fixes to SkImageInfo.h to get
ready for documenting it. Selected
SkImageInfo.h as Herb discovered that
global enums (especially forward
declared ones) break bookmaker.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I6ecf4f9dd7022c810f3d7a6cfee10fb07aa49aee
Reviewed-on: https://skia-review.googlesource.com/99342
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-01-24 21:26:29 +00:00
Robert Phillips
b0ae566b23 Check enum values in SkDisplacementMapEffect's CreateProc
Bug: skia:5635
Change-Id: Iaa01d2207916d0e2a2e2623f124b2b4023b51b1b
Reviewed-on: https://skia-review.googlesource.com/99204
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-24 20:14:19 +00:00
Greg Daniel
f2336e4500 Add lazy proxy's for wrapping backend textures
Bug: skia:
Change-Id: I3bb557cefc35312adc9515b5683d2ed747bb4eb3
Reviewed-on: https://skia-review.googlesource.com/96862
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-01-24 15:12:30 +00:00
Leon Scroggins III
8524c30a97 Make SkAnimatedImage::update return sentinel when stopped
Bug: b/63908092
Change-Id: I585f3d3efde1db4d5be36b11f19fe6e88f131608
Reviewed-on: https://skia-review.googlesource.com/98062
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-23 22:21:40 +00:00
Herb Derby
980a48de64 Move glyph cache and descriptor functions off of SkPaint
BUG=skia:7515

Change-Id: If17b157db1077a9a3c0f9efd03929f62a3486419
Reviewed-on: https://skia-review.googlesource.com/98841
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2018-01-23 21:55:50 +00:00
Chris Dalton
27059d36d6 ccpr: Use primitive restart feature on ARM
Bug: skia:
Change-Id: Ia7ab55f8b6ecdd674762f5197d35e8db58f07c01
Reviewed-on: https://skia-review.googlesource.com/98180
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-23 21:29:10 +00:00
Mike Reed
80747ef591 move the guts of SkMaskFilter.h into SkMaskFilterBase.h
Bug: skia:
Change-Id: I29ad0960156562867429542d3cfbf3d639529cab
Reviewed-on: https://skia-review.googlesource.com/98802
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-23 21:14:20 +00:00
Brian Salomon
ea26d6b816 Revert "Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs."""
This reverts commit b4e965c103.

Reason for revert: Thin stroke problems, chrome pixel test, g3 clang-tidy

Original change's description:
> Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.""
> 
> This reverts commit befff6580e.
> 
> Bug: skia:
> Change-Id: Ia108408cd986c03783af5058845790f6b17201f4
> Reviewed-on: https://skia-review.googlesource.com/98703
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I785af7efdfc39680052f5721a55ecffbeaf1f0ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/98785
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-23 20:33:30 +00:00
Robert Phillips
bee273291f Fix some fuzzer bugs from Skia's image filter fuzzer
Change-Id: I432b3a351eecca0d36635e37f91d32c0e281b7d9
Reviewed-on: https://skia-review.googlesource.com/98384
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-23 19:54:00 +00:00
Brian Salomon
01b476a028 Start of adding GrContextOption that overrides driver workarounds.
This handles most of the GL driver workarounds but not Vulkan (yet). GL wokarounds related to config support are still not handled.

Change-Id: I3d0f62ac8a0f6e9ba13632ea82acdc493912c63d
Reviewed-on: https://skia-review.googlesource.com/98382
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-23 18:33:49 +00:00
Mike Reed
165fa634b7 check for valid vertices mode
Bug: skia:7512
Change-Id: I2ede2232f3807e7bad8562eb3bf6327ffc52a996
Reviewed-on: https://skia-review.googlesource.com/98760
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:28:47 +00:00
Brian Salomon
b4e965c103 Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.""
This reverts commit befff6580e.

Bug: skia:
Change-Id: Ia108408cd986c03783af5058845790f6b17201f4
Reviewed-on: https://skia-review.googlesource.com/98703
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-23 18:28:46 +00:00
Herb Derby
d8327a8c8b Clean up SkScalerContext descriptor creation
Allow a descriptor creation using just a rec and effects.
This is the most complex part of the change.

Cleanup SkScalerContextFlags to be a real thing.
This has spread everywhere.

BUG=skia:7515

Change-Id: I67189c9aeb51f1777a1c60145216524d440cb890
Reviewed-on: https://skia-review.googlesource.com/98320
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-23 18:13:36 +00:00
Mike Reed
0331d37af9 remove unneeded SkFlattenableSerialization
Bug: skia:
Change-Id: I5cf40b88b05dcd8e83383f6271b046eac8d55e35
Reviewed-on: https://skia-review.googlesource.com/98642
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:13:35 +00:00
Mike Reed
75ae421c24 IWYU -- SkShader.h
Bug: skia:
Change-Id: I57bffc14c4888627a22158e35f3ac3b762138f02
Reviewed-on: https://skia-review.googlesource.com/98520
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-23 18:08:30 +00:00
Greg Daniel
48661b868f Make use of VkSemaphores thread safe assuming use of the same VkQueue.
This allows us to re-enable support for multiple GrContexts in
GrBackendTextureImageGenerator.

Bug: skia:
Change-Id: Ifd6ac1ad81cdfbd1fd986467d8beb359399d6588
Reviewed-on: https://skia-review.googlesource.com/98340
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-01-22 21:41:45 +00:00
Mike Reed
baafcdcd54 move zero-init to sk_malloc for masks
Bug: skia:
Change-Id: I75d557068bdcd9e9f7e380e4fa447f9d83dd1554
Reviewed-on: https://skia-review.googlesource.com/98200
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-22 20:50:47 +00:00
Leon Scroggins III
2cb6cb1f33 Add SkAnimatedImage::isFinished
Bug: b/63908092

Allows Android to know when to call onAnimationEnd.

Change-Id: I9cc102fb485e944ad5983eed9f0b941153128e88
Reviewed-on: https://skia-review.googlesource.com/97401
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-22 19:32:17 +00:00
Leon Scroggins III
4c11945a97 Respect repetition count in SkAnimatedImage
Bug: b/63908092

By default use the repetition count stored in the encoded data (if
any). Allow setting the repetition count manually, so that the
animation will stop after n+1 total cycles (unless -1 is used for
infinite).

If the animation is complete, make start reset it.

When the animation is not running, make update return max double (i.e.
no need to update any time soon).

Fix a bug where the first call to update returned -1.

Share write_bm with CodecAnimTest, for debugging.

Update Sample to check isRunning rather than keeping its own record
of whether the animation is running.

Change-Id: I883e4d7325f7a7b23a422fa9d756f9ea3018f0f8
Reviewed-on: https://skia-review.googlesource.com/97082
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-22 18:53:47 +00:00
Jim Van Verth
87d18ced0a Add Chinese zoom Sample.
Bug: skia:
Change-Id: Ibe5ffee64fe9fccd6b8d86c1310a78d2d51e424e
Reviewed-on: https://skia-review.googlesource.com/97065
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-01-22 18:20:27 +00:00
Robert Phillips
f35fd8d2f2 Move more internal methods from GrContext to GrContextPriv (take 3)
Change-Id: Ied630e61cf95780bf85032867e6ce663e1ef9c2f
Reviewed-on: https://skia-review.googlesource.com/98000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-01-22 16:53:17 +00:00
Brian Salomon
dba65f95e4 Add a workaround for inaccurate interpolants on Adreno 3xx.
Also ensure that sk_FragCoord x and y values are at pixel centers when
workaround is used.

Change-Id: Ib748af9e496a406a50622e00e96e1346cbb5eb26
Reviewed-on: https://skia-review.googlesource.com/97064
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-22 14:14:18 +00:00
Mike Reed
a6cd625f49 Revert "declare SkRasterizer for android"
This reverts commit e168c3e8f9.

Reason for revert: fix in android landed

Original change's description:
> declare SkRasterizer for android
> 
> Bug: skia:
> Change-Id: Ibea090143c7fe21c21a5d98dc490eca0fc72ab99
> Reviewed-on: https://skia-review.googlesource.com/97665
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

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

Change-Id: I54b4dfdef9645605fbdb69bfdb0b03293cd4f4a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/97880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-22 12:35:49 +00:00
Mike Reed
e168c3e8f9 declare SkRasterizer for android
Bug: skia:
Change-Id: Ibea090143c7fe21c21a5d98dc490eca0fc72ab99
Reviewed-on: https://skia-review.googlesource.com/97665
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-21 21:20:13 +00:00
Mike Reed
8ad91a9bf8 remove unused SkRasterizer
Bug: skia:7500
Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712
Reviewed-on: https://skia-review.googlesource.com/97400
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-21 18:24:11 +00:00
Mike Reed
bfadcf0224 Revert "Revert "use GrFPArgs for maskfilters""
This reverts commit 4f7f197c09.

Reason for revert: not needed for roll

Original change's description:
> Revert "use GrFPArgs for maskfilters"
> 
> This reverts commit a99b393995.
> 
> Reason for revert: try to unblock android roller
> 
> Original change's description:
> > use GrFPArgs for maskfilters
> > 
> > Bug: skia:
> > Change-Id: I8516a3b0f6d8301c51f0861c65b9fe8f692fc5e5
> > Reviewed-on: https://skia-review.googlesource.com/97260
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,reed@google.com
> 
> Change-Id: Iefe8ed19bba75df86173dec53f5ed4f1ea8724d0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/97581
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I82c0e3234ff1b23c6d08259aae7dcb03087a415e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/97583
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-20 22:24:31 +00:00
Leon Scroggins
2914555e00 Revert "Move more internal methods from GrContext to GrContextPriv (take 2)"
This reverts commit c22e50bd31.

Reason for revert: Speculative fix for Android roll

Original change's description:
> Move more internal methods from GrContext to GrContextPriv (take 2)
> 
> Change-Id: I47108910517d61edeb52f82793d384fdb5605d45
> Reviewed-on: https://skia-review.googlesource.com/97241
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I3a77ac33c5f48529357cf9c683d5f4cacaa2379f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/97582
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-20 17:09:10 +00:00
Mike Reed
4f7f197c09 Revert "use GrFPArgs for maskfilters"
This reverts commit a99b393995.

Reason for revert: try to unblock android roller

Original change's description:
> use GrFPArgs for maskfilters
> 
> Bug: skia:
> Change-Id: I8516a3b0f6d8301c51f0861c65b9fe8f692fc5e5
> Reviewed-on: https://skia-review.googlesource.com/97260
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Iefe8ed19bba75df86173dec53f5ed4f1ea8724d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/97581
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-20 14:49:30 +00:00
Vladimir Levin
ad6660a639 Use equal_range for factory lookups
This patch uses equal_range instead of linear search to look up a
factory entry by name. This does require a sort, but the expected usage
is that the sort happens once and look ups happen many times.

This improves performance on Chromium's oop deserialization of
flattenables by about 10%

R=reed@chromium.org

Change-Id: I907f457a2ffb7d5b6d8261343099d982260b8415
Reviewed-on: https://skia-review.googlesource.com/96820
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-01-19 21:17:56 +00:00
Mike Reed
a99b393995 use GrFPArgs for maskfilters
Bug: skia:
Change-Id: I8516a3b0f6d8301c51f0861c65b9fe8f692fc5e5
Reviewed-on: https://skia-review.googlesource.com/97260
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-19 19:39:16 +00:00
Robert Phillips
c22e50bd31 Move more internal methods from GrContext to GrContextPriv (take 2)
Change-Id: I47108910517d61edeb52f82793d384fdb5605d45
Reviewed-on: https://skia-review.googlesource.com/97241
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-19 19:26:46 +00:00