Commit Graph

3319 Commits

Author SHA1 Message Date
Mike Reed
6e87eee2a0 add shadermaskfilter
next steps:
- gpu impl (will look a lot like shader's asFragProcessor
- special-case rect-input (?)
- explore stages w/ mtklein

Bug: skia:7500
Change-Id: I71089e421d32443a3ddded6967b3e5bc67ed43f2
Reviewed-on: https://skia-review.googlesource.com/95104
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-18 21:24:38 +00:00
Leon Scroggins III
2e0fadb06c Add a GM and images to test SkEncodedOrigin
Bug: skia:7138
Change-Id: I4800bcffc6a397cb688e63a505dd36145e423fa2
Reviewed-on: https://skia-review.googlesource.com/95083
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-01-17 16:14:16 +00:00
Mike Reed
23e0cf2963 relax path bounds check
Revert of https://skia-review.googlesource.com/c/skia/+/94100

Reduced the "big" value by the amount we super-sample shift

Bug: skia:
Change-Id: I7b37b7db841312b0863f76cb353cc916aff1cfa8
Reviewed-on: https://skia-review.googlesource.com/94801
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-16 20:36:09 +00:00
Robert Phillips
0bd24dc41f Funnel most proxy creation through GrProxyProvider
This is to provide a choke point for DDL to create Lazy Proxies.

Change-Id: If178da13bc6447b31b7601810236d34502d9efbd
Reviewed-on: https://skia-review.googlesource.com/93303
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-16 13:28:43 +00:00
Mike Reed
ff25cdf898 Revert "relax path bounds check so we can draw larger paths"
This reverts commit e2330261a7.

Reason for revert: triggered assert

48.3s	start tiles_rt-8888 gm  bigrect
48.3s	start tiles_rt-8888 gm  big_rrect_circle_aa_effect
48.3s	start tiles_rt-8888 gm  big_rrect_ellipse_aa_effect
../../../src/core/SkScan_Path.cpp(229): fatal error: "assert(leftE->fFirstY <= stop_y)"


Original change's description:
> relax path bounds check so we can draw larger paths
> 
> Bug:800804
> Change-Id: Ief0679de95887d8e11aa5853228c2bdef27d07a2
> Reviewed-on: https://skia-review.googlesource.com/94100
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I63509625b8afaa2064f0b187c17b73bd7739cdb9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 800804
Reviewed-on: https://skia-review.googlesource.com/94481
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-12 21:59:34 +00:00
Mike Reed
e2330261a7 relax path bounds check so we can draw larger paths
Bug:800804
Change-Id: Ief0679de95887d8e11aa5853228c2bdef27d07a2
Reviewed-on: https://skia-review.googlesource.com/94100
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-12 19:31:04 +00:00
Mike Klein
98e38e2ac5 Revert "Revert "fix legacy makeRasterImage()""
This reverts commit ef29e42ef3.

Reason for revert: probably not either roll.

Original change's description:
> Revert "fix legacy makeRasterImage()"
> 
> This reverts commit 7c4ca04336.
> 
> Reason for revert: layout, cereal tests?
> 
> Original change's description:
> > fix legacy makeRasterImage()
> > 
> > Passing the color space down into SkImage_Lazy ends up triggering a
> > SkTransferFunctionBehavior::kRespect decode (tf(r*a)), where we want
> > ignore (tf(r)*a) to have any hope of working with the legacy backend.
> > 
> > This fix in turn needs another little extension of another old hack in
> > SkImage_Gpu for makeNonTextureImage() to keep working there.
> > 
> > Bug: skia:7479
> > 
> > Change-Id: If48ca68e95d9eee597f6b10434498049981314ba
> > Reviewed-on: https://skia-review.googlesource.com/93380
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> 
> TBR=mtklein@chromium.org,brianosman@google.com
> 
> Change-Id: I65092e01d767ef1fd35563f0b79ceded3c12b267
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7479
> Reviewed-on: https://skia-review.googlesource.com/93820
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: Ic9b48d311cca152ab2e620363dd4528ed382eb88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7479
Reviewed-on: https://skia-review.googlesource.com/93960
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-01-12 16:00:00 +00:00
Mike Klein
ef29e42ef3 Revert "fix legacy makeRasterImage()"
This reverts commit 7c4ca04336.

Reason for revert: layout, cereal tests?

Original change's description:
> fix legacy makeRasterImage()
> 
> Passing the color space down into SkImage_Lazy ends up triggering a
> SkTransferFunctionBehavior::kRespect decode (tf(r*a)), where we want
> ignore (tf(r)*a) to have any hope of working with the legacy backend.
> 
> This fix in turn needs another little extension of another old hack in
> SkImage_Gpu for makeNonTextureImage() to keep working there.
> 
> Bug: skia:7479
> 
> Change-Id: If48ca68e95d9eee597f6b10434498049981314ba
> Reviewed-on: https://skia-review.googlesource.com/93380
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I65092e01d767ef1fd35563f0b79ceded3c12b267
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7479
Reviewed-on: https://skia-review.googlesource.com/93820
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-01-12 12:52:48 +00:00
Mike Klein
7c4ca04336 fix legacy makeRasterImage()
Passing the color space down into SkImage_Lazy ends up triggering a
SkTransferFunctionBehavior::kRespect decode (tf(r*a)), where we want
ignore (tf(r)*a) to have any hope of working with the legacy backend.

This fix in turn needs another little extension of another old hack in
SkImage_Gpu for makeNonTextureImage() to keep working there.

Bug: skia:7479

Change-Id: If48ca68e95d9eee597f6b10434498049981314ba
Reviewed-on: https://skia-review.googlesource.com/93380
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-01-11 19:17:31 +00:00
Mike Reed
d284949b59 restore intersect methods to use old-style empty-checks on their inputs
Bug introduced when we made isEmpty check for int32_t width/height

Bug:800804
Change-Id: I59799c88fb02f176c1545dd0edae050b510df079
Reviewed-on: https://skia-review.googlesource.com/93302
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-10 20:39:33 +00:00
Hal Canary
99578d24c0 SkBitmap now *has* a SkPixmap.
Before:

    class SkBitmap {
        sk_sp<SkPixelRef> fPixelRef;
        void*             fPixels;
        SkImageInfo       fInfo;
        uint32_t          fRowBytes;
        uint8_t           fFlags;
    };

After:

    class SkBitmap {
        sk_sp<SkPixelRef> fPixelRef;
        SkPixmap          fPixmap;
        uint8_t           fFlags;
    };

Change-Id: I62d59ca3e702b7adea022cd3cfbf0cc3186af957
Reviewed-on: https://skia-review.googlesource.com/85560
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-01-09 16:46:22 +00:00
Robert Phillips
579f094f12 Fix build
This fixes two issues with https://skia-review.googlesource.com/c/skia/+/91501:

1) The .fp files weren't updated to handle the move of proxyProvider to GrContextPriv
2) There were some missing guards for abandoned context's in the proxyprovider

