Commit Graph

2238 Commits

Author SHA1 Message Date
Brian Salomon
eace8cd22a Use sk_sp to own GrCaps in GrContext.
Change-Id: I46cd37132ecdf0f93be4509c6a06fb74cb185076
Reviewed-on: https://skia-review.googlesource.com/82625
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-08 18:42:52 +00:00
Brian Salomon
f06c358267 Remove instanced rendering
Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4
Reviewed-on: https://skia-review.googlesource.com/82241
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-08 13:41:10 +00:00
Brian Salomon
990014d082 Temporarily readd old signature of GrContext::MakeGL
Change-Id: I9c785dd2fd14e422b7e84067053d0565a4d782b6
Reviewed-on: https://skia-review.googlesource.com/82340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 21:29:03 +00:00
Greg Daniel
7af060a8bc Add gray_8_as_lum and _as_red private grpixelconfigs
Bug: skia:
Change-Id: I70cbd0bc9f7a7a16fb9f0688d272d7afa607700a
Reviewed-on: https://skia-review.googlesource.com/80622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-07 20:52:40 +00:00
Greg Daniel
afb7ec7a40 Revert "Revert "Add define to use customize vulkan header.""
This reverts commit b351817588.

Reason for revert: Relanding with android fixes

Original change's description:
> Revert "Add define to use customize vulkan header."
>
> This reverts commit a492eb0e1f.
>
> Reason for revert: Breaking Android roll (b/c builds tools?)
>
> Original change's description:
> > Add define to use customize vulkan header.
> >
> > Bug: skia:
> > Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
> > Reviewed-on: https://skia-review.googlesource.com/81121
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I80a685bf88af909865f274ffc61686be57e8c313
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/81740
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ia701e884bfa3799dc73002f892feb2ecafe9da12
Reviewed-on: https://skia-review.googlesource.com/81742
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-07 18:29:39 +00:00
Brian Salomon
384fab467e sk_spification of GrGpu creation.
Make GrContext::MakeGL take interface as sk_sp.

Make GrContext::MakeVulkan take GrVkBackendContext as sk_sp.

Change-Id: I13c22a57bd281c51738f503d9ed3418d35a466df
Reviewed-on: https://skia-review.googlesource.com/81842
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-12-07 17:56:59 +00:00
Brian Salomon
b351817588 Revert "Add define to use customize vulkan header."
This reverts commit a492eb0e1f.

Reason for revert: Breaking Android roll (b/c builds tools?)

Original change's description:
> Add define to use customize vulkan header.
> 
> Bug: skia:
> Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
> Reviewed-on: https://skia-review.googlesource.com/81121
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I80a685bf88af909865f274ffc61686be57e8c313
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/81740
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 13:19:51 +00:00
Greg Daniel
a492eb0e1f Add define to use customize vulkan header.
Bug: skia:
Change-Id: Ia87c81a54603a02b2f8f51a735bf173a49afe6c7
Reviewed-on: https://skia-review.googlesource.com/81121
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-06 21:29:49 +00:00
Robert Phillips
7ffbcf909d Add unit test for SkDeferredDisplayLists (take 2)
Change-Id: I76a4c77d5b9418cb7fe677bd55ba32a2e336924d
Reviewed-on: https://skia-review.googlesource.com/79820
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-04 18:37:29 +00:00
Greg Daniel
e7d8da4b20 Add support for internal gl format in GrGLTextureInfo
This gives clients the ability to wrap GL textures with just the GL Format.
This enables us to distinquish between wrapping in Alpha8 texture that is
implented with Alpha or Red format

Bug: skia:
Change-Id: Iacbea60a149c436c270b7ff9ce5d019947678793
Reviewed-on: https://skia-review.googlesource.com/72600
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-12-04 16:43:39 +00:00
Greg Daniel
10ed243e2e Add cap on intel to avoid calling abs and floor on the same line in a
shader.

This fixes a bug on some intel devices where we are failing
in the ProcessorOptimizationTest.

