Commit Graph

5828 Commits

Author SHA1 Message Date
Brian Salomon
e4949406eb Revert "Reland "Revert "Add arcs as a specialized geometry to GrShape."""
This reverts commit 580aee2fa4.

Bug: skia:7794
Change-Id: I9c2b923859c826dff58c22c529dc4e2ab4d0f186
Reviewed-on: https://skia-review.googlesource.com/124042
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-26 19:50:23 +00:00
Brian Salomon
580aee2fa4 Reland "Revert "Add arcs as a specialized geometry to GrShape.""
This reverts commit 8a98bc9674.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Add arcs as a specialized geometry to GrShape.""
> 
> This reverts commit af88ec3712.
> 
> Bug: skia:7794
> Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb
> Reviewed-on: https://skia-review.googlesource.com/123627
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ib09a533600028b76a69b455c952f3dd12b39bdba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7794
Reviewed-on: https://skia-review.googlesource.com/123780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-25 21:20:30 +00:00
Brian Salomon
43227522e4 Make SkString::appendf safe for long strings.
Bug: skia:7841
Change-Id: I5bc77f5230b63da74e42d756ab4a1fefcfab9926
Reviewed-on: https://skia-review.googlesource.com/123634
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-25 20:58:09 +00:00
Chris Dalton
218c29453f Remove the MSAA path renderer
Bug: skia:
Change-Id: Ib18bede613c8d27fd6326f655dc2d638e35870ff
Reviewed-on: https://skia-review.googlesource.com/123726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-25 19:59:59 +00:00
Brian Salomon
8a98bc9674 Revert "Revert "Add arcs as a specialized geometry to GrShape.""
This reverts commit af88ec3712.

Bug: skia:7794
Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb
Reviewed-on: https://skia-review.googlesource.com/123627
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-25 18:54:07 +00:00
Mike Reed
910ca0fd01 Experiment to track coverage in a layer
Bug: skia:
Change-Id: I5ed334f63e64991944394dc8103092a2c6280546
Reviewed-on: https://skia-review.googlesource.com/122000
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-04-25 17:34:27 +00:00
Ben Wagner
ff134f20ae Compile with latest clang 7.
Changes to warnings in clang introduced by https://reviews.llvm.org/D43322
and https://reviews.llvm.org/D44883 cause warning as error failures when
building Skia. In particular this addresses return-std-move-in-c++11 and
self-assign-overloaded.

Change-Id: I680318098d8af1b64fba464585c7cdfcfcf39d66
Reviewed-on: https://skia-review.googlesource.com/123582
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-24 20:58:06 +00:00
Cary Clark
6cdb7d3a4c prepare to remove obsolete macros
SkColorSetARGBMacro and SkColorSetARGBInline
are macros which will be deleted. Replace them
with a standard equivalent.

R=scroggo@google.com
Bug: skia:6898
Change-Id: I16e010776e991c19a375d0686ecd1b1cc4c59a9b
Reviewed-on: https://skia-review.googlesource.com/123501
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2018-04-24 19:19:01 +00:00
Mike Klein
55d330c32d Reland "call skcms_OptimizeForSpeed()"
This is a reland of 3b8feb331a

Original change's description:
> call skcms_OptimizeForSpeed()
> 
> I've guarded src and dst separately, so that we can land,
> rebaseline just the src change, and then later (when it
> does something), rebaseline optimizing dst separately.
> 
> Small threshold tweak to keep a unit test passing.
> 
> Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0
> Reviewed-on: https://skia-review.googlesource.com/123181
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ia29b4c941e121486a627ac7221947f4a452211ad
Reviewed-on: https://skia-review.googlesource.com/123480
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-04-24 18:55:36 +00:00
Mike Klein
af88ec3712 Revert "Add arcs as a specialized geometry to GrShape."
This reverts commit 255bcf57ff.

Reason for revert: layout and scuba image diffs

Original change's description:
> Add arcs as a specialized geometry to GrShape.
> 
> BUG: skia:7794
> 
> Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d
> Reviewed-on: https://skia-review.googlesource.com/122900
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I9293b8fbb535d940bca5fc30a95908416b9eb7a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/123362
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-04-24 12:18:47 +00:00
Mike Klein
1b4ad0d1eb Revert "call skcms_OptimizeForSpeed()"
This reverts commit 3b8feb331a.

Reason for revert: darks too bright

