Commit Graph

316 Commits

Author SHA1 Message Date
Michael Ludwig
e4b79699ef Use SkClipOp::kIntersect instead of kReplace_ClipOp
This fixes the perf bot crashes from https://skia-review.googlesource.com/c/skia/+/317209
and removes a few other instances of kReplace_ClipOp that are equivalent to the
still supported SkClipOp::kIntersect op. Other than the benchmark case, the GPU
clip stack wasn't hitting these cases but they do need to be updated when the deprecated
ops are fully removed.

At this point, the remaining uses of deprecated clip ops are all in unit tests that
specifically test a clip stack (raster, conservative, or skclipstack) that specifically
supports expanded clip ops and the tests are testing those operations. They can remain
until we remove full support.

Bug: skia:10208
Change-Id: I5703bf43fd41b6addf329190a70c5429d5971240
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317380
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-16 18:37:37 +00:00
Nathaniel Nifong
0b448daafb Add a method of returning the list of commands that use an image
Change-Id: I3c94f7b6faa71ab0cbeccddd2032b657e350c9b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316843
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-16 15:57:40 +00:00
Nathaniel Nifong
2b1b2b2e8e Add a short description for concat and setmatrix saying whether it's a translate or something else
Change-Id: I3bb849f9e09a71ad5609840420f8f8d803e56634
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/315737
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-09-09 14:16:42 +00:00
John Stiles
7571f9e490 Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'.
Mechanically updated via Xcode "Replace Regular Expression":

  typedef (.*) INHERITED;
    -->
  using INHERITED = $1;

The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.

Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-03 03:41:26 +00:00
Nathaniel Nifong
0f7aa54e43 Fix GL loading bug in wasm debugger.
Seems this was fixed in canvaskit, but overlooked in debugger.

Change-Id: I326b809628a8531a521a6246e65798d37dcce1b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314457
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-09-02 20:20:15 +00:00
Adlai Holler
bcfc554fde Add GrDirectContext arg to SkImage::readPixels
Note: The polarity of the staging flag is inverted from usual because
a G3 dependency with no SkUserConfig.h relies on the legacy API.

Once this lands, we will migrate them and others, then remove the
staging API. The inverted staging flag is kind of nice, actually - I may
use that pattern in the future. It means less total CLs and it's just as
easy to flip the bit on or off during debugging.

Bug: skia:104662
Change-Id: I48cba1eeae3e2e6f79918c6d243e0666e68ec71b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-08-27 19:26:29 +00:00
Nathaniel Nifong
642a10b1f2 Add origin visualization, add support for Concat44
bug:skia:10211

Change-Id: Ia1a6da784096c1e655ec6198206de879ffbb556b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311605
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-20 17:49:32 +00:00
John Stiles
a008b0fa8b Enable ClangTidy check readability-redundant-smartptr-get.
To my surprise, this even works with homegrown smart pointers (such as
SkTLazy).

https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html

Find and remove redundant calls to smart pointer’s .get() method.

Examples:

  ptr.get()->Foo()  ==>  ptr->Foo()
  *ptr.get()  ==>  *ptr
  *ptr->get()  ==>  **ptr
  if (ptr.get() == nullptr) ... => if (ptr == nullptr) ...

Change-Id: I8ff541e0229656b4d8e875c8053a7e6138302547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310976
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-16 15:56:48 +00:00
John Stiles
214de11183 Fix DebugCanvas(SkIRect) constructor.
Change-Id: Ie4f24ca0f6bce03b665c8b517c0ed80cc57b0588
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306726
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-29 23:24:21 +00:00
Adlai Holler
2940538ecd Reland "Remove more GrContext imports & usage"
This reverts commit 75c5168b41.

Reason for revert: Reverted image-cacherator test, for now

Original change's description:
> Revert "Remove more GrContext imports & usage"
>
> This reverts commit dd1395526d.
>
> Reason for revert: Broke chrome roll
>
> Original change's description:
> > Remove more GrContext imports & usage
> >
> > Sanity is coming soon!
> >
> > Change-Id: I109ebeef9efd7dbf4d76a13e1c05df36d59affbc
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303661
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I20d770058d4b54193b6cd2fdc9ca5a1e09f84309
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304056
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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