I've tried other "no op" type things between the floor call and abs which
also fixed the issue, as well as adding explicit checks to see if we are
less than -1 or greater than 1 where the clamp is. Thus the clamp itself
should be a no op and shouldn't secretly be fixing the problem outside
of forcing the floor and abs lines to be separate.

Bug: skia:
Change-Id: I85bf82e0e02607b78470b7a5f8f918e9f53f0154
Reviewed-on: https://skia-review.googlesource.com/76820
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-02 00:00:59 +00:00
Brian Salomon
762d5e7e1c Revert "Revert "Use a dst size threshold for multitexturing images.""
This reverts commit be85ef2511.

Change-Id: Icc22eb5841fabc53232b360efaac2d6ebf72e358
Reviewed-on: https://skia-review.googlesource.com/79081
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-01 16:23:59 +00:00
Brian Salomon
be85ef2511 Revert "Use a dst size threshold for multitexturing images."
This reverts commit edfa0d2f62.

Reason for revert: ubsan bug

Original change's description:
> Use a dst size threshold for multitexturing images.
> 
> TODO: Set thresholds based on GPU in use.
> 
> Change-Id: I0aeac596d11ab63922f2df0d76c668b4f8be5353
> Reviewed-on: https://skia-review.googlesource.com/77900
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Iea56ce73cf8f7bca265fe58907a72ecf96497d22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/78542
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-30 19:10:43 +00:00
Brian Salomon
edfa0d2f62 Use a dst size threshold for multitexturing images.
TODO: Set thresholds based on GPU in use.

Change-Id: I0aeac596d11ab63922f2df0d76c668b4f8be5353
Reviewed-on: https://skia-review.googlesource.com/77900
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-30 14:34:42 +00:00
Robert Phillips
8def8bffe9 Add a GrContextThreadSafeProxy to SkSurfaceCharacterization
Ganesh will require access to the GrCaps to make rendering decisions.

Change-Id: I6dee42a3f0dc638f052706b8d1ea6e02b589e062
Reviewed-on: https://skia-review.googlesource.com/77681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-11-30 14:16:32 +00:00
Chris Dalton
3b51df1211 Cleanup yes/no enums in Ganesh
Yes/no enums should have a base type of bool, and kYes should always
be true. Also, there is no need for a "GrEnumToBool()" function, as we
can just use the enum itself directly: e.g. "GrAA(bool)".