Change-Id: I2a704ff2aec5f8f9a7ebaab9b8632abb5cf2e42c
Reviewed-on: https://skia-review.googlesource.com/92084
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2018-01-08 20:23:31 +00:00
Robert Phillips
1afd4cdb08 Add GrProxyProvider
This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider.

Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f
Reviewed-on: https://skia-review.googlesource.com/91501
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-08 19:05:31 +00:00
Mike Reed
4c79ecf2f4 cubic-map for non-linear t
Bug: skia:
Change-Id: I248864bd853361c1abfc2d8af61a27ab27a49a91
Reviewed-on: https://skia-review.googlesource.com/38882
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-05 17:58:21 +00:00
Brian Osman
876c841f9b Always create a raster (cached) image
This avoids bugs in Viewer when starting in GL or Vulkan, then trying to
reuse the image that points to a (possibly deleted) context when
switching backends.

Bug: skia:
Change-Id: I4628aba5298bb733b8f4bb562cdbc872779d2829
Reviewed-on: https://skia-review.googlesource.com/90882
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-04 21:25:54 +00:00
Mike Reed
46596ae505 use tool_utils to encapsulate checking for recording canvas and makeSurface
Bug: skia:
Change-Id: Ia93ee09dd213b8d6ad5c18e887add5ff3448c824
Reviewed-on: https://skia-review.googlesource.com/90243
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-02 21:06:41 +00:00
Ethan Nicholas
7461a4abe0 converted YUVEffect to SkSL
Bug: skia:
Change-Id: I1875e44417a0a583c4f35ee4d46856a34ba55245
Reviewed-on: https://skia-review.googlesource.com/88580
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-12-22 14:06:45 +00:00
Brian Salomon
72f78c3701 Make GrShape recognize horizontal/vertical dashed lines with 0 off intervals as rrects.
Change-Id: Ic29b41911e0185d36093d5352f4494709e8124ba
Reviewed-on: https://skia-review.googlesource.com/88428
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-12-21 22:45:15 +00:00
Greg Daniel
9838b49b2e Revert "Revert "long rect dash fix with guards""
This reverts commit fa6b6c2d1b.