Change-Id: I940b9f74f7caaa8b4201c241f2a6242b7a24d2a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304062
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-07-21 11:36:05 +00:00
Mike Reed
6d0ab954e9 read/write m44
Inspired by https://skia-review.googlesource.com/c/skia/+/303271

Change-Id: I64816f8db1742d263c8f668a7b44a08f20d82f5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304065
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-20 20:45:04 +00:00
Adlai Holler
75c5168b41 Revert "Remove more GrContext imports & usage"
This reverts commit dd1395526d.

Reason for revert: Broke chrome roll

Original change's description:
> Remove more GrContext imports & usage
> 
> Sanity is coming soon!
> 
> Change-Id: I109ebeef9efd7dbf4d76a13e1c05df36d59affbc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303661
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I20d770058d4b54193b6cd2fdc9ca5a1e09f84309
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304056
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-07-20 16:18:04 +00:00
Adlai Holler
dd1395526d Remove more GrContext imports & usage
Sanity is coming soon!

Change-Id: I109ebeef9efd7dbf4d76a13e1c05df36d59affbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303661
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-20 15:17:21 +00:00
Robert Phillips
b27b38b089 Miscellaneous removal of GrContext usages
Change-Id: I558471002db93a09b8fd5dfa2f0929a0139295bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301976
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-13 14:10:54 +00:00
Mike Reed
1f60733fb3 Revert "Revert "move onto new factories for SkMatrix""
This reverts commit c80ee456ad.

fix: update flutter's gn file to add guard

Change-Id: Iac5171c8475d9a862d06255dab1c6f38f10de2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-21 16:58:39 +00:00
Mike Reed
c80ee456ad Revert "move onto new factories for SkMatrix"
This reverts commit 046c2b7d90.

Reason for revert: need to update/guard flutter

Original change's description:
> move onto new factories for SkMatrix
> 
> Just rename, no functional changes expected.
> 
> Change-Id: Id77ab1cf6b1cab35087a7c56000750912cf47383
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290831
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

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

Change-Id: Ic74f177128913374b8c60b4df88f04cf72fbacb3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291359
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-21 16:05:20 +00:00
Mike Reed
046c2b7d90 move onto new factories for SkMatrix
Just rename, no functional changes expected.

Change-Id: Id77ab1cf6b1cab35087a7c56000750912cf47383
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290831
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-05-21 15:04:09 +00:00
Mike Reed
7d45a7ac9c rm unneeded SK_SUPPORT_LEGACY_DIDCONCAT44
Change-Id: I65cec59749f0e7f5fb13675293720afecffa6a80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284321
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-20 20:44:35 +00:00
Mike Reed
a735ad98db stage changing didCocnat44 virtual
SK_SUPPORT_LEGACY_DIDCONCAT44

Change-Id: Ie208c245d7121fddc693a7d3c5d6866441c27433
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281864
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-07 15:50:57 +00:00
Mike Reed
0f5e7581a0 can we remove these entirely?
Change-Id: I3dbf9c25e6e0025cc1686789a089420ebce72bbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280191
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-01 12:13:54 +00:00
Michael Ludwig
b0cee9bf9a Remove drawBitmap et al. from SkDevice
SkCanvas keeps its non-exotic drawBitmap calls for now but they
immediately wrap the bitmap in SkImage::MakeFromBitmap. This will
add a copy for mutable bitmaps, but this can be worked around by using
images directly (preferred), or marking the bitmap as immutable. In
practice, mutable bitmaps do not seem to be widely used so this is
deemed acceptable for now.

Several GMs are updated to mark the bitmaps as immutable in order to
avoid pixel churn in how CPU vs. GPU mipmaps are generated. As we move
towards explicit mipmap generation, this distinction will become less
critical, so I'm just avoiding it for now. See skbug.com/9337 for mipmap
proposal. The image diffs encountered in this CL directly related to
generating mipmaps for bitmaps already cached on the GPU vs. not on the
GPU yet.