Bug: skia:
Change-Id: I7bb3c2983f717f3467fca4ce6b32920d71026894
Reviewed-on: https://skia-review.googlesource.com/74860
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-27 22:40:27 +00:00
Greg Daniel
ef59d87ae8 Revert "Revert "Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""""
This reverts commit b092cea5b1.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""""
>
> This reverts commit 68ab18611a.
>
> Reason for revert: Command Buffer bot
>
> Original change's description:
> > Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""
> >
> > This reverts commit 3b2f5b60ff.
> >
> > Reason for revert: more attempts at a fixed version
> >
> > Original change's description:
> > > Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
> > >
> > > This reverts commit b5fb7cf016.
> > >
> > > Reason for revert: breaking more devices
> > >
> > > Original change's description:
> > > > Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> > > >
> > > > This reverts commit 0fb6db4be6.
> > > >
> > > > Reason for revert: fixed bug
> > > >
> > > > Original change's description:
> > > > > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> > > > >
> > > > > This reverts commit 33d17cbb00.
> > > > >
> > > > > Reason for revert: broke intel bots
> > > > >
> > > > > Original change's description:
> > > > > > Add private grpixelconfigs for alpha_8 and alpha_half
> > > > > >
> > > > > > Bug: skia:
> > > > > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > > > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > > >
> > > > > TBR=egdaniel@google.com,bsalomon@google.com
> > > > >
> > > > > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: skia:
> > > > > Reviewed-on: https://skia-review.googlesource.com/72180
> > > > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > >
> > > > TBR=egdaniel@google.com,bsalomon@google.com
> > > >
> > > > Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> > > > Reviewed-on: https://skia-review.googlesource.com/72241
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com
> > >
> > > Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/72660
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: Ifcf1b97c2a9493ce9a77a8aa0f4e5a8fb393def3
> > Reviewed-on: https://skia-review.googlesource.com/72802
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: Ie2277f59f5a1294392b5d153ce2429c20b3e4182
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/73320
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: Ibba9d2109f35ea710e313d604b3e5ee742916234
Reviewed-on: https://skia-review.googlesource.com/73360
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-18 13:36:27 +00:00
Brian Osman
b092cea5b1 Revert "Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""""
This reverts commit 68ab18611a.

Reason for revert: Command Buffer bot

Original change's description:
> Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""
> 
> This reverts commit 3b2f5b60ff.
> 
> Reason for revert: more attempts at a fixed version
> 
> Original change's description:
> > Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
> >
> > This reverts commit b5fb7cf016.
> >
> > Reason for revert: breaking more devices
> >
> > Original change's description:
> > > Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> > >
> > > This reverts commit 0fb6db4be6.
> > >
> > > Reason for revert: fixed bug
> > >
> > > Original change's description:
> > > > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> > > >
> > > > This reverts commit 33d17cbb00.
> > > >
> > > > Reason for revert: broke intel bots
> > > >
> > > > Original change's description:
> > > > > Add private grpixelconfigs for alpha_8 and alpha_half
> > > > >
> > > > > Bug: skia:
> > > > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > >
> > > > TBR=egdaniel@google.com,bsalomon@google.com
> > > >
> > > > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > > > No-Presubmit: true
> > > > No-Tree-Checks: true
> > > > No-Try: true
> > > > Bug: skia:
> > > > Reviewed-on: https://skia-review.googlesource.com/72180
> > > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com
> > >
> > > Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> > > Reviewed-on: https://skia-review.googlesource.com/72241
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/72660
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ifcf1b97c2a9493ce9a77a8aa0f4e5a8fb393def3
> Reviewed-on: https://skia-review.googlesource.com/72802
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ie2277f59f5a1294392b5d153ce2429c20b3e4182
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/73320
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-17 19:15:07 +00:00
Greg Daniel
68ab18611a Revert "Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""""
This reverts commit 3b2f5b60ff.

Reason for revert: more attempts at a fixed version

