Commit Graph

125 Commits

Author SHA1 Message Date
Florin Malita
c75e2401a8 [sksg] Refine invalidation logic
We need to discriminate between nodes whose bounds updates contribute to the dirty
region, and nodes whose bounds changes do not.

E.g. animated shape in a group: the animated shape node bounds should yield damage,
but the ancestor group bounds should not.

To accomplish this, we refine the invalidation state:

  1) self invalidation == the node itself was invalidated, and its bounds updates
     yield damage.
  2) descendant invalidation == the node has some (self-)invalidated descendant,
     but its own bounds are not contributing damage.

Also:

  * hoist the bounding box invalidation logic into the base class (Node::revalidate)
    and update to respect the states described above.
  * remove (now-redundant) GeometryNode bbox logic.
  * update revalidation methods to return the node bbox instead of void

TBR=
Change-Id: I8023d1793fb501c945a53f2dc2d2983e5b620ade
Reviewed-on: https://skia-review.googlesource.com/90581
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-04 00:59:20 +00:00
Mike Klein
c38cce63b3 make SkColorSpace_New real
Some interesting things are starting to fall out already,
like the fact that I needed to add a gamma_dst stage to
be able to draw into gamma-transfer-fn destinations.

I've also had to pass an SkAlphaType through to the linearize
functions so that they can maintain premul invariants.  I'm not
sure this is actually a good idea... if you can, please double-
check my logic at SkRasterPipeline.cpp:128?

If it's correct logic, I'm going to need to do it all over the place.
But I imagine you don't do this and somehow get away with it.

Change-Id: I42cd9b161b54287d674225103ad9e19f8b388959
Reviewed-on: https://skia-review.googlesource.com/84680
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-12-14 19:02:17 +00:00
Brian Osman
19c026e3b8 Remove SkClampRange (unused)
Bug: skia:
Change-Id: I57fbdd39079a92e803902524a7950dd5f571639c
Reviewed-on: https://skia-review.googlesource.com/84961
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-14 16:38:31 +00:00
Mike Klein
0554d497f8 add SkVptr()
I was wondering how feasible using this to make downcasts safe would be.
These tests would need to build and pass on all our bots, at least.

Change-Id: I1753ba58841bf6c17d6ac3af7374518356e1bb05
Reviewed-on: https://skia-review.googlesource.com/81180
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-06 19:37:27 +00:00
Mike Reed
60691a5127 add serial procs to pictures
Bug: skia:7380
Change-Id: Ic1b7e437316c7913711cf5cb119e3fe904cd2c05
Reviewed-on: https://skia-review.googlesource.com/76980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-05 20:33:18 +00:00
Leon Scroggins III
c8037dc5ed Reland "Hide SkEncodedInfo"
This partially reverts commit
1793e7bb46.

Hide SkEncodedInfo

Bug: skia:7353
Bug: skia:6839

This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).

Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.

The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, make SkAndroidCodec a friend so it can
access the SkEncodedInfo. A future change will change SkCodec to
recommend F16 for bitsPerComponent > 8, but that will be more involved;
it was the reason for the revert of this CL.

Switch conversionSupported to use an SkColorType, which is enough info.

Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.

SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.

TBR=mtklein@chromium.org,reed@google.com
Change-Id: I928b1f55317602cb37d29da63b53026c8d139cee
Reviewed-on: https://skia-review.googlesource.com/80860
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-12-05 19:28:08 +00:00
Leon Scroggins
1793e7bb46 Revert "Hide SkEncodedInfo"
This reverts commit c6f7a4ffa9.

Reason for revert: Causing differences in Gold, stemming from the fact that this changes the recommended SkImageInfo for 16 bits-per-component PNG from N32 to F16.
- an F16 bitmap already png-encodes to a 16 bits-per-component PNG, but it does not encode a linear colorspace (possibly a bug?). when we decode this PNG using getInfo(), it fails because it has an F16 color type and non-linear colorspace. (In the encode-srgb-png gm, this results in blank results for F16.) We could correct this on the encoder side, but it seems possible that a 16 bits-per-component PNG could be encoded with a different color space. In that case, we'd want SkCodec to recommend F16/SRGBLinear, but I think we'd want the SkCodec to store the encoded SkColorSpace so that we can Xform between the two. Currently SkCodec only stores one color space, so that will require a refactor.
- When decoding 16-bits-per-component PNGs, we are now decoding them to F16. This shows differences in Gold. The srgb/gpu results now look more like F16. I think this is fine.