Reason for revert: Looks like this was actually caused by another change but happen to fail a test that looked very related to this

Original change's description:
> Revert "long rect dash fix with guards"
> 
> This reverts commit 93ceab1b59.
> 
> Reason for revert: breaking layout test
> 
> Original change's description:
> > long rect dash fix with guards
> > 
> > long rect dash with guards
> > 
> > check dash fix back in with
> > guards against changing
> > chrome layout test results
> > 
> > original change clipped against wrong rectangle
> > some of the time, causing tiled drawing to fail.
> > Always clip against outset rectangle.
> > 
> > original CL: skia-review.googlesource.com/c/skia/+/84862
> > 
> > efficiently dash very large rectangles and very long lines
> > Speed up dashing when lines and rects are absurdly large.
> > 
> > Prior to this CL, only horizontal lines were detected.
> > 
> > Also folded in a change to handle dashing of zero length lines.
> > 
> > TBR=egdaniel@google.com
> > Bug: skia:7311
> > Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
> > Reviewed-on: https://skia-review.googlesource.com/87768
> > Reviewed-by: Cary Clark <caryclark@skia.org>
> > Commit-Queue: Cary Clark <caryclark@skia.org>
> 
> TBR=egdaniel@google.com,caryclark@skia.org
> 
> Change-Id: I56ef771ccb281887d7381c2bd8a2553acbd30621
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7311
> Reviewed-on: https://skia-review.googlesource.com/88421
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: Iecdd072544e6623bc4de8d5aab1402378112512d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/88424
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-21 14:55:11 +00:00
Greg Daniel
fa6b6c2d1b Revert "long rect dash fix with guards"
This reverts commit 93ceab1b59.

Reason for revert: breaking layout test

Original change's description:
> long rect dash fix with guards
> 
> long rect dash with guards
> 
> check dash fix back in with
> guards against changing
> chrome layout test results
> 
> original change clipped against wrong rectangle
> some of the time, causing tiled drawing to fail.
> Always clip against outset rectangle.
> 
> original CL: skia-review.googlesource.com/c/skia/+/84862
> 
> efficiently dash very large rectangles and very long lines
> Speed up dashing when lines and rects are absurdly large.
> 
> Prior to this CL, only horizontal lines were detected.
> 
> Also folded in a change to handle dashing of zero length lines.
> 
> TBR=egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
> Reviewed-on: https://skia-review.googlesource.com/87768
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: I56ef771ccb281887d7381c2bd8a2553acbd30621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/88421
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-21 14:33:31 +00:00
Cary Clark
93ceab1b59 long rect dash fix with guards
long rect dash with guards