Original change's description:
> call skcms_OptimizeForSpeed()
> 
> I've guarded src and dst separately, so that we can land,
> rebaseline just the src change, and then later (when it
> does something), rebaseline optimizing dst separately.
> 
> Small threshold tweak to keep a unit test passing.
> 
> Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0
> Reviewed-on: https://skia-review.googlesource.com/123181
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I23e59d4dc711e8b112e70f31a5c9abad67551bcd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/123361
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-04-24 00:11:06 +00:00
Brian Salomon
255bcf57ff Add arcs as a specialized geometry to GrShape.
BUG: skia:7794

Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d
Reviewed-on: https://skia-review.googlesource.com/122900
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-23 23:27:53 +00:00
Mike Klein
3b8feb331a call skcms_OptimizeForSpeed()
I've guarded src and dst separately, so that we can land,
rebaseline just the src change, and then later (when it
does something), rebaseline optimizing dst separately.

Small threshold tweak to keep a unit test passing.

Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0
Reviewed-on: https://skia-review.googlesource.com/123181
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-04-23 23:27:52 +00:00
Robert Phillips
c90b4dbec5 Reland "Prevent masked solid-color draws from being turned into clears"
This reverts commit f92bb3785f.

Reason for revert: The new unit test has been suppressed on ANGLE

Original change's description:
> Revert "Prevent masked solid-color draws from being turned into clears"
> 
> This reverts commit e9f2bbe082.
> 
> Reason for revert: ANGLE
> 
> Original change's description:
> > Prevent masked solid-color draws from being turned into clears
> > 
> > GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle.
> > 
> > Bug: skia:7765
> > Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb
> > Reviewed-on: https://skia-review.googlesource.com/122793
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: I1b7752eab0fcf55ab6248eed587fd85d438efd78
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7765
> Reviewed-on: https://skia-review.googlesource.com/122960
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: If432c24548ef0f6df4fd6a06aa3b1fb38ba793b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7765
Reviewed-on: https://skia-review.googlesource.com/123000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-23 15:12:11 +00:00
Robert Phillips
f92bb3785f Revert "Prevent masked solid-color draws from being turned into clears"
This reverts commit e9f2bbe082.

Reason for revert: ANGLE

Original change's description:
> Prevent masked solid-color draws from being turned into clears
> 
> GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle.
> 
> Bug: skia:7765
> Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb
> Reviewed-on: https://skia-review.googlesource.com/122793
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I1b7752eab0fcf55ab6248eed587fd85d438efd78
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7765
Reviewed-on: https://skia-review.googlesource.com/122960
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-23 13:39:30 +00:00
Robert Phillips
e9f2bbe082 Prevent masked solid-color draws from being turned into clears
GrRenderTargetContext::drawRect was eliding a BlurMask filtered circle.

Bug: skia:7765
Change-Id: Id98c059f7d786ee5c9bca839c8e099997ff2aedb
Reviewed-on: https://skia-review.googlesource.com/122793
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-23 12:54:28 +00:00
Robert Phillips
3d0e8507fa Prevent matrix stack from being corrupted if a rotated image filter is clipped out
Bug: skia:7765
Change-Id: Id76b63cebc25dcdff02d4ba3f6d6bba6f2b6b842
Reviewed-on: https://skia-review.googlesource.com/122782
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-20 15:13:55 +00:00
Greg Daniel
57bf4a3dbf When creating testing backendTexture take colorspace into account.
Bug: skia:
Change-Id: Ifa8dbad3eca81790648476f9a6d3fa5a088fede9
Reviewed-on: https://skia-review.googlesource.com/122341
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-19 15:02:34 +00:00
Cary Clark
dbc59ba23b path is rect track corners
This was triggered by an exploit that started the first
edge well outside the final rectangle, causing the captured
to exceed the correct result.

Ivan observes that we really only want the first and third
corners to compute the bounds, so remove the tracking code
that looks for a valid range of points, and record the
corners instead.

R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: If228573d0f05c7158dba8142c144d13834e691ec
Reviewed-on: https://skia-review.googlesource.com/122081
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-04-19 12:11:34 +00:00
Florin Malita
c274f8f942 Prevent unnecessary/unbounded growth of SkTDynamicHash capacity
SkTDynamicHash doesn't immediately recycle slots for removed entries,
but instead just marks them as deleted.

The only way to reclaim deleted slots currently is when an exponential
grow/resize is triggered.

A consequence of this is that the capacity/allocated storage can grow
indefinitely when the hash is long-lived and churning -- even if the
number of active entries is small/stable.

To prevent this, I propose we only grow the capacity when the number of
active slots constitutes a significant portion.  Otherwise (when most
slots are deleted), we trigger a "purge" (resize to the same capacity)
to clear the tombstones.