Original change's description:
> Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
>
> This reverts commit b5fb7cf016.
>
> Reason for revert: breaking more devices
>
> Original change's description:
> > Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> >
> > This reverts commit 0fb6db4be6.
> >
> > Reason for revert: fixed bug
> >
> > Original change's description:
> > > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> > >
> > > This reverts commit 33d17cbb00.
> > >
> > > Reason for revert: broke intel bots
> > >
> > > Original change's description:
> > > > Add private grpixelconfigs for alpha_8 and alpha_half
> > > >
> > > > Bug: skia:
> > > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,bsalomon@google.com
> > >
> > > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: skia:
> > > Reviewed-on: https://skia-review.googlesource.com/72180
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> > Reviewed-on: https://skia-review.googlesource.com/72241
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/72660
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ifcf1b97c2a9493ce9a77a8aa0f4e5a8fb393def3
Reviewed-on: https://skia-review.googlesource.com/72802
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-17 18:50:46 +00:00
Robert Phillips
57e0828fad Add backend GPU objects to fiddle app
TBR=bsalomon@google.com
Change-Id: I8876a4657f837436322150925233e0f36c91e8f0
Reviewed-on: https://skia-review.googlesource.com/72641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2017-11-17 12:53:55 +00:00
Chris Dalton
584a79a1d5 Reland "Fold analytic clip FPs into GrReducedClip"
This is a reland of 4355b26b35
Original change's description:
> Fold analytic clip FPs into GrReducedClip
>
> Perf result on Pixel phone (sorted by impact):
>
>   GEOMEAN                              7.44 -> 6.92 ms   [ 93%]
>
>   keymobi_cnn_com.skp                  3.55 -> 3.59 ms   [101%]
>   keymobi_theverge_com.skp             4.08 -> 4.13 ms   [101%]
>   desk_skbug6850autoscroll.skp         1.21 -> 1.22 ms   [101%]
>   ...
>   top25desk_weather_com.skp            14.2 -> 11.5 ms   [ 81%]
>   keymobi_androidpolice_com_2012_.skp  3.84 -> 2.95 ms   [ 77%]
>   keymobi_shop_mobileweb_ebay_com.skp  2.94 -> 2.26 ms   [ 77%]
>   keymobi_boingboing_net.skp           3.08 -> 2.24 ms   [ 73%]
>   desk_jsfiddlebigcar.skp              1.90 -> 1.25 ms   [ 66%]
>   keymobi_m_youtube_com_watch_v_9.skp  13.5 -> 8.84 ms   [ 65%]
>   keymobi_sfgate_com_.skp              8.55 -> 5.55 ms   [ 65%]
>   keymobi_blogger.skp                  4.01 -> 2.60 ms   [ 65%]
>
> Cleaner code, improved skps, slightly better geometric mean time.
>
> Pixel C is mostly unaffected, presumably because it uses window
> rectangles.
>
> Bug: skia:7190
> Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92
> Reviewed-on: https://skia-review.googlesource.com/67424
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Bug: skia:7190
Change-Id: I92f1ed21b6292feb3209fcbd1725487784d420da
Reviewed-on: https://skia-review.googlesource.com/72562
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-16 19:32:55 +00:00
Chris Dalton
47c8ed3c06 Reland "Fix precision caps and rrect/ellipse effect precisions"
This is a reland of e421800227
Original change's description:
> Fix precision caps and rrect/ellipse effect precisions
>
> Replaces all the complex precision caps with a single flag that says
> whether "float" == fp32. Updates the ellipse and rrect effects to
> use float coords, and use the scale workaround when float != fp32.
>
> Bug: skia:7190
> Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307
> Reviewed-on: https://skia-review.googlesource.com/70961
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Bug: skia:7190
Change-Id: I7ced37a64164b83d86f6a957c35e10ce9085aba0
Reviewed-on: https://skia-review.googlesource.com/72760
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-16 19:29:56 +00:00
Greg Daniel
3b2f5b60ff Revert "Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half"""
This reverts commit b5fb7cf016.

Reason for revert: breaking more devices

Original change's description:
> Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
> 
> This reverts commit 0fb6db4be6.
> 
> Reason for revert: fixed bug
> 
> Original change's description:
> > Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
> >
> > This reverts commit 33d17cbb00.
> >
> > Reason for revert: broke intel bots
> >
> > Original change's description:
> > > Add private grpixelconfigs for alpha_8 and alpha_half
> > >
> > > Bug: skia:
> > > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > > Reviewed-on: https://skia-review.googlesource.com/71763
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com
> >
> > Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:
> > Reviewed-on: https://skia-review.googlesource.com/72180
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
> Reviewed-on: https://skia-review.googlesource.com/72241
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ieaac3eca2fc4919699c7de61a3c33348e92a7da0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/72660
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-16 17:59:33 +00:00
Greg Daniel
b5fb7cf016 Revert "Revert "Add private grpixelconfigs for alpha_8 and alpha_half""
This reverts commit 0fb6db4be6.

Reason for revert: fixed bug

Original change's description:
> Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
>
> This reverts commit 33d17cbb00.
>
> Reason for revert: broke intel bots
>
> Original change's description:
> > Add private grpixelconfigs for alpha_8 and alpha_half
> >
> > Bug: skia:
> > Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> > Reviewed-on: https://skia-review.googlesource.com/71763
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/72180
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ie028961ecbf5934c53cb859e019e548935b3af79
Reviewed-on: https://skia-review.googlesource.com/72241
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-16 17:37:12 +00:00
Brian Osman
24f9c19172 Revert "Fix precision caps and rrect/ellipse effect precisions"
This reverts commit e421800227.

Reason for revert: Also may be responsible for layout test failures? Playing it safe.