check dash fix back in with
guards against changing
chrome layout test results

original change clipped against wrong rectangle
some of the time, causing tiled drawing to fail.
Always clip against outset rectangle.

original CL: skia-review.googlesource.com/c/skia/+/84862

efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.

Prior to this CL, only horizontal lines were detected.

Also folded in a change to handle dashing of zero length lines.

TBR=egdaniel@google.com
Bug: skia:7311
Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
Reviewed-on: https://skia-review.googlesource.com/87768
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-12-20 19:18:36 +00:00
Cary Clark
16a127fa60 Revert "long rect dash with guards"
This reverts commit 4ad0c592ce.

Reason for revert: test fails in tiled case
Original change's description:
> long rect dash with guards
> 
> check dash fix back in with
> guards against changing
> chrome layout test results
> 
> original CL: skia-review.googlesource.com/c/skia/+/84862
> 
> efficiently dash very large rectangles and very long lines
> Speed up dashing when lines and rects are absurdly large.
> 
> Prior to this CL, only horizontal lines were detected.
> 
> Also folded in a change to handle dashing of zero length lines.
> 
> TBR=egdaniel@google.com
> Bug: skia:7311
> Change-Id: I139b10f676e7ae06ad83aaf2a35d49cf06280a67
> Reviewed-on: https://skia-review.googlesource.com/87760
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@skia.org>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: Ifd35ddf395826a55c72e650470527d01740b6438
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87841
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-20 16:53:05 +00:00
Cary Clark
d5f447367c Revert "forgot to turn off dash test"
This reverts commit 2b974e4be9.

Reason for revert: test fails in tiled case
Original change's description:
> forgot to turn off dash test
> 
> TBR=egdaniel@google.com
> NOTRY=true
> Bug: skia:
> Change-Id: Id1cf3e25d04e5dab8148114c4378abaa49fd67bc
> Reviewed-on: https://skia-review.googlesource.com/87761
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@skia.org>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: I40aa957c210dec9367bae6cc1be8ca0a044a31af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/87840
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-20 16:51:46 +00:00
Cary Clark
2b974e4be9 forgot to turn off dash test
TBR=egdaniel@google.com
NOTRY=true
Bug: skia:
Change-Id: Id1cf3e25d04e5dab8148114c4378abaa49fd67bc
Reviewed-on: https://skia-review.googlesource.com/87761
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-12-20 14:51:44 +00:00
Cary Clark
4ad0c592ce long rect dash with guards
check dash fix back in with
guards against changing
chrome layout test results

original CL: skia-review.googlesource.com/c/skia/+/84862

efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.

Prior to this CL, only horizontal lines were detected.

Also folded in a change to handle dashing of zero length lines.

TBR=egdaniel@google.com
Bug: skia:7311
Change-Id: I139b10f676e7ae06ad83aaf2a35d49cf06280a67
Reviewed-on: https://skia-review.googlesource.com/87760
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-12-20 14:38:04 +00:00
Brian Salomon
b5086961f3 Add matrix stack to SkAtlasTextTarget.
Makes SkAtlasTextRenderer::SDFVertex now has a 3 component position vector.

Change-Id: I7ec1a8068fb84388a82e1748d6e9d02820d55abd
Reviewed-on: https://skia-review.googlesource.com/84202
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-12-20 14:00:44 +00:00
Brian Salomon
5c6ac64516 Revert "Revert "move homogenous with stride to matrixpriv""
This reverts commit de71572f65.

Revert "Revert "Transform vertices for distance field glyphs on CPU.""

This reverts commit f226e66d75.

Change-Id: I2545afae3beb1d6b14bba056853ed826ae7a4679
Reviewed-on: https://skia-review.googlesource.com/86603
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-19 20:23:06 +00:00
Cary Clark
394197d064 Revert "efficiently dash very large rectangles and very long lines"
This reverts commit 1ad81981b0.