Original change's description:
> Hide SkEncodedInfo
> 
> Bug: skia:7353
> Bug: skia:6839
> 
> This contains information that is not necessary for clients to know. The
> Color enum tells the number of components in the input, but this is only
> interesting internally (to the SkSwizzler).
> 
> Similarly, the Alpha enum differs from SkAlphaType in that it has
> kBinary instead of kPremul. This is useful information only internally
> for determining whether the SkColorSpaceXform needs to premultiply.
> 
> The bitsPerComponent is potentially useful for a client; Android (in
> SkAndroidCodec) uses it to determine the SkColorType. Rather than
> exposing bitsPerComponent, use it to make the same decision that Android
> would have made - 16 bits per component means to set the info to F16. Add
> a test that computeOutputColorType behaves as expected.
> 
> Switch conversionSupported to use an SkColorType, which is enough info.
> 
> Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
> SkAlphaType.
> 
> SkCodec still needs an SkEncodedInfo, so move its header (which is
> already not SK_API) to include/private.
> 
> Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
> Reviewed-on: https://skia-review.googlesource.com/79260
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

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

Change-Id: I0c5dd1461e1b70d1e55349a8e7ee6b029c3f556e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7353, skia:6839
Reviewed-on: https://skia-review.googlesource.com/80660
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-12-05 15:38:22 +00:00
Leon Scroggins III
c6f7a4ffa9 Hide SkEncodedInfo
Bug: skia:7353
Bug: skia:6839

This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).

Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.

The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, use it to make the same decision that Android
would have made - 16 bits per component means to set the info to F16. Add
a test that computeOutputColorType behaves as expected.

Switch conversionSupported to use an SkColorType, which is enough info.

Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.

SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.

Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
Reviewed-on: https://skia-review.googlesource.com/79260
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-12-05 00:52:42 +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
Robert Phillips
8172c0a24a Revert "Add unit test for SkDeferredDisplayLists"
This reverts commit 8458a2807b.

Reason for revert: ??
Original change's description:
> Add unit test for SkDeferredDisplayLists
> 
> Change-Id: I015094145cb0af6cfe368c570a5d5280c11c8f28
> Reviewed-on: https://skia-review.googlesource.com/78660
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Iec3abb18d3ed41fcfbec72bc2de14603f659f8ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/79720
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-04 14:38:15 +00:00
Robert Phillips
8458a2807b Add unit test for SkDeferredDisplayLists
Change-Id: I015094145cb0af6cfe368c570a5d5280c11c8f28
Reviewed-on: https://skia-review.googlesource.com/78660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-04 14:00:14 +00:00
Chris Dalton
706a6ff60c Add "lazy" texture proxies
Adds ultra-deferred proxies that are instantiated by a user-supplied
callback during flush.

Bug: skia:7190
Change-Id: I75a7ac6dba953c3b0a99febc203a7f4d2f3789fc
Reviewed-on: https://skia-review.googlesource.com/76461
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-30 15:37:12 +00:00
Mike Klein
c9bc81434a Handle null colorspace in SkToSRGBColorFilter.
This was uncovered by the linked fuzzer issue.

I haven't looked hard at it, but I'd guess it's fuzzed an ICC profile
into one that can't be deserialized, and we get a null in CreateProc().

We could probably restrict the null check to just CreateProc(), but
putting it in Make() and asserting in the constructor feels cozy.

BUG=chromium:787718

Change-Id: Ic4b1dad28c00ee5870f22093eedbf34686c32120
Reviewed-on: https://skia-review.googlesource.com/76080
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-11-27 18:00:56 +00:00
Vladimir Levin
70fb479ae6 Ensure that removing last extension from GrGLExtension doesn't assert.
This patch fixes an assert that triggers when removing the last
extension in the list, since the index operator goes out of bounds.

Added a test that fails without the code changes and passes with the
changes.

R=bsalomon@chromium.org

Change-Id: I0d561b150899c178f638dde088af773fddf112d9
Reviewed-on: https://skia-review.googlesource.com/72000
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-15 20:25:42 +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
Herb Derby
66498bc416 Try 2 for Gauss filter calculation
Originally reviewed at:
https://skia-review.googlesource.com/c/skia/+/67723

Change-Id: Ie62d81f818899f3a79df888c1594d3fbccf6d414
Reviewed-on: https://skia-review.googlesource.com/69681
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-11-10 19:58:57 +00:00
Herb Derby
66918078bb Revert "Gauss filter calculation"
This reverts commit 53ec7dc7cb.

Reason for revert: Segv on very specific machines.