Original change's description:
> Fix precision caps and rrect/ellipse effect precisions
> 
> Replaces all the complex precision caps with a single flag that says
> whether "float" == fp32. Updates the ellipse and rrect effects to
> use float coords, and use the scale workaround when float != fp32.
> 
> Bug: skia:7190
> Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307
> Reviewed-on: https://skia-review.googlesource.com/70961
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Idca2f0390e7a0eb85010255183f2f27332b8d26d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7190
Reviewed-on: https://skia-review.googlesource.com/72540
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-16 14:02:23 +00:00
Brian Osman
554c1f0508 Revert "Fold analytic clip FPs into GrReducedClip"
This reverts commit 4355b26b35.

Reason for revert: Most likely CL for layout test failures on Chrome roll: https://bugs.chromium.org/p/chromium/issues/detail?id=785931

Original change's description:
> Fold analytic clip FPs into GrReducedClip
> 
> Perf result on Pixel phone (sorted by impact):
> 
>   GEOMEAN                              7.44 -> 6.92 ms   [ 93%]
> 
>   keymobi_cnn_com.skp                  3.55 -> 3.59 ms   [101%]
>   keymobi_theverge_com.skp             4.08 -> 4.13 ms   [101%]
>   desk_skbug6850autoscroll.skp         1.21 -> 1.22 ms   [101%]
>   ...
>   top25desk_weather_com.skp            14.2 -> 11.5 ms   [ 81%]
>   keymobi_androidpolice_com_2012_.skp  3.84 -> 2.95 ms   [ 77%]
>   keymobi_shop_mobileweb_ebay_com.skp  2.94 -> 2.26 ms   [ 77%]
>   keymobi_boingboing_net.skp           3.08 -> 2.24 ms   [ 73%]
>   desk_jsfiddlebigcar.skp              1.90 -> 1.25 ms   [ 66%]
>   keymobi_m_youtube_com_watch_v_9.skp  13.5 -> 8.84 ms   [ 65%]
>   keymobi_sfgate_com_.skp              8.55 -> 5.55 ms   [ 65%]
>   keymobi_blogger.skp                  4.01 -> 2.60 ms   [ 65%]
> 
> Cleaner code, improved skps, slightly better geometric mean time.
> 
> Pixel C is mostly unaffected, presumably because it uses window
> rectangles.
> 
> Bug: skia:7190
> Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92
> Reviewed-on: https://skia-review.googlesource.com/67424
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I86ff05196eaaeca4fb63836c9b449bbea76fe80b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7190
Reviewed-on: https://skia-review.googlesource.com/72480
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-16 13:57:01 +00:00
Chris Dalton
4355b26b35 Fold analytic clip FPs into GrReducedClip
Perf result on Pixel phone (sorted by impact):

  GEOMEAN                              7.44 -> 6.92 ms   [ 93%]

  keymobi_cnn_com.skp                  3.55 -> 3.59 ms   [101%]
  keymobi_theverge_com.skp             4.08 -> 4.13 ms   [101%]
  desk_skbug6850autoscroll.skp         1.21 -> 1.22 ms   [101%]
  ...
  top25desk_weather_com.skp            14.2 -> 11.5 ms   [ 81%]
  keymobi_androidpolice_com_2012_.skp  3.84 -> 2.95 ms   [ 77%]
  keymobi_shop_mobileweb_ebay_com.skp  2.94 -> 2.26 ms   [ 77%]
  keymobi_boingboing_net.skp           3.08 -> 2.24 ms   [ 73%]
  desk_jsfiddlebigcar.skp              1.90 -> 1.25 ms   [ 66%]
  keymobi_m_youtube_com_watch_v_9.skp  13.5 -> 8.84 ms   [ 65%]
  keymobi_sfgate_com_.skp              8.55 -> 5.55 ms   [ 65%]
  keymobi_blogger.skp                  4.01 -> 2.60 ms   [ 65%]

Cleaner code, improved skps, slightly better geometric mean time.

Pixel C is mostly unaffected, presumably because it uses window
rectangles.

Bug: skia:7190
Change-Id: Ia93f68b2f971ea66b3ab19dc73557ea602932a92
Reviewed-on: https://skia-review.googlesource.com/67424
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-16 03:57:25 +00:00
Chris Dalton
e421800227 Fix precision caps and rrect/ellipse effect precisions
Replaces all the complex precision caps with a single flag that says
whether "float" == fp32. Updates the ellipse and rrect effects to
use float coords, and use the scale workaround when float != fp32.