It was decided to copy if mutable vs. never copying the bitmap because
it preserves the image guarantees the devices and canvas' rely on,
and imposing the need to inspect an image for mutability is undesired.

Bug: skia:10037, skia:9337
Change-Id: If152e6cae1e155ccf6bd2cd755895f3c7a0135a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276004
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-12 15:28:00 +00:00
Mike Reed
fdf94044ff Remove exotic legacy bitmap drawing entry points: Nine, Lattice
follow-ups:
- remove associated virtuals in canvas

Change-Id: I3efa7a88ed0905ebf080712993e7f43148df36dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276282
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-11 13:11:47 +00:00
Mike Reed
121c2afb99 clipShader -- raster implementation
1. pass shader+op down to device
2. bitmapdevice pass it down to rasterclip
3. rasterclip only ever stores at most one shader
   - if there is a ctm, fold that into (another) shader
   - if the op is difference, invert the sense of alpha
   - if there was a previous shader, compose with it
4. pass through to rasterpipelineblitter
5. it prepends the colorPipeline with the clipShader, and stashes its
   results in a buffer (fClipShaderBuffer)
6. in each blit, scale/lerp from the buffer before storing the result

Change-Id: I07c7a8a20b9ae95cdcc9954237d115e63819f7c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275798
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-03-10 18:43:21 +00:00
Mike Reed
a2cf8ae420 switch to virtual with no bones
Bug: skia:9984
Change-Id: I89d8f5f227690c71be875b5a7718aba0ad058650
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274504
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-03-03 13:35:00 +00:00
Nathaniel Nifong
d0a0c59c80 Return summaries of all layers for display
Bug: skia:9752
Change-Id: I1012f4cda1c28d446269f0a3f212ccf80f17c194
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267439
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-29 20:55:49 +00:00
Nathaniel Nifong
ce5ad452f6 Don't apply android device clip restriction, only show the viz of it.
Bug: skia:9758
Change-Id: I4bd45075791a0c33096901cd94555b2898c7b6fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265142
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-21 14:03:39 +00:00
Nathaniel Nifong
12b2c27038 fix msan issue by init all new members
Change-Id: If90044b99e4d8e4be3366579518faa5abc96bd31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263706
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-14 14:52:37 +00:00
Mike Reed
a3a704afa3 Override didTranslate, and add virtual for didScale
This completes pushing through the new virtual didConcat44() to our
subclasses, and introduces didScale() for future optimizations. We
don't call didScale yet, until external subclasses are also updated.

This was derived from https://skia-review.googlesource.com/c/skia/+/263349

bug: skia: 9768
Change-Id: Ia26b48e76e323037082e8f2ee83673c26b99ebed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-11 02:11:26 +00:00
Nathaniel Nifong
ba80f359af Revert "Reland "Add vis of android device clip restriction, fix regular clip vis on gpu""
This reverts commit 17175f9ed9.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "Add vis of android device clip restriction, fix regular clip vis on gpu"
> 
> This reverts commit 66f7ca63b1.
> 
> Reason for revert: Attempt initializing all new members
> 
> Original change's description:
> > Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
> > 
> > This reverts commit aac8e44d5c.
> > 
> > Reason for revert: Attempted fix didn't work, still producing red on tree.
> > 
> > Original change's description:
> > > Add vis of android device clip restriction, fix regular clip vis on gpu
> > > 
> > > Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> > > Commit-Queue: Nathaniel Nifong <nifong@google.com>
> > > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > 
> > TBR=kjlubick@google.com,nifong@google.com
> > 
> > Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 
> TBR=jvanverth@google.com,kjlubick@google.com,nifong@google.com
> 
> Change-Id: I5acc8a1f0b06e0490125077596d2c6366856d49c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263703
> Reviewed-by: Nathaniel Nifong <nifong@google.com>
> Commit-Queue: Nathaniel Nifong <nifong@google.com>