Bug: chromium:832482
Change-Id: Iefdcd7439f7d62ac021e176b71007d207c8bc876
Reviewed-on: https://skia-review.googlesource.com/122082
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-04-18 21:46:33 +00:00
Chris Dalton
9f2dab0fdd ccpr: Implement conics
TBR=egdaniel@google.com

Bug: skia:
Change-Id: Idf7811dc285961db52db41c9ff145afda40c274d
Reviewed-on: https://skia-review.googlesource.com/122127
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-18 20:43:54 +00:00
Chris Dalton
91ab155884 Always call endFlush on opLists that might survive a flush
We were missing a few that got unreffed due to failed proxy
instantiation.

Bug: skia:7655
Bug: skia:7111
Change-Id: I95847a16890f2993a1433d4d9fdaa8a4a6c2f0b6
Reviewed-on: https://skia-review.googlesource.com/122121
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-18 20:00:53 +00:00
Florin Malita
15a64e71f6 Convert A8 D32 mask blitters to Sk4px
Improves the newly added bench by ~25% (hsw):

-- before --

    micros   	bench
   2298.34  	shadermaskfilter_picture_80	8888
   2339.60  	shadermaskfilter_picture_ff	8888
   2287.11  	shadermaskfilter_bitmap_80	8888
   2223.14  	shadermaskfilter_bitmap_ff	8888

-- after --

   1693.36  	shadermaskfilter_picture_80	8888
   1637.45  	shadermaskfilter_picture_ff	8888
   1691.65  	shadermaskfilter_bitmap_80	8888
   1637.70  	shadermaskfilter_bitmap_ff	8888

But: skia:7810
Change-Id: I7274b10f517551ee2c0646842f72e0372d55e509
Reviewed-on: https://skia-review.googlesource.com/121642
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-04-18 19:52:53 +00:00
Cary Clark
b120e9291a fix path is rect flaw exposed by gold
One of the path is rect bug fixes changed
the behavior of zero-length strokes which
showed up as a change in Gold.

The bug is if a rect is defined by a
series of colinear movetos, the bounds
did not work out if the rect started
and stopped in the middle of a side.

R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I226545efeda03dedd928eebc120d2508b428fef0
Reviewed-on: https://skia-review.googlesource.com/122002
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-18 17:46:03 +00:00
Ben Wagner
eed6128377 IWYU for some more test files starting with 'C'.
Change-Id: I010527b342cbfa0b425ef0d00966219413d9e77d
Reviewed-on: https://skia-review.googlesource.com/121886
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-17 19:33:14 +00:00
Greg Daniel
d2d367d172 No long require copy as draw for vulkan wrapped resources.
With the recent changes to GrBackendTexture and the atomic ref counted
GrVkImageLayout, this should not longer be an issue for cross context
images. There still is the requirement that they need to manually
synchronize the submission of work involving the image on two threads,
but that is a requirement regardless of layout issues.

Bug: skia:
Change-Id: Ia86e51fda8606838dabd1bc36cf14c7679b46d49
Reviewed-on: https://skia-review.googlesource.com/121349
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-04-17 18:36:44 +00:00
Cary Clark
4eb6f7a698 path is rect diag test is required
Removed a test that appeared to go uncalled;
Ivan to the rescue, with a test case
proving that it is required.

R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I7df9688072bd36b7597673148e3fe5dbbf82f5a7
Reviewed-on: https://skia-review.googlesource.com/121883
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-17 18:15:34 +00:00
Cary Clark
1cd6098d52 path is rect bug number twelve
Exposes that final close along a diagonal need not
include a close verb if the subsequent verb is move;
so we have to check for a diagonal then.

The later check for diagonal included a comment that
it may not be needed which does appear to be the case.

R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I17a9414e8b3e69b82c2eda28195696eae4e3d513
Reviewed-on: https://skia-review.googlesource.com/121801
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-17 16:42:04 +00:00
Cary Clark
a7651567ca yet another path is rect exploit
This one accumulates the othershoot when all four sides
have the same direction, and the final side when closed
should cause the overshoot to be ignored.

Docs-Preview: https://skia.org/?cl=121787
Bug: 824145,skia:7792
Change-Id: I71ea0fcdd0f03a4fcac224b57220c65c321112f6
Reviewed-on: https://skia-review.googlesource.com/121787
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-17 13:50:13 +00:00
Cary Clark
48c464a3c4 a more involved path is rect bug
This is bug number ten in the series, and is the
most interesting. It exploits that the code tracks
corners 0, 2, and 3 but not corner 1.

Changing the code to track all corners is the biggest
so far, and while it (hopefully) simplifies things,
the presence of new code may signify more bugs to come.

R=robertphillips@google.com