Bug: skia:7190
Change-Id: Ieccff9f38acd05e5cec78fe90d01a5da901a9307
Reviewed-on: https://skia-review.googlesource.com/70961
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-16 03:31:45 +00:00
Greg Daniel
0fb6db4be6 Revert "Add private grpixelconfigs for alpha_8 and alpha_half"
This reverts commit 33d17cbb00.

Reason for revert: broke intel bots

Original change's description:
> Add private grpixelconfigs for alpha_8 and alpha_half
> 
> Bug: skia:
> Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
> Reviewed-on: https://skia-review.googlesource.com/71763
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I6fff9241f7878f1ec7fad2663df9922c9cd8f628
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/72180
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-15 20:49:03 +00:00
Brian Salomon
559f556d9d Remove support for image load/store
This isn't used and has become a maintenance burden.

Change-Id: I5f3af8f91e5c4f073fe4ea30e0a7f1f61efeea47
Reviewed-on: https://skia-review.googlesource.com/70640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-15 20:06:12 +00:00
Greg Daniel
33d17cbb00 Add private grpixelconfigs for alpha_8 and alpha_half
Bug: skia:
Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
Reviewed-on: https://skia-review.googlesource.com/71763
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-15 20:02:43 +00:00
Greg Daniel
ab081ae7e4 Move static helper functions for GrPixelConfig to private.
Bug: skia:
Change-Id: I207cce77cbe46e0016afe932a06dba12e732c5da
Reviewed-on: https://skia-review.googlesource.com/71281
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-14 17:14:34 +00:00
Greg Daniel
5254ccc181 Move pixel config getter to private in GrBackendSurface
We eventually want to remove pixel config from GrBackendSurface so this
helps to insure that clients don't rely on it.

Bug: skia:
Change-Id: I6b8435d12347fab62c0f9032addea1211aa703ca
Reviewed-on: https://skia-review.googlesource.com/70642
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-13 20:39:51 +00:00
Greg Daniel
037d1fc453 Use vulkan prototypes for android framework build
The framework still directly calls vulkan vkGetInstanceProcAddr (and device).

Bug: skia:
Change-Id: Ie20a4fc4f58d0f51f995605dc8464a4e26b76602
Reviewed-on: https://skia-review.googlesource.com/69923
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-10 18:31:47 +00:00
Greg Daniel
83bd441480 Set VK_NO_PROTOTYPES for vulkan backend
Bug: skia:
Change-Id: Id740efe6030b70271b0eb3a3bd6a111202f28fd8
Reviewed-on: https://skia-review.googlesource.com/69160
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-11-10 15:47:37 +00:00
Brian Salomon
821ef188b3 Allow mock GrContexts to "support" shader derivatives
Change-Id: I0d8dce5e0873a058b59baae9c35903b2444a76fd
Reviewed-on: https://skia-review.googlesource.com/68480
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-08 12:46:26 +00:00
Brian Salomon
af59748114 Add GrContextOptions to control distance field thresholds for small sizes and fallback to paths.
Change-Id: Ib57c40b1b50c5afe079b2099d1a83986629ea287
Reviewed-on: https://skia-review.googlesource.com/68217
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-08 01:34:06 +00:00
Chris Dalton
fddb6c0399 Setup CCPR testing with GrMockContext
Beefs up the mock context to be able to support CCPR, sets up a
framework for testing CCPR with the mock context, and adds a new test.

Bug: skia:
Change-Id: If95f92726f7b1a7f52ad04ca8126551f58ea8032
Reviewed-on: https://skia-review.googlesource.com/67980
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-06 20:44:19 +00:00
Brian Salomon
9f545bc18a Modify fontcache GM to actually spill atlas.
Adds an option to GrDrawOpAtlas to disable multitexturing.

Adds option to GrContextOptions to disable multitexturing for glyph atlases.