Reason for revert: broke chrome layout tests
Original change's description:
> efficiently dash very large rectangles and very long lines
> 
> Speed up dashing when lines and rects are absurdly large.
> 
> Prior to this CL, only horizontal lines were detected.
> 
> The onOnceBeforeDraw changes are there to make debugging easier.
> 
> Also folded in a change to handle dashing of zero length lines.
> 
> R=​reed@google.com, egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
> Reviewed-on: https://skia-review.googlesource.com/84862
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=egdaniel@google.com,reed@google.com,caryclark@skia.org

Change-Id: I5e8f04c54486f8cd1a931f6cade92feaaa4a7647
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87282
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-19 20:20:17 +00:00
Cary Clark
b0abd8502b Revert "disable large rect dash temporarily"
This reverts commit 54956e1581.

Reason for revert: original cl broke chrome layout tests

Original change's description:
> disable large rect dash temporarily
> 
> fix the build
> 
> TBR:halcanary@google.com
> NOTRY=true
> Bug: skia:7423
> Change-Id: I362fdf2b56c08111c1feab9ffd72351f2ff16f91
> Reviewed-on: https://skia-review.googlesource.com/87002
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=halcanary@google.com,caryclark@skia.org

Change-Id: Ia71118dfb7d59ad9d4962d90f2e9a016b0988d0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7423
Reviewed-on: https://skia-review.googlesource.com/87281
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-19 20:17:27 +00:00
Jim Van Verth
744cbb3888 Fix alpha contribution to tonal color.
Also adds a tonal color GM, a grayscale mode to shadowutils GM,
and animated alpha to SampleAndroidShadows.

Bug: skia:
Change-Id: I1dcb5cab7e53ffa7a3bf1a07b6ebfed38df1a9ed
Reviewed-on: https://skia-review.googlesource.com/85002
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-12-19 19:27:06 +00:00
Cary Clark
54956e1581 disable large rect dash temporarily
fix the build

TBR:halcanary@google.com
NOTRY=true
Bug: skia:7423
Change-Id: I362fdf2b56c08111c1feab9ffd72351f2ff16f91
Reviewed-on: https://skia-review.googlesource.com/87002
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-12-19 15:31:16 +00:00
Cary Clark
1ad81981b0 efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.

Prior to this CL, only horizontal lines were detected.

The onOnceBeforeDraw changes are there to make debugging easier.

Also folded in a change to handle dashing of zero length lines.

R=reed@google.com, egdaniel@google.com
Bug: skia:7311
Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
Reviewed-on: https://skia-review.googlesource.com/84862
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-12-19 14:51:26 +00:00
Greg Daniel
f226e66d75 Revert "Transform vertices for distance field glyphs on CPU."
This reverts commit 0215e39d7e.

Reason for revert: break intel 540 and HD2000 intel release bots on gltestthreading gm  dftext_blob_pers

Original change's description:
> Transform vertices for distance field glyphs on CPU.
> 
> This allows batching of DF draws with different view matrices.
> 
> For perspective matrices this means the transformed position vertex
> attribute must have w values. Currently, non-perspective DF draws still
> use 2 component positions, though this could be changed in the future.
> Consequently, perspective draws can batch with other perspective draws
> but not non-perspective draws.
> 
> Adds a GM to test batching and reusing the same blobs with both perspective
> and non-perspective matrices.
> 
> Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e
> Reviewed-on: https://skia-review.googlesource.com/79900
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

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

Change-Id: Idc658d9263976d5b5e00a5026c5d6d3c8f4bdc2d
Reviewed-on: https://skia-review.googlesource.com/86560
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-12-18 21:50:26 +00:00
Greg Daniel
f5d8758f29 Add new SkImage factory to create from GrBackendTexture with SkColorType
Bug: skia:
Change-Id: I46bdc54b6d9cdacc8f5a06644aa6b110837879f0
Reviewed-on: https://skia-review.googlesource.com/84342
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-18 21:17:46 +00:00
Herb Derby
4fafedd33a Make unit test tickle msan bug.
Tested using MSAN with image clearing code
removed.