Bug: 824145,skia::7792
Change-Id: Ia18e4d80fbed06ae6d9c89dcb4c462c5610213cc
Reviewed-on: https://skia-review.googlesource.com/121487
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-04-17 11:46:53 +00:00
Chris Dalton
e7fbafe1da Revert "ccpr: Implement conics"
This reverts commit 98b241573e.

Reason for revert: TSAN not happy

Original change's description:
> ccpr: Implement conics
> 
> Bug: skia:
> Change-Id: I4bae8b059072af987abb7b2d9c57fe08f783d680
> Reviewed-on: https://skia-review.googlesource.com/120040
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ic29bf660f042c20b7e4492b03400412e378dbb8a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/121717
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-16 22:45:43 +00:00
Chris Dalton
98b241573e ccpr: Implement conics
Bug: skia:
Change-Id: I4bae8b059072af987abb7b2d9c57fe08f783d680
Reviewed-on: https://skia-review.googlesource.com/120040
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-04-16 21:57:54 +00:00
Ben Wagner
d234afdc2e Remove SkPaint::kGenA8FromLCD_Flag.
The original intent of this flag is now handled by SkPixelGeomety on
SkSurfaceProps on SkSurface.

BUG=skia:7515

Change-Id: I54bb1be072b5b5b2164a59196bfeacac254823c7
Reviewed-on: https://skia-review.googlesource.com/121346
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-04-16 21:11:10 +00:00
Greg Daniel
e320486489 Don't allow ganesh to allocate mip maps for wrapped textures.
We will not allocate new mips on a wrapped texture but we will use mips
if the wrapped texture already has one. If we need mips for a draw this
will trigger a copy to occur.

Also some cleanup up of our InternalSurfaceFlags in general.

Bug: skia:7806
Change-Id: I7aa666478cc91bba6e0644b323825fcc9b49793a
Reviewed-on: https://skia-review.googlesource.com/121348
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-16 17:05:20 +00:00
Brian Salomon
c8cdad7017 Make TestCase class in GrShapeTest heap allocate its GrShapes
Uses less stack space in test functions.

Change-Id: I50a66cc27d95c2b4e2292184b928f7bbd71789f0
Reviewed-on: https://skia-review.googlesource.com/121482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-16 15:13:49 +00:00
Mike Reed
490aa59ce2 rewrite iterator to make msvc happy
Revert "Revert "add test for degenerate canvas dimension""

This reverts commit 1749af20a1.

Bug: skia:
Change-Id: I382cbef397dfba600a6779b159764239399b177f
Reviewed-on: https://skia-review.googlesource.com/121344
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-04-13 20:41:25 +00:00
Mike Reed
1749af20a1 Revert "add test for degenerate canvas dimension"
This reverts commit 715b919e37.

Reason for revert: compile break on win

Original change's description:
> add test for degenerate canvas dimension
> 
> Bug: skia:
> Change-Id: Ib0532e706fbcdb126619301591ddc64910babdef
> Reviewed-on: https://skia-review.googlesource.com/121341
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I09dcba20d923d04ca1dc3fd0e62e8f42e4d4cdfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/121380
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-04-13 19:26:43 +00:00
Mike Reed
715b919e37 add test for degenerate canvas dimension
Bug: skia:
Change-Id: Ib0532e706fbcdb126619301591ddc64910babdef
Reviewed-on: https://skia-review.googlesource.com/121341
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-04-13 19:17:32 +00:00
Cary Clark
d4228473a5 path is rect bug number nine
This variation exploits a sequence which uses a zero
length line to note that lines have been recorded, but
no rectangle edge has been encountered.

R=robertphillips@google.com

Docs-Preview: https://skia.org/?cl=121282
Bug: 824145,skia:7792
Change-Id: I652e9482b2867c3d7da30d5f5df2aecbfd0d716d
Reviewed-on: https://skia-review.googlesource.com/121282
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-13 14:01:32 +00:00
Mike Reed
59af19f620 can't abort looper loop, as saveCount won't be balanced
This is triggered by a recent change to clear the looper from the paint we return.
That change made the call to nothingToDraw() return true, which in turn meant
we didn't get the balancing call to restore in the looper's next() call.

Follow-up to https://skia-review.googlesource.com/c/skia/+/121062

Bug: skia:
Change-Id: I3ba7d487e4193103fb1d223d34c9c6eb486eca09
Reviewed-on: https://skia-review.googlesource.com/121220
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-04-12 22:02:11 +00:00
Greg Daniel
92cbf3fc01 Don't create lazy proxys if their width/height is greater than max tex size
Bug: skia:
Change-Id: I53508c4e3bbd4c315be4b29a66716e0c5e7f25bf
Reviewed-on: https://skia-review.googlesource.com/121161
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-12 21:40:11 +00:00
Cary Clark
88ba9710b5 son of path is rect bug
This variation tricks SkPath::isRect by exploiting
that the implementation resets the point pointer to
process the close verb, and using the reset pointer
to walk over a series of points that don't move.