Original change's description:
> Gauss filter calculation
> 
> Change-Id: I921ef815d4f788c312aa729f353b6ea154140555
> Reviewed-on: https://skia-review.googlesource.com/67723
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I15164809d081dee0076e815b40fbfdbc6374cfba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/69641
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-11-09 22:39:57 +00:00
Herb Derby
53ec7dc7cb Gauss filter calculation
Change-Id: I921ef815d4f788c312aa729f353b6ea154140555
Reviewed-on: https://skia-review.googlesource.com/67723
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-09 20:18:17 +00:00
Robert Phillips
ec32534729 Revert "Revert "Fix GrDefaultPathRender inversely wound path bug""
This reverts commit fc28138c04.

Reason for revert: Suppression have landed for failing tests

Original change's description:
> Revert "Fix GrDefaultPathRender inversely wound path bug"
> 
> This reverts commit 511a9d4999.
> 
> Reason for revert: vulkan
> 
> Original change's description:
> > Fix GrDefaultPathRender inversely wound path bug
> > 
> > Bug: 769898
> > Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56
> > Reviewed-on: https://skia-review.googlesource.com/64065
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 769898
> Reviewed-on: https://skia-review.googlesource.com/65201
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I3a3543c46b3192f1ffd31a5566cf337dc03561a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 769898
Reviewed-on: https://skia-review.googlesource.com/65202
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-30 18:02:59 +00:00
Robert Phillips
fc28138c04 Revert "Fix GrDefaultPathRender inversely wound path bug"
This reverts commit 511a9d4999.

Reason for revert: vulkan

Original change's description:
> Fix GrDefaultPathRender inversely wound path bug
> 
> Bug: 769898
> Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56
> Reviewed-on: https://skia-review.googlesource.com/64065
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 769898
Reviewed-on: https://skia-review.googlesource.com/65201
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-10-30 15:58:03 +00:00
Robert Phillips
511a9d4999 Fix GrDefaultPathRender inversely wound path bug
Bug: 769898
Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56
Reviewed-on: https://skia-review.googlesource.com/64065
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-30 11:47:28 +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
Chris Dalton
cc604e5e9e CCPR: Add workaround for PowerVR crash
Bug: skia:
Change-Id: Icd00f81fda5366813f9c959fdc91b0415894cbfc
Reviewed-on: https://skia-review.googlesource.com/55360
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-06 22:48:59 +00:00
Robert Phillips
3ec9573ac3 Add unit test for pinned SkImages
Change-Id: I2e14353bc865b5994cc90ad643a6a58604955957
Reviewed-on: https://skia-review.googlesource.com/53500
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-29 20:04:54 +00:00
Brian Osman
f6f7cf6098 Invalidate path VBs when paths are destroyed
For this to work, we need access to the "original" path,
before any style was applied. To that end, add an original
path to GrShape (and unit tests of that functionality).

Then add a version of addGenIDChangeListener to GrShape,
that propagates to the original path, and use that in
tessellating path renderer.

Includes unit tests of caching behavior in the PR, all
of which failed without this change.

Bug: skia:
Change-Id: I98bb505f521e8ff07184f5c3fbd3c5fd1a22d3d5
Reviewed-on: https://skia-review.googlesource.com/50300
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-26 12:52:36 +00:00
Robert Phillips
ae7d3f3992 Add native caching of uniquely keyed GrTextureProxies (take 2)
TBR=bsalomon@google.com

Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141
Reviewed-on: https://skia-review.googlesource.com/49543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-21 13:52:10 +00:00
Robert Phillips
76d640d14e Revert "Add native caching of uniquely keyed GrTextureProxies"
This reverts commit d4f100dad9.

Reason for revert: ASAN

Original change's description:
> Add native caching of uniquely keyed GrTextureProxies
> 
> Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
> Reviewed-on: https://skia-review.googlesource.com/48300
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/49442
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-20 20:50:50 +00:00
Robert Phillips
d4f100dad9 Add native caching of uniquely keyed GrTextureProxies
Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
Reviewed-on: https://skia-review.googlesource.com/48300
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-09-20 20:21:50 +00:00
Mike Klein
228276dabf Revert "Turn on exceptions in test tools."
This reverts commit c667dff58d.

Reason for revert: temporary while I fix Android, Google3.

Original change's description:
> Turn on exceptions in test tools.
> 
> This allows us to test things that, e.g., throw std::bad_alloc.
> 
> Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
> Reviewed-on: https://skia-review.googlesource.com/34982
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

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