TBR=jvanverth@google.com,kjlubick@google.com,nifong@google.com

Change-Id: If19f5ceb60c83846baf417f898f57f9dfa2eb59d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263707
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-10 19:11:21 +00:00
Nathaniel Nifong
17175f9ed9 Reland "Add vis of android device clip restriction, fix regular clip vis on gpu"
This reverts commit 66f7ca63b1.

Reason for revert: Attempt initializing all new members

Original change's description:
> Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
> 
> This reverts commit aac8e44d5c.
> 
> Reason for revert: Attempted fix didn't work, still producing red on tree.
> 
> Original change's description:
> > Add vis of android device clip restriction, fix regular clip vis on gpu
> > 
> > Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> > Commit-Queue: Nathaniel Nifong <nifong@google.com>
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> 
> TBR=kjlubick@google.com,nifong@google.com
> 
> Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,kjlubick@google.com,nifong@google.com

Change-Id: I5acc8a1f0b06e0490125077596d2c6366856d49c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263703
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-10 19:04:11 +00:00
Jim Van Verth
66f7ca63b1 Revert "Add vis of android device clip restriction, fix regular clip vis on gpu"
This reverts commit aac8e44d5c.

Reason for revert: Attempted fix didn't work, still producing red on tree.

Original change's description:
> Add vis of android device clip restriction, fix regular clip vis on gpu
> 
> Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,nifong@google.com

Change-Id: Ia1f3a53b829ceb15467da12a104d87d7b1e7dad9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263697
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-10 17:57:41 +00:00
Jim Van Verth
1637f117aa Revert "Fix san error by initializing new bool in debugcanvas"
This reverts commit 9c0a9ff3bd.

Reason for revert: Still producing red

Original change's description:
> Fix san error by initializing new bool in debugcanvas
> 
> Change-Id: Ia1bffc019c964b93ddf86f13390ea3e7bff1ce41
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263571
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I121e3e851ea015b7ddcd98ae16b801fd96f011f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263696
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-10 17:55:51 +00:00
Nathaniel Nifong
9c0a9ff3bd Fix san error by initializing new bool in debugcanvas
Change-Id: Ia1bffc019c964b93ddf86f13390ea3e7bff1ce41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263571
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-10 17:07:21 +00:00
Nathaniel Nifong
aac8e44d5c Add vis of android device clip restriction, fix regular clip vis on gpu
Change-Id: I103025f4a9955c46f34b02d4e3ef1626796029e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263521
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-10 15:30:41 +00:00
Mike Reed
a092028439 Revert "new virtuals for canvas ctm"
This reverts commit 2076b04d15.

Reason for revert: speculative: breaking google3 flutter scuba?

Original change's description:
> new virtuals for canvas ctm
> 
> 1. Feature: Clients need to override didConcat44() (new data)
> 2. Perf: Clients need to override didTranslate (and now didScale) so our
>          default impls can be empty.
> 
> Need SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS flag to stage this in
> clients (anyone who subclasses SkCanvas)
> 
> Before (with flag)
>     120.87  	canvas_matrix_4x4	8888
>     108.10 ?	canvas_matrix_3x3	8888
>     108.13 ?	canvas_matrix_2x3	8888
>     141.54  	canvas_matrix_scale	8888
>     128.04  	canvas_matrix_trans	8888
> 
> After (without the flag)
>     ...
>      90.79  	canvas_matrix_scale	8888
>      94.51  	canvas_matrix_trans	8888
> 
> bug: skia:9768
> 
> Change-Id: I6f500138dd6b2b24754dc065c650d0bd3c341540
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

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

Change-Id: I9c2e39ea0aa2b19d40eb6454c233258ab7f35829
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263564
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-10 14:26:41 +00:00
Mike Reed
2076b04d15 new virtuals for canvas ctm
1. Feature: Clients need to override didConcat44() (new data)
2. Perf: Clients need to override didTranslate (and now didScale) so our
         default impls can be empty.