Change-Id: Ic863328c868887455bb92650d3fdcecbf4d2b1cf
Reviewed-on: https://skia-review.googlesource.com/86761
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-18 20:49:02 +00:00
Mike Klein
a2192a76b5 point deferredtextureimage GMs at resources/images
Change-Id: If2f75023831d0992bd0e8429d36fd3f40a04b2a0
Reviewed-on: https://skia-review.googlesource.com/86600
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-18 17:08:02 +00:00
Eric Karl
aae533e418 Revert "Remove SkImage deferred texture image data APIs."
This reverts commit 4f5e1d4ff3.

Reason for revert: Unfortunately, we need this in Chrome for a bit longer. Working on understanding why the new path led to regressions. Will re-land this once the new path sticks.

Original change's description:
> Remove SkImage deferred texture image data APIs.
> 
> These APIs existed for Chrome. Chrome is no longer using them.
> 
> Change-Id: I15a5e2f88c7e8d1356188748fc68d4658f6f1849
> Reviewed-on: https://skia-review.googlesource.com/81021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org

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

Change-Id: Ic9f683f262f2e1d0469156360f5ffaee977ca44a
Reviewed-on: https://skia-review.googlesource.com/86280
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-12-15 23:57:41 +00:00
Brian Salomon
0215e39d7e Transform vertices for distance field glyphs on CPU.
This allows batching of DF draws with different view matrices.

For perspective matrices this means the transformed position vertex
attribute must have w values. Currently, non-perspective DF draws still
use 2 component positions, though this could be changed in the future.
Consequently, perspective draws can batch with other perspective draws
but not non-perspective draws.

Adds a GM to test batching and reusing the same blobs with both perspective
and non-perspective matrices.

Change-Id: I0e42c5449ebf3a5a54025dbcdec824d904d5bd9e
Reviewed-on: https://skia-review.googlesource.com/79900
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-12-15 17:06:08 +00:00
Cary Clark
0b1df4b87a fix zero length dashed lines
targeted fix turns zero length line
into very short line.

R=egdaniel@google.com
Bug: skia:7387
Change-Id: Ic2a809d30d722f4e8f51d9205666dc1476a10067
Reviewed-on: https://skia-review.googlesource.com/84661
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-15 16:10:38 +00:00
Hal Canary
a088365e2f SkBitmap::pixmap
Change-Id: I6d062b9ae1d242970be140d5a1885639c8c45f77
Reviewed-on: https://skia-review.googlesource.com/85320
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-15 01:23:57 +00:00
Yuqian Li
81d9f0d42e Add strip 2pt conical GM
This is distilled from 82161 so we can first change the GMs of our
previous bots and then compare the same GM between the old algorithm
and the new one.

Bug: skia:
Change-Id: I4b13bb1a06d109b60c8e29f5f87adad47d0a811b
Reviewed-on: https://skia-review.googlesource.com/84523
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-12-13 21:11:10 +00:00
Yuqian Li
2c4e56c366 Revert "Reimplement TwoPointConicalGradient_gpu"
This reverts commit 84f18c422a.

Reason for revert: GMs are incorrect on some mobile devices

Original change's description:
> Reimplement TwoPointConicalGradient_gpu
> 
>     4.24% faster in gradient_conical_clamp_shallow_dither
>     6.43% faster in gradient_conicalOutZero_clamp_hicolor
>    10.41% faster in gradient_conicalOut_clamp_hicolor
>    14.85% faster in gradient_conicalOutZero_clamp_3color
>    16.72% faster in gradient_conicalOut_clamp
>    24.30% faster in gradient_conicalOut_clamp_3color
> 
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android
> 
> Bug: skia:
> Change-Id: I6bc1f24c9463fc9c2acbcba7bd4d55b37ade1613
> Reviewed-on: https://skia-review.googlesource.com/82161
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>