Change-Id: Iafdc34c5f70f99f7df3cd0bbad65eed0828453a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35081
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-16 13:20:29 +00:00
Mike Klein
c667dff58d Turn on exceptions in test tools.
This allows us to test things that, e.g., throw std::bad_alloc.

Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
Reviewed-on: https://skia-review.googlesource.com/34982
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-16 01:49:07 +00:00
Herb Derby
35ae65d5d0 SkSafeMath for tracking size_t overflow
Do multiply (mul) and add while tracking that the
calculation does not overflow, which can be checked with
ok().

The new unit test shows a couple examples.

Author:  Herb Derby <herb@google.com>
Change-Id: I7e67671d2488d67f21d47d9618736a6bae8f23c3
Reviewed-on: https://skia-review.googlesource.com/33721
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-08-11 19:23:06 +00:00
Brian Osman
71a1889a14 Revert "Revert "GrContext::dump that produces JSON formatted output""
This reverts commit 0f450acd76.

Bug: skia:
Change-Id: I97428fbbc6d82bf8b186ec5fdbf1a939c00e4126
Reviewed-on: https://skia-review.googlesource.com/32726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 15:42:25 +00:00
Brian Osman
0f450acd76 Revert "GrContext::dump that produces JSON formatted output"
This reverts commit 175af0d011.

Reason for revert: Chrome doesn't know about portable format specifiers. Sigh.

Original change's description:
> GrContext::dump that produces JSON formatted output
> 
> Includes caps, GL strings, and extensions
> 
> Bug: skia:
> Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
> Reviewed-on: https://skia-review.googlesource.com/32340
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie280b25275725f0661da7541f54ed62897abb82f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/32861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-09 20:47:49 +00:00
Brian Osman
175af0d011 GrContext::dump that produces JSON formatted output
Includes caps, GL strings, and extensions

Bug: skia:
Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
Reviewed-on: https://skia-review.googlesource.com/32340
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-09 18:52:05 +00:00
Brian Osman
b6705c2536 Add support for object creation/snapshot/deletion events
- Bring back some previously deleted macros and helper types.
- Automatically inject base_type information into snapshot events,
  to allow simpler tracking of polymorphic object types.
- Fix JSON formatting of pointer values (they were serializing as bool).

Bug: skia:
Change-Id: Iac7803f72ce5396ffd2fbcb5a36d76745c5e3f3e
Reviewed-on: https://skia-review.googlesource.com/28220
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-03 17:10:08 +00:00
Jim Van Verth
1af03d4396 Compute correct bounds for DrawShadowRec.
Bug: skia:6880
Change-Id: Ia8b94e52eec3feb5104d2351bf7a7e6f99101deb
Reviewed-on: https://skia-review.googlesource.com/26370
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-31 13:55:32 +00:00
Brian Osman
a9340ba980 Tracing macro cleanup continued
- Remove one especially chatty event, and one pointless test
- Use TRACE_FUNC everywhere, rather than manual strings

Bug: skia:
Change-Id: Icb795294009150ca9a260436738d79546a733337
Reviewed-on: https://skia-review.googlesource.com/26701
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-26 12:58:59 +00:00
Mike Klein
7a0ba1c132 guard SkTableColorFilter against out-of-range inputs
I was going to be clever here and only clamp when we
know the inputs are out of range, but this filter is
rare and slow enough that I think I'd rather it just
be super paranoid safe.

The test crashes without this fix and passes with it.

Change-Id: I4e17aad2b5c1e96180ce8d73b97bee746cf985c2
Reviewed-on: https://skia-review.googlesource.com/26702
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-26 12:55:09 +00:00
Mike Klein
0fddb2d7c1 Retry cleaning up SkLinearBitmapPipeline.
This is mostly dead code.

In order to make it truly dead, we need to opt drawing unpremul images
into SkRasterPipelineBlitter.  They had been handled by
SkLinearBitmapPipeline, but can't be draw by SkBitmapProcLegacyShader.

Drawing unpremul images is tested by the GM all_variants_8888, which
gave us trouble last time around (serialize-8888 drew right, 8888 wrong)
but now draws fine.  I think this was probably also the root of the
revert, drawing some unpremul image in Chrome's tests somewhere.

Change-Id: I453f9df44ade807316935921cbae82961e2f08aa
Reviewed-on: https://skia-review.googlesource.com/24862
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-20 16:45:52 +00:00
Robert Phillips
5af44defbd Add GrResourceAllocator class + unit test
Change-Id: I2700e8cb4213479b680519ba67f078cc3fb71376
Reviewed-on: https://skia-review.googlesource.com/23661
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-19 11:43:54 +00:00
Ethan Nicholas
762466e9fe Re-re-land sksl fragment processor support
This reverts commit 5ce3972055.