Need SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS flag to stage this in
clients (anyone who subclasses SkCanvas)

Before (with flag)
    120.87  	canvas_matrix_4x4	8888
    108.10 ?	canvas_matrix_3x3	8888
    108.13 ?	canvas_matrix_2x3	8888
    141.54  	canvas_matrix_scale	8888
    128.04  	canvas_matrix_trans	8888

After (without the flag)
    ...
     90.79  	canvas_matrix_scale	8888
     94.51  	canvas_matrix_trans	8888

bug: skia:9768

Change-Id: I6f500138dd6b2b24754dc065c650d0bd3c341540
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263349
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-01-10 13:30:11 +00:00
Nathaniel Nifong
b5d7f7eac0 Fix typo where width/height were swapped in new debug layer manager
Bug: skia:9748
Change-Id: Ibb716e843b4e7068b3bf9b382086ce823755cb82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262381
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-01-07 18:47:57 +00:00
Nathaniel Nifong
a14d809391 Support using an externally manage list of images in UrlDataManager for wasm debugger.
Bug: skia:9746
Change-Id: I07b5fe1f8f4250e29153b71ce2be106461f09928
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261998
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-03 21:25:12 +00:00
Nathaniel Nifong
94de6b40d9 Debugger changes to make layer inspection interactive
Change-Id: Ief4d8c2a90e8f459a64a3c07e97e16d2ef287bfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260403
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-20 14:32:28 +00:00
Mike Reed
cf0e3c63fd remove dead code around old SkPath enums
Change-Id: I8dc06da48e881d3a9c40b47c799afe27bdcce819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257689
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-14 01:58:10 +00:00
Nathaniel Nifong
a072b7b275 Remove an uncessary and unused parameter for partially generating the JSON command list
All caller were passing the maxium value, those that weren't still function if they are made to.

Change-Id: Id9b5d8dbbbdf10a02ea0f3b21d500059ec383e3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259808
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-12-13 19:30:03 +00:00
Nathaniel Nifong
20b177a9bf Parse android layer annotations in debugger, play back layers
Bug: skia:9626
Change-Id: I3ae8fa83520690f9af534e9ab0b70834d7890fb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256100
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-12 16:32:44 +00:00
Nathaniel Nifong
c84ad83df8 Fix audit trail visualization bugs
Change-Id: Ib488f11980da110a03ca832203db4bc35c456887
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259417
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-11 23:07:05 +00:00
Nathaniel Nifong
732c49739f Return image address in image info so it can be shown in dropdown.
Note that I don't dereference this pointer, I'm just showing it to the user as it is currently
the only common identifier between the command list and the resource tab.

A longer term fix would be to show the resourse tab's indices in the command list. this is tougher
because it involves replacing UrlDataManager without breaking skiaserve.

Change-Id: Iaa0d60831e96128f19b6358e82b2e89f80444927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258800
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-12-10 14:40:43 +00:00
Mike Reed
7d34dc7747 Revert "Revert "switch to new filltype for SkPath""
This reverts commit 3e7af41224.

Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-11-26 17:43:14 +00:00
Mike Reed
3e7af41224 Revert "switch to new filltype for SkPath"
This reverts commit 3a50981a83.

Reason for revert: chrome win build found compile-problem in xpsdevice

Original change's description:
> switch to new filltype for SkPath
> 
> Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: Iacb3566da61c2512b9bd6b7e42b592febc85e031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256530
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-26 03:34:30 +00:00
Mike Reed
3a50981a83 switch to new filltype for SkPath
Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-25 22:31:46 +00:00
Brian Salomon
4bc0c1fc4b Rename GrColorSpaceInfo -> GrColorInfo
Add version SkImageInfo::Make() that takes SkISize instead of separate
width and height.

Change-Id: I42aa79d23b19e22f5405631728c245b04bce0559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245172
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-30 21:53:24 +00:00
Mike Reed
4241f5e0a8 Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 19:13:44 +00:00
Mike Reed
e1af44498b add guard to switch to SkPathTypes
Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 01:26:38 +00:00