Change-Id: If413ab7061538fa0e75628d252be4fd14215b6ba
Reviewed-on: https://skia-review.googlesource.com/67802
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-06 16:06:09 +00:00
Jim Van Verth
6a40abc8c7 Revert "Implement window rectangles in vulkan"
This reverts commit 94c0468b2b.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Implement window rectangles in vulkan
> 
> Bug: skia:
> Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a
> Reviewed-on: https://skia-review.googlesource.com/65423
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I5a90cb57fb5d4bcf8c7e76a5f71a7f16edbaf6be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/67060
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-11-02 16:56:19 +00:00
Chris Dalton
94c0468b2b Implement window rectangles in vulkan
Bug: skia:
Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a
Reviewed-on: https://skia-review.googlesource.com/65423
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-02 15:27:21 +00:00
Ethan Nicholas
d1b2eec0d0 API to cache shader binaries between runs of Skia.
This CL does not include an actual implementation of said cache.
Stan is working on the cache implementation on the Android side of
things.

Bug: skia:
Change-Id: Iabe4f19b2dbacaaa1ead8bb3fa68d88c687b9a84
Reviewed-on: https://skia-review.googlesource.com/54780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-02 13:07:41 +00:00
Greg Daniel
45d6303f6e Have mip status match surface when snapping image from wrapped object
Also fixes some bugs involved with creating mipped SkSurfaces.

Bug: skia:
Change-Id: I6e0109000eadd2bdee4a907d3ee2231104528165
Reviewed-on: https://skia-review.googlesource.com/65063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-30 20:06:53 +00:00
Greg Daniel
e252f08982 Add hint to SkSurface::MakeRenderTarget that we will use mips
Additionally this changed triggered a cascade of plumbing GrMipMapped
down throughout Ganesh.

Bug: skia:
Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb
Reviewed-on: https://skia-review.googlesource.com/63000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-23 20:25:59 +00:00
Brian Salomon
43f8bf0f78 Move clear-as-draw workaround to GrGLGpu and expose via GrContextOptions.
Bug: skia:7154
Change-Id: I23ffc11dab4a377fbd6b7e4e33722b3fa0793d58
Reviewed-on: https://skia-review.googlesource.com/60681
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-18 12:55:06 +00:00
Eric Karl
914a36b248 MakeBackendTextureFromSkImage
Creates a static function on SkImage which converts the SkImage to a
GrBackendTexture. The texture is unowned by Skia, and must be deleted
by the caller. Allows for a no-copy / no-conversion fast path if the
provided image is unowned (unique()) and texture backed.

Change-Id: I8a48f9cc39de792725cd72057d98cd1c4594daab
Reviewed-on: https://skia-review.googlesource.com/52440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-10-12 20:05:31 +00:00
Greg Daniel
177e695589 Add flag on GrBackendTexture to say whether texture is mipped or not
Bug: skia:
Change-Id: Ia684e3daf779ec2feaaec64c04dabf5cb03cd07a
Reviewed-on: https://skia-review.googlesource.com/57821
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-12 17:02:41 +00:00
Greg Daniel
0fc4d2d269 Use enum to track MipMapsStatus throughout Texture creation
Bug: skia:
Change-Id: I1de1105d74b45f7b02ff52e6b8333801d98ef1ce
Reviewed-on: https://skia-review.googlesource.com/58501
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-12 16:12:42 +00:00
Brian Salomon
0b4d8aa108 Add benchmark for comparing multitexturing to non-multitexturing image draws.
Allows benchmarks to override GrContextOptions.

Removes the ability to use the same GrContext for all benchmarks in a config.

Change-Id: I5ab9f6e81055451ac912a66537843d1a49f3b479
Reviewed-on: https://skia-review.googlesource.com/34080
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-11 20:32:49 +00:00
Greg Daniel
834f12076f Set correct mip map status on GrTexture since we no longer require all mip data
Bug: skia:
Change-Id: I5074028f307187eef3201523cbd1ddc7d9bf9013
Reviewed-on: https://skia-review.googlesource.com/54102
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-10 16:45:43 +00:00