In addition to fixing this, rename variables to
make the line creation more obvious, since left,
right, and friends, are not the left and right.

R=robertphillips@google.com

Bug: 824145,skia:7792
Change-Id: If8ebbc3eedd270652670d6e111a5bc02e61f0eec
Reviewed-on: https://skia-review.googlesource.com/121122
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-12 20:45:32 +00:00
Ethan Nicholas
b809efbbfa workaround for buggy macOS GLSL shader compiler
Bug: skia:
Change-Id: Ib77e11d80f93f76e65eac6119dbf2bd03523aaf9
Reviewed-on: https://skia-review.googlesource.com/117626
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-04-12 20:26:51 +00:00
Cary Clark
31608c02c2 another rect is path fix
This addresses comment #17 of skbug.com/7792.

The bug overshoots the end and exploits that the
first point tracked by close isn't the first
point in the rectangle.

Fixing this slightly regresses the example
in comment #14; before it was treated as a filled
rect but now it is not; this conservative approach
doesn't cause any other regressions.

bug7792 in pathfill.cpp verifies that all paths
in the bug draw correctly by comparing CPU and GPU.

R=robertphillips@google.com

Bug: 824145,skia:7792
Change-Id: I55bea023d2ad7456c8c3ebd9d1df95fe34e0a0d4
Reviewed-on: https://skia-review.googlesource.com/120996
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-12 15:05:40 +00:00
Robert Phillips
ba375a8884 Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS
This relies on the Chrome CL: https://chromium-review.googlesource.com/c/chromium/src/+/999796 (Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS to SkUserConfig.h) landing first.

Change-Id: Ie0a2b7b84cc02e46957765a0a7d6444a5320769d
Reviewed-on: https://skia-review.googlesource.com/119140
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-12 14:56:10 +00:00
Chris Dalton
21f6437764 Implement Sk2f Load2
Bug: skia:
Change-Id: I7d37a76bcb9df9c5a1c22eb1b0277387816df7bb
Reviewed-on: https://skia-review.googlesource.com/120602
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-12 14:49:00 +00:00
Chris Dalton
e3fda9310a Implement Sk4f min/max
Bug: skia:
Change-Id: Icf235dea81e9f125c1c8590ec87cb3591393036c
Reviewed-on: https://skia-review.googlesource.com/120281
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-04-12 14:29:00 +00:00
Florin Malita
c6c5eade82 Reland "Fix handling of MaskFilter matrices"
This reverts commit c64ee20e13.

Reason for revert: initial failures should be fixed in https://skia.googlesource.com/skia.git/+/8eaf64ae12696d4189d3cea9f023658494cf82b8

Original change's description:
> Revert "Fix handling of MaskFilter matrices"
> 
> This reverts commit 2097fd03ff.
> 
> Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix)
> 
> Original change's description:
> > Fix handling of MaskFilter matrices
> > 
> > 1) extend GrFPArgs to track pre/post local matrices, add helpers for
> >    creating pre/post wrapper args
> > 
> > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM
> >    sandwich logic.
> > 
> > 3) update call sites to use the above
> > 
> > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to
> >    disambiguate vs. SkShader::makeWithLocalMatrix.
> > 
> > BUG=skia:7744
> > 
> > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1
> > Reviewed-on: https://skia-review.googlesource.com/119330
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com
> 
> Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7744
> Reviewed-on: https://skia-review.googlesource.com/120340
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: If194862a928d1abe22ed8fa968436c725d19a8fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7744
Reviewed-on: https://skia-review.googlesource.com/120480
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-04-11 20:13:22 +00:00
Mike Reed
1f275851ec remove unused/dumb methods from SkRect
Bug: skia:
Change-Id: I407dc94256a347c7a9343b75a5af43c4294891d3
Reviewed-on: https://skia-review.googlesource.com/119360
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2018-04-11 19:40:57 +00:00
Cary Clark
8540e110f9 more path is rect bugs
More edge cases found; clean up the logic a bit
to make more clear where the rectangle points
start and stop.

R=robertphillips@google.com,brianosman@google.com
Bug: 824145,skia:7792
Change-Id: Ie24dfd1519f30875f44ffac68e20d777490b00b9
Reviewed-on: https://skia-review.googlesource.com/120422
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-11 19:13:07 +00:00