Bug: skia:
Change-Id: I88260c90004610a1cf8ad1a87c2b4b222525bbb6
Reviewed-on: https://skia-review.googlesource.com/21108
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-29 14:57:47 +00:00
Mike Klein
5ce3972055 Revert "Re-land sksl fragment processor support"
This reverts commit c070939fd1.

Reason for revert: 

This has some knock-on effects in the generation of Android.bp from our GN files.  See gn/gn_to_bp.py?  We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...

Original change's description:
> Re-land sksl fragment processor support
> 
> This reverts commit ed50200682.
> 
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-27 22:52:10 +00:00
Ethan Nicholas
c070939fd1 Re-land sksl fragment processor support
This reverts commit ed50200682.

Bug: skia:
Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
Reviewed-on: https://skia-review.googlesource.com/20965
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 18:27:57 +00:00
Ethan Nicholas
ed50200682 Revert "sksl fragment processor support"
This reverts commit ccf59917d3.

Reason for revert: breaking iOS bots

Original change's description:
> sksl fragment processor support
> 
> Bug: skia:
> Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
> Reviewed-on: https://skia-review.googlesource.com/17843
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I0a33060c7c42c7b44c5c13d443ac42958291c2f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 14:36:44 +00:00
Ethan Nicholas
ccf59917d3 sksl fragment processor support
Bug: skia:
Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
Reviewed-on: https://skia-review.googlesource.com/17843
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-27 14:20:05 +00:00
Mike Reed
fb49909aca Revert "Remove deadcode for sRGB image shading."
This reverts commit 51f6a0f89e.

Reason for revert: try to fix chrome roll

Original change's description:
> Remove deadcode for sRGB image shading.
> 
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>

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

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

Change-Id: I90409a08409177d9dc3b094d736af0fdaf7d6cdd
Reviewed-on: https://skia-review.googlesource.com/20824
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-26 13:59:51 +00:00
Mike Reed
5e78c61075 Revert "remove a bit more dead code"
This reverts commit d9b1fe02a6.

Reason for revert: try to fix chrome roll

Original change's description:
> remove a bit more dead code
> 
> Change-Id: I61484672e88d6bb4f75833ee89e7178c4f34d610
> Reviewed-on: https://skia-review.googlesource.com/20780
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

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

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

Change-Id: I03dcd344dfb138261d9421b0692d12e4ed431100
Reviewed-on: https://skia-review.googlesource.com/20822
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-26 13:53:22 +00:00
Mike Reed
91d7d1d4ac Revert "Revert "Remove deadcode for sRGB image shading.""
This reverts commit e08e639063.

Reason for revert: revert was not clean

Original change's description:
> Revert "Remove deadcode for sRGB image shading."
> 
> This reverts commit 51f6a0f89e.
> 
> Reason for revert: crazy attempt to fix chrome roll
> 
> Original change's description:
> > Remove deadcode for sRGB image shading.
> > 
> > Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> > Reviewed-on: https://skia-review.googlesource.com/20695
> > Reviewed-by: Mike Klein <mtklein@chromium.org>
> > Commit-Queue: Herb Derby <herb@google.com>
> 
> TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: Icab02936d6c18e50b8de353aa1cd4c225e15e0bf
> Reviewed-on: https://skia-review.googlesource.com/20800
> Reviewed-by: Mike Reed <reed@google.com>

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

Change-Id: Ibc579a5a95e78cb257e8d443dbb905db3761e84a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/20802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-25 20:01:28 +00:00
Mike Reed
e08e639063 Revert "Remove deadcode for sRGB image shading."
This reverts commit 51f6a0f89e.

Reason for revert: crazy attempt to fix chrome roll

Original change's description:
> Remove deadcode for sRGB image shading.
> 
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>

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

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

Change-Id: Icab02936d6c18e50b8de353aa1cd4c225e15e0bf
Reviewed-on: https://skia-review.googlesource.com/20800
Reviewed-by: Mike Reed <reed@google.com>
2017-06-25 19:55:03 +00:00
Mike Klein
d9b1fe02a6 remove a bit more dead code
Change-Id: I61484672e88d6bb4f75833ee89e7178c4f34d610
Reviewed-on: https://skia-review.googlesource.com/20780
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-06-24 16:08:23 +00:00