TBR=egdaniel@google.com,fmalita@google.com,liyuqian@google.com

Change-Id: Ieb20cce12a958abb8293218b89baf3d5a2aad0a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Cq-Include-Trybots: skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android, Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android
Reviewed-on: https://skia-review.googlesource.com/84801
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-12-13 19:55:01 +00:00
Yuqian Li
84f18c422a Reimplement TwoPointConicalGradient_gpu
4.24% faster in gradient_conical_clamp_shallow_dither
    6.43% faster in gradient_conicalOutZero_clamp_hicolor
   10.41% faster in gradient_conicalOut_clamp_hicolor
   14.85% faster in gradient_conicalOutZero_clamp_3color
   16.72% faster in gradient_conicalOut_clamp
   24.30% faster in gradient_conicalOut_clamp_3color

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android,Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android

Bug: skia:
Change-Id: I6bc1f24c9463fc9c2acbcba7bd4d55b37ade1613
Reviewed-on: https://skia-review.googlesource.com/82161
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-12-13 18:58:00 +00:00
Hal Canary
15bd9249de gm: image-surface: stop looking for nonexistant file
Change-Id: Iaac032f96b47901effb303cd99be15145c66fae1
Reviewed-on: https://skia-review.googlesource.com/84500
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-13 15:56:42 +00:00
Robert Phillips
c25db63753 Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture
Change-Id: I7ba030c5d7856309709e892a2b1b625cf74c70b8
Reviewed-on: https://skia-review.googlesource.com/82823
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-13 15:20:12 +00:00
Brian Osman
36703d9d36 Push much of the SkColorSpace_Base interface up to SkColorSpace
Some pieces still remain, but the next step looks less mechanical,
so I wanted to land this piece independently.

Bug: skia:
Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2
Reviewed-on: https://skia-review.googlesource.com/84120
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-12 19:34:29 +00:00
Robert Phillips
d21b2a5d5c Remove GrBackendObject from tests (except image_from_yuv_textures)
This sets the stage for landing https://skia-review.googlesource.com/c/skia/+/82823 (Update SkImage::MakeFromYUVTexturesCopy to GrBackendTexture)

Change-Id: I2c62f23dc447b9ad55c0b5f06bcd6d7ca0ec4d2b
Reviewed-on: https://skia-review.googlesource.com/83920
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-12 18:45:09 +00:00
Chris Dalton
344e9037e1 Prefer fullscreen clears on Qualcomm/GL
Adds Qualcomm to the set of GL devices on which we prefer fullscreen
clears.

Renames fullscreenClearIsFree in GrCaps to preferFullscreenClears.

Replaces 'bool canIgnoreClip' on GrRenderTargetContext::clear with an
enum.

Bug: skia:
Change-Id: I5b30298c4d0b092c398b9fea6060f3e2bea91e46
Reviewed-on: https://skia-review.googlesource.com/83060
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-12 15:21:09 +00:00
Stan Iliev
ca8c0953e8 Implement a fast path for solid color lattice rectangle
Add a flag that hints, which lattice rectangles are solid colors.
Draw solid rectangles and 1x1 rectangles with drawRect.

Test: Measured performance of a ninepatch drawn by HWUI
Bug: b/69796044
Change-Id: Ib3b00ca608da42fa9f2d2038cc126a978421ec7c
Reviewed-on: https://skia-review.googlesource.com/79821
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-12-11 18:26:18 +00:00
Mike Klein
46020c4409 The downsamplebitmap_image GMs only use one image.
So there's no need to include the image name or path in the GM name.

Change-Id: Idc510906ae77c5c73756f41bc13e859e231e9139
Reviewed-on: https://skia-review.googlesource.com/83320
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-11 16:38:58 +00:00