Commit Graph

4165 Commits

Author SHA1 Message Date
Ethan Nicholas
85705c1b3b Revert "remove 'in uniform' support from GrSkSLFP, make rules more clear"
This reverts commit ac18a5ca60.

Reason for revert: breaking Chrome roll

Original change's description:
> remove 'in uniform' support from GrSkSLFP, make rules more clear
> 
> Bug: skia:
> Change-Id: Iaa4d33c1bfb295d87343411ba6aacc8fae68ef9c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244300
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I6e53f5197c751d961abfa21861b940d4168de213
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244508
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-26 16:04:26 +00:00
Herb Derby
4e8f63a92a Blur both in x and y
Change-Id: Iea4ad298fe472182411a0246b8bae2972523c575
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244263
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-09-26 15:17:51 +00:00
Ethan Nicholas
ac18a5ca60 remove 'in uniform' support from GrSkSLFP, make rules more clear
Bug: skia:
Change-Id: Iaa4d33c1bfb295d87343411ba6aacc8fae68ef9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-26 14:05:10 +00:00
Herb Derby
f07a363413 Limit sigma for software blurs
The value (window + 1)^3 * 255 < 2^32.
window = floor(sigma * 3 * sqrt(2 * kPi) / 4)
So, max sigma = 135.

Bug: skia:9454
Change-Id: I1df5137013da3e80d1e8af9ed6ac2b688ef95e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243430
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-09-24 14:00:36 +00:00
Chris Dalton
c096654fa7 ccpr: Don't assign inverse fill types to fan tessellations
Bug: skia:9453
Change-Id: Iabbd1089975efff4e89687e990128c075bf0ab9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243432
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-09-24 02:44:17 +00:00
Brian Osman
2e29ab5b03 added support for user-defined functions to GrSKSLFP
Bug: skia:
Change-Id: I1483cdf7229b7234be41d21407e2b4abf99fff76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239925
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 17:13:57 +00:00
Robert Phillips
ea1b30b57b New proposed syntax for SkColorTypes
Everything except for SkImageInfo.h is mechanical

Change-Id: I2d775c79467fb15f6022e80d21b4a9151272fe2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242896
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 20:42:55 +00:00
Robert Phillips
f47717ad8c Alter wacky_yuv_formats GM to skip rows if the required backing GPU format(s) aren't supported
Change-Id: I066345d57f11e0937fc760ebdba6ad308a5f948b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242821
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 18:06:38 +00:00
Robert Phillips
17a3a0bda9 Last tranche of new SkColorTypes
This CL adds:
    kAlpha_F16_SkColorType
    kRG_F16_SkColorType
    kRGBA_16161616_SkColorType,

which should be it for a while.

Bug: skia:9121
Change-Id: I81b9d46a202a76e9b7d7ca86495d72dbdae32576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241357
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-18 18:23:29 +00:00
Brian Salomon
db47b16d46 blurrect_compare GM: draw "masks" in white for RGBA fallback.
Change-Id: I569fd550dbdd3fcff5e879f68a919da92421513a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242477
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-18 17:01:05 +00:00
Brian Salomon
db151e073f Respect ImageSetEntry alpha in one-at-a-time code path
Previously it was ignored. Update GM with test case that covers this.

Change-Id: I93e7de285a9d4020dd48e14e09e55fdfb346fff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242083
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-17 17:07:54 +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
Brian Salomon
032cf12f2b Make blurrect_compare GM work on GPUs without renderable A8
Change-Id: I8965a6a417bc7b228e723d8e53a5ff46f8c7badf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240836
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-12 13:40:19 +00:00
Robert Phillips
429f0d380c Add kRG_1616 and kAlpha_16 SkColorTypes
This also switches GrColorType::kR_16 to kAlpha_16 to more closely match raster.

Bug: skia:9121
Change-Id: I03c6e6c52c90aa4223478c5ea6c8b2ed8558f677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239930
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-12 12:20:09 +00:00
Brian Salomon
4fe30e15c0 Also skip blurrect_compare on DDL configs
Change-Id: I5ead00b6d04c9b528a2b04f8ba2d20973ef95c13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240561
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 21:50:06 +00:00
Brian Salomon
78be3ebee7 Update new blurrect_compare GM to skip when SkCanvas::makeSurface will fail
Change-Id: I6e101bf54e233345934e258dadb4fb7ab3283b61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240511
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 18:31:15 +00:00
Brian Salomon
a8f43ce668 Remove unused GM deferred canvas feature
Change-Id: I57b7fab34a46dd03a045800989e73f9001bdb6cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240506
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 18:28:05 +00:00
Brian Salomon
b2d5d40a33 Adapt GrRectBlur for cases with rect W/H less than six sigma.
Add GM that generates reference blur rect images and compares against
actual.

Change-Id: If0ce291e211fefe96af8afdf0a60636b5f40ef47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239757
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 14:39:07 +00:00
Robert Phillips
d470e1b905 Add kRG_88_SkColorType
Bug: skia:9121

Change-Id: Id2a12a5d607b84ce393d2b58233bf8e23f646059
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235797
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-06 17:55:26 +00:00
Greg Daniel
f793de1189 Update some ops to create their buffers in onPrepare.
Need for a follow on change, we need all ops to do all their prep work
which includes creating needed buffers before we start calling
execute on ops. This change updates the few ops that were creating their
buffers in onExecute.

Change-Id: I0f43b0cc35359e1e7ccfb3b159e79bdfe288dcb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239436
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-09-05 19:43:11 +00:00
Mike Reed
18a8df6cc1 update gm to better show the unclipped layers
Change-Id: I7dd19befda85bf2f89f317d190b7296ded91c00e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238957
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-09-03 20:10:48 +00:00
Robert Phillips
cf39f375d1 Remove maxCount resource cache limit
Change-Id: I0f1064c8433d69e24ca3d5b970c99d539dc1dadd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238442
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-03 14:59:51 +00:00
Michael Ludwig
0a1e9efa39 Don't use AA convex path renderer if direction can't be determined
Without the changes to GrShape and GrAAConvexPathRenderer, this new GM
would not draw the red circle at the center when using Ganesh. Raster
drew the red circle. The difference came about because they checked
convexity after transforming by the view matrix, and Ganesh checked
before.

With this particular path construction and the very large scale factor
on the CTM, the convexity calculator in local space computed small
enough edge vectors that it thought the contour backtracked on itself
instead of winding in a consistent direction.

The GrAAConvexPathRenderer would claim it could draw the convex path,
but later when actually preparing to draw, it would do nothing if it
turned out the convex path didn't have a direction. This CL updates it
so that the convex path renderer's canDraw() function matches what it
is actually able to draw.

There is the separate issue of the convexity/direction checking
precision.

Bug: chromium:996140
Change-Id: I6f2af2d9ba6752663d97c8573deb2d767a3f1245
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238121
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-09-02 01:57:03 +00:00
Ethan Nicholas
d4efe685dd SkSL sample() now permits specification of coordinates
Bug: skia:
Change-Id: I16073008ac852f1864bd1d2bd38087a5b661d05a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232581
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-08-30 15:29:13 +00:00
Ben Wagner
54aa8846e9 Add test for baseline snapping.
Change-Id: I895218ba087d2f04ee92bc6eaaaad780723a9202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237803
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-28 16:35:55 +00:00
Greg Daniel
2d41d0d363 Remove GrGpuTextureCommandBuffer class and rename to GrOpsRenderPass.
Change-Id: Ia6e666a7bb986bb3dc769d25919580bca17b4748
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236556
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-26 15:34:14 +00:00
Mike Reed
92b33354dd more rect api simplifications
set --> setLTRB
set(pts, count) --> setBounds

Bug: skia:9328
Change-Id: I807c0598a8b23b2f721db118ec41c1607114205a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237038
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-08-25 10:12:57 +00:00
Brian Osman
7e16b58b5a SkRuntimeShaderMaker -> SkRuntimeShaderFactory
This refactor makes it work like the runtime color filter, where inputs
can be updated without generating a new shader key every time.

Change-Id: Ic1762aebae96fd8b7a8a74fb200bc02ec08cc029
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235798
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-21 18:22:33 +00:00
Brian Salomon
bf6b9795f6 GrSurfaceContext not ref counted.
Also don't specify redundant width/height to SkGpuDevice.

Change-Id: I389df5c4b073c2c05632ba6b7c95b02a22dfaf98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235824
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-21 15:31:23 +00:00
Yuqian Li
52a6a40535 Add savelayer_with_backdrop GM to benchmark
The performance regression only happened on iOS devices. Benchmarking
on Desktops or Android devices doesn't seem to show any significant
regressions.

Tested this on iPhone XS with nanobench and saw a 10ms->30ms regression:

regression:
  61/63  MB 1   10.5ms  10.7ms  10.8ms  12.2ms  5%  █▂▁▁▂▁▂▂▂▁  8888    GM_savelayer_with_backdrop
 101/101 MB 1   36ms    36.5ms  36.4ms  36.8ms  1%  ▁▅▃▆▆▄▆▃▃█  gles    GM_savelayer_with_backdrop

before regression:
  61/63  MB 1   10.3ms  10.4ms  10.6ms  12.4ms  6%  █▂▁▂▁▁▁▁▁▁  8888    GM_savelayer_with_backdrop
  96/96  MB 1   10.6ms  10.7ms  10.7ms  10.8ms  1%  ▄▁▄▂▆█▅▃▂▅  gles    GM_savelayer_with_backdrop

It's interesting to see that 8888 is always fast. Is the regressing CL changing blur from software to GPU?

Bug: https://github.com/flutter/flutter/issues/36064
Change-Id: Iea2305e41a31bd5b4267f45bfd835231d49d639a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234413
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-08-19 23:19:37 +00:00
Brian Osman
4c3fd34e00 Remove MakeCrossContextFromEncoded, unused argument from ...FromPixmap
Change-Id: I962e923a4994eb549a9c1002323f33d05b936b84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234912
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-15 17:10:28 +00:00
Brian Osman
bacb821c42 Fix crash in reinterpretcolorspace GM with abandoned context
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext

Change-Id: Ic46232b1f98f81c997ed547b79e46b9b1f0b142e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234906
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-15 15:06:28 +00:00
Brian Osman
d514837136 Add SkImage::reinterpretColorSpace
This reinterprets the contents of an image as though they were in a
different color space. Helpful for tools and debug visualization.

Bug: chromium:795132 chromium:985500
Change-Id: Ia8739bbd73d72249b8bee9d51dfa11d560a2a1f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234328
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-15 13:30:41 +00:00
Michael Ludwig
e30a485a68 Move the source image into Context
This folds the source SkSpecialImage, that was previously passed in as
an argument to filterImage(), into the filtering Context. This allows
the Context to provide convenient access to backend properties that
are only accessible through the source image, but makes it clear in
calling code that the actual pixels of the source image are not needed.

IMO this improves readability in implementations that previously had
functions that would take a 'src' and an 'input' image, but would only
really process the input image's pixels.

Bug: skia:9282
Change-Id: I42437dcc6819e3d3882bff7851f9b16277a69f06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234578
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-15 12:31:11 +00:00
Brian Salomon
201cdbb646 Make GrSamplerState.h and GrRenderTarget.h private
Change-Id: Id7a270f5a528e1a4a6d94474fa092545252753b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234667
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-15 12:22:11 +00:00
Ben Wagner
9f02d2d7c9 Add portable allocator to raster allocator test.
Still use GDI and CG when available, but use a Skia backed native raster
allocator on other platforms. This allows for exercising this code on
all platforms as well as ensuring that Skia itself can back this
interface. This also means this gm should always draw something instead
of often just being the white background.

Change-Id: Ie607f7082dc40454fc60ea4b4fe94a1db2d7502f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234662
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-14 22:14:13 +00:00
Yuqian Li
74587d8943 Test serializing pictures with cull rects
Bug: skia:9334
Change-Id: I54a70c529b520538a3c8050a5592bbf419dd1890
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234355
Commit-Queue: Yuqian Li <liyuqian@google.com>
Auto-Submit: Yuqian Li <liyuqian@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-14 21:59:43 +00:00
Ben Wagner
fbac83aa15 Make fontscalerdistortable more flexible.
This gm is often used as a testbed for various variable font issues, so
make it easier to tweak all the values.

Change-Id: I8291c693b73036a8f3b395e6bdd50b0037da1b84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233418
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-14 21:58:04 +00:00
Ben Wagner
2e9f772ef0 Move bigconic gm to be a test.
This gm doesn't seem to have ever drawn anything onto the actual canvas,
just leaving a white background. The content is derived from a fuzzer
generated path which caused an assert in the software rasterization of
the path. Since the point is to ensure that this path does not cause an
assertion when drawn, move to the path tests.

Change-Id: Ibff77763d8079386a9b4bfe9a437ffa16856b53b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234663
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-14 21:07:03 +00:00
Ben Wagner
c061d31c24 Make the flippity not crash in Viewer.
This gm would assert if drawn more than once. Fix that.

Change-Id: Idf4e4f496a141c54c1a7d5483ab0ec369dae5e04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234659
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-14 20:23:33 +00:00
Brian Osman
d566e2eab7 Remove unused dstColorSpace parameter from makeTextureImage
Old version still exists until client code is migrated.

Change-Id: I087b6b977f586d334f9a20954e7ed7b5e4b7ea5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234579
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-14 19:09:05 +00:00
Robert Phillips
2e1142cc32 Swap async readback gms over to using GrContext's createBackendTexture
I'm changing GrGpu's createBackendTexture to take mipmap levels. Cleaning this up will make that change easier.

Change-Id: I373fc45a4fdbe4adb1c917c5def6fd5a4a0c263a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234582
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-14 18:05:44 +00:00
Brian Salomon
2c59659821 Make GrRectBlurEffect be analytical rather than use a texture LUT.
The math isn't that complex and the existing code has intergralization of
the profile size that makes getting the texture coords correct tricky
(and currently wrong).


Bug: skia:9319
Change-Id: Ic928737ce4c40d28ee0696c3628e914f35ffe371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233985
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-14 13:35:37 +00:00
Brian Salomon
96b383a78c Remove GrRenderable param from GrProxyProvider::createTextureProxy()
Every caller passes kNo.

Change-Id: I9c21c77f57f6215246794b39fc8ec485d4ae23d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234331
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-13 23:53:25 +00:00
Mike Klein
f815301b1a add GM for skbug.com/9331
Release and debug builds draw differently on my machine,
and if I tack #pragma clang optimize off onto cull_rect()
in SkDashPath.cpp, they both draw like a debug build.

I'm not very familiar with this code, so it may help my
diagnosis to see what other bots draw.

Bug: skia:9331
Change-Id: I1798503c0e5956ec767d8e0021ccca7a1d2a8ac3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233999
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-12 19:32:40 +00:00
Hal Canary
edda5653e1 gm: GMFactory returns a unique_ptr<>
Change-Id: If8a4d3cfdeaef58dd9924af430cfed834519b096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232496
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-12 19:02:40 +00:00
Brian Salomon
74c19de3be Add SkUNREACHABLE to definition of SK_ABORT.
Remove return statements immediately following SK_ABORTs.

Change-Id: I6446b6ba3a6fb272d84ea27f38cf366095cf801d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233565
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-09 20:43:39 +00:00
Mike Klein
c4abade253 Reland "add a stub for running fiddles as GMs"
This is a reland of adfc22df86

PS2+3 restrict this to just local builds: no G3, no Android, etc.

Original change's description:
> add a stub for running fiddles as GMs
>
> This is about the 15th time I've hacked this up.
>
> Change-Id: I0c75c0d04133d867e942c39eba693fd7227ba0f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233240
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Change-Id: I7b8e7418edc4949c2f3e07ddf01f0643344397d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233242
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-09 16:22:51 +00:00
Mike Klein
639fce9060 Revert "add a stub for running fiddles as GMs"
This reverts commit adfc22df86.

Reason for revert: breaks building DM in Android, probably Google3 too.  Shame.

Original change's description:
> add a stub for running fiddles as GMs
> 
> This is about the 15th time I've hacked this up.
> 
> Change-Id: I0c75c0d04133d867e942c39eba693fd7227ba0f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233240
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: I56207630eeba4fb411111fd40e6bc532cef39407
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233241
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-09 15:40:52 +00:00
Mike Klein
adfc22df86 add a stub for running fiddles as GMs
This is about the 15th time I've hacked this up.

Change-Id: I0c75c0d04133d867e942c39eba693fd7227ba0f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233240
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-09 14:38:10 +00:00
Michael Ludwig
bf8439d7e2 Fix GMs broken during API porting
Bugs:
morphology GM: Had swapped Erode and Dilate
imagefilterscropexpand GM: Was applying the filter to the wrong rectangle
imagefilterstransformed, filterfastbounds, et al GMs: The new
SkImageFilters::Image() factory had defaulted to using kNone for quality,
since it appeared to keep a 1-to-1 scale. However, it actually draws the
image from srcRect into the dstRect, mapped by the CTM, so if there's a
scaling factor in the CTM the filter no longer is 1-to-1 and kNone leads
to weird scaling artifacts. So switched back to the original kHigh default.
Change-Id: I30ee455008720048fb27eaed1c2c42915d222c97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232396
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-05 14:53:45 +00:00
Robert Phillips
00c9f0dc92 Increase specificity of GrColorType computed for YUV planes (take 2)
When a single channel texture is used for a YUV channel we will
interpret it as kGray_8. When a single channel texture is used
as an A channel we will interpret it as kAlpha_8.

Change-Id: I0a02b849d214f63369dedf09b78195a293adc78e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232142
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-05 12:59:40 +00:00
Michael Ludwig
898bbfac2e Update gms to use new image filter factories
Bug: skia:9280
Change-Id: Ic7ca3a9c86025128bc45b89ea90aa4553287b8c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230879
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-02 21:08:40 +00:00
Michael Ludwig
8ee6cf3691 Move SkImageFilter functionality into private SkImageFilter_Base
Bug: skia:9281
Change-Id: I189dbf652580805641f8c4b9a6587cf15a9049dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231256
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-02 18:56:39 +00:00
Robert Phillips
8ba5315073 Revert "Increase specificity of GrColorType computed for YUV planes"
This reverts commit c326aaf134.

Reason for revert: ANGLE D3D es2 bots

Original change's description:
> Increase specificity of GrColorType computed for YUV planes
> 
> When a single channel texture is used for a YUV channel we will
> interpret it as kGray_8. When a single channel texture is used
> as an A channel we will interpret it as kAlpha_8.
> 
> Change-Id: I746f8d761d7779266a4106311a93d651266bb422
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232017
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I57a00d65c6226822a501b231e103016a45943e5e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232138
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-02 18:29:27 +00:00
Robert Phillips
c326aaf134 Increase specificity of GrColorType computed for YUV planes
When a single channel texture is used for a YUV channel we will
interpret it as kGray_8. When a single channel texture is used
as an A channel we will interpret it as kAlpha_8.

Change-Id: I746f8d761d7779266a4106311a93d651266bb422
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232017
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-02 17:44:04 +00:00
Florin Malita
4800949bf4 Reland: SkColorfilters::HSLAMatrix
Introduce an SkColorFilter_Matrix flavor operating in HSLA space.

(CPU-only for now)

TBR=mtklein

Change-Id: I3a8686775593ccc9ce0e46159a17bec7f4ab4228
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231736
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-01 23:04:22 +00:00
Mike Klein
44d095fe18 Revert "SkColorfilters::HSLAMatrix"
This reverts commit f4c5f63ab9.

Reason for revert: trying to revert my earlier CL.  Sorry!  I'll let you reland this one first and I'll rebase next time.

Original change's description:
> SkColorfilters::HSLAMatrix
> 
> Introduce an SkColorFilter_Matrix flavor operating in HSLA space.
> 
> (CPU-only for now)
> 
> Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I6a4e85d3810e2ca30d072937c035c929917d36c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231678
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-01 21:10:31 +00:00
Florin Malita
f4c5f63ab9 SkColorfilters::HSLAMatrix
Introduce an SkColorFilter_Matrix flavor operating in HSLA space.

(CPU-only for now)

Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-01 19:02:55 +00:00
Robert Phillips
0a15cc62a8 Propagate GrRenderable flag to GrCaps::getBackendFormatFromColorType
This makes calling GrCaps::getBackendFormatFromColorType equivalent to calling GrContext::defaultBackendFormat

Change-Id: Ic402245fa0502920c47c2a29aadc4e559abdc09b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230416
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-30 17:45:45 +00:00
Mike Reed
9dc0b9e2f8 remove code now that loopers are dead (w.r.t. canvas and paint)
We can't remove the loopers themselves, as they are still used
by android and chrome (they just don't ever pass them to skia).

Eventually each of those clients will resolve this, but for now
we just keep the classes (and tests) in skia.

Bug: skia:4783
Change-Id: I5f507e6bb82280f2bc7c0b21eebe59c287aa9265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230579
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-30 12:49:28 +00:00
Chris Dalton
07931aaeaa Rename labrynth.cpp -> labyrinth.cpp
Bug: skia:
Change-Id: I80b09b2ffd7615e486315d715d3d28d06764658a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229759
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-29 22:16:29 +00:00
Mike Reed
6397fa30ab add gm for tricky arc
Very likely, reimplementing this routine using doubles would also
improve results, given the many divides, subtracts, and trig calls.

Bug: skia:9272
Change-Id: I78a3dd9a11a8de1c0ef7a4406a227a0b7d9aecf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230123
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-26 18:11:04 +00:00
Mike Klein
52337de95c re-run tools/rewrite_includes.py
PS2 adds a rewrite for Skia #include <...> to #include "...", letting
them be otherwise rewritten and sorted too.  (We do need one exception
for the Vulkan headers, which will otherwise be rewritten to always
point to our own.)  I don't think it's particularly important to
favor "" or <>, but picking one keeps things consistent.

PS3 adds a missing SkMutex.h include.

PS4 fixes a terrible readability problem.

Change-Id: Id9fe752727ef30e802b1daf755ee2ed15e267577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229742
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-07-25 15:40:33 +00:00
Jim Van Verth
eda9a55baa Fix analytic shadows when rotated 180 degrees.
A 180 degree rotation matrix is functionally like a scale matrix, but
the elements are negative. To compensate for this, we use abs().

Bug: b/137547660
Change-Id: Ib0e7449872523af024e7de9005b9bb70743e04b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229394
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-24 19:17:45 +00:00
Hal Canary
fa3305ae3f gm: add some overrides
Change-Id: I5348e2da1a2034b629d43b9e9faadb6db333abe8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228348
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-24 19:11:35 +00:00
Hal Canary
594fe855a3 gm: simplify several onName
Change-Id: I9c470c2cf5d546626c279ce65626f767292a94e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228354
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-24 18:05:45 +00:00
Chris Dalton
db5210fbab Add a gm for the labyrinth bug
Bug: chromium:913223
Change-Id: I1e229af7fbc61f316fccdc4c7ece27de5932be60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229479
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-07-24 17:23:15 +00:00
Mike Reed
aed493e49f remove default looper flag, rely on clients to opt-in
Bug: skia:4783
Change-Id: I232ec6fa10287b6e07849d596b93cc997e0de052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229280
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-23 14:20:09 +00:00
Mike Reed
b7dad44040 Reland "hide drawlooper from paint"
This reverts commit 6dc14ded91.

Reason for revert: add flag to google3

Original change's description:
> Revert "hide drawlooper from paint"
>
> This reverts commit 766b42b7ba.
>
> Reason for revert: afaict this is changing a lot of image filter GMs for the worse
>
> Original change's description:
> > hide drawlooper from paint
> >
> > Bug: skia: 4783
> >
> > Change-Id: I1d0ad1683a2e8345d8ea13db9b69b568ada827dc
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228573
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Mike Reed <reed@google.com>
>
> TBR=fmalita@chromium.org,reed@google.com
>
> Change-Id: I0bfd48ada3f8e48a774527caccf7abdb7a1cc470
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia: 4783
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229005
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ib3cd8941a63cd323b8872dd7fec1c953ab81cbdc
Bug: skia: 4783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229010
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-07-22 20:03:36 +00:00
Robert Phillips
6dc14ded91 Revert "hide drawlooper from paint"
This reverts commit 766b42b7ba.

Reason for revert: afaict this is changing a lot of image filter GMs for the worse

Original change's description:
> hide drawlooper from paint
> 
> Bug: skia: 4783
> 
> Change-Id: I1d0ad1683a2e8345d8ea13db9b69b568ada827dc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228573
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I0bfd48ada3f8e48a774527caccf7abdb7a1cc470
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia: 4783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229005
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-22 17:27:17 +00:00
Mike Reed
766b42b7ba hide drawlooper from paint
Bug: skia: 4783

Change-Id: I1d0ad1683a2e8345d8ea13db9b69b568ada827dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228573
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-22 16:25:41 +00:00
Mike Reed
c9f0c593ed simplify how we call apply
Bug: skia:
Change-Id: I16dd773812a63da7e565f610fe7a243a88e482d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228575
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-07-22 01:06:09 +00:00
Mike Reed
efe259bb2a add apply method to drawlooper
Bug: skia: 4783

Change-Id: I3eabe364c9b377d1f0c024131f8cbdabc094fa8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228574
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-07-20 20:06:01 +00:00
Chris Dalton
c3318f09cd ccpr: Add an MSAA atlas mode
Adds the option to use a multisampled (or mixed sampled) atlas, and
uses the sample mask and stencil buffer instead of coverage counts.

Bug: skia:
Change-Id: I9fb76d17895ae25208124f6c27e37977ac31b5eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227428
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-19 20:52:17 +00:00
Hal Canary
bd865e2703 gm: virtual->override
Change-Id: I7782f1d08a03c725bed76078adfb9b84aad34a5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228347
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-18 18:07:52 +00:00
Mike Reed
019458d9ad change colorfilter signature back to just inout color
Change-Id: I8999d14a31d071cb6f5c8966a55523b7dc6e7f57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228118
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-17 16:50:43 +00:00
Mike Reed
8c31f2bf7f use same signature for shader/colorfilters in sksl
'void main(float x, float y, inout half4 color)'

For colorfilters, x,y are uninitialized
For shaders, color is paint-color

Change-Id: I21c2f570702f117d33646bd8fba0ab4def20a118
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227439
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-17 15:47:36 +00:00
Brian Salomon
f2c2ba99f6 Remove kRenderTarget_GrSurfaceFlag, instead pass GrRenderable.
This is the last surface desc flag, so remove flags from GrSurfaceDesc.

Bug: skia:6718

Change-Id: Id3ed66b161289927b62f40bfb1f6482cf544deda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227858
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-17 15:09:03 +00:00
Hal Canary
e574f1e409 [reland] SkMetaData: move from src/ to tools/
Original: https://skia-review.googlesource.com/c/skia/+/227436
Change-Id: Iec326027319f39b0402e1b5c03b327cb26249159
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227778
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-17 13:14:38 +00:00
Greg Daniel
12e7585495 Revert "SkMetaData: move from src/ to tools/"
This reverts commit 9d844d8ce5.

Reason for revert: breaking google3

Original change's description:
> SkMetaData: move from src/ to tools/
> 
> Change-Id: If581c8ceeaa76985535cb7b6772742f0011cfe8e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227436
> Commit-Queue: Hal Canary <halcanary@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=halcanary@google.com,bungeman@google.com

Change-Id: Ifadad46f0663b743d3e57bb6317707f2a2fac07d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227636
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-16 00:28:44 +00:00
Hal Canary
9d844d8ce5 SkMetaData: move from src/ to tools/
Change-Id: If581c8ceeaa76985535cb7b6772742f0011cfe8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227436
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-15 18:45:09 +00:00
Mike Reed
1f3548cb05 add savelayer flag to promote the later to half-float
Bug: skia:9256
Change-Id: Ifd7846349f83854e860306bd475cfba0adeddcb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227066
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-07-12 17:31:33 +00:00
Mike Reed
bae6169435 Revert "Revert "reimpl parts of arctTo using doubles to handle shallow angles""
This reverts commit bc525d65a1.

Change-Id: I92550317784be4084412d855cf475b77cd36d6da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227059
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-12 15:29:55 +00:00
Hal Canary
41248071ac tools: separate TimeUtils from AnimTimer
gm, slides, and samples no longer need to know about the implementation
details of AnimTimer.

This
    virtual bool onAnimate(const AnimTimer&);
becomes this:
    virtual bool onAnimate(double /*nanoseconds*/);
which is much easier to reason about.

AnimTimer itself is now part of viewer.

Change-Id: Ib70bf7a0798b1991f25204ae84f70463cdbeb358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226838
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-12 15:05:01 +00:00
Florin Malita
bc525d65a1 Revert "reimpl parts of arctTo using doubles to handle shallow angles"
This reverts commit 1ec17042ff.

Reason for revert: *SAN bots + G3 roller breakage

Original change's description:
> reimpl parts of arctTo using doubles to handle shallow angles
> 
> Bug: 982968
> Change-Id: Ieaf70a406265876655447bd0584717063483808f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226847
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: If27d78b5d01815ded5354922ef6e2e4eb92f7a3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 982968
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227056
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-07-12 12:21:46 +00:00
Mike Reed
1ec17042ff reimpl parts of arctTo using doubles to handle shallow angles
Bug: 982968
Change-Id: Ieaf70a406265876655447bd0584717063483808f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226847
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-11 20:58:44 +00:00
Greg Daniel
e877dce203 Add kRGBA_8888_SRGB GrColorType and remove GrSRGBEncoded.
Change-Id: Iad1c72eb81ffd9c006e39c96191fada990d9dbd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226224
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-11 15:22:23 +00:00
Brian Salomon
c38cfa99a7 Third land of "Restore GL_UNPACK_ROW_LENGTH to 0 between MIP levles"
Fix: Use non-zero rowbytes when uploading zeros for initial texture clear

This reverts commit f16020ba1b.

Bug: chromium:981254
Change-Id: Iafd5893dd1b397ec1d91c64d48d46059e62488a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226557
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-10 22:58:58 +00:00
Brian Salomon
f16020ba1b Reland "Revert "Restore GL_UNPACK_ROW_LENGTH to 0 between MIP levles""
This reverts commit 4b40a1d5bf.

Reason for revert: Breaking iOS/GL

Original change's description:
> Revert "Revert "Restore GL_UNPACK_ROW_LENGTH to 0 between MIP levles""
> 
> This reverts commit abb5a315af.
> 
> Two fixes:
>   1) GMs pass valid rowBytes when calling directly to GrGpu.
>   2) Check for non-null data before trying to set UNPACK_ROW_LENGTH
> 
> Bug: chromium:981254
> 
> Change-Id: I24e46b0d2b14562d6b84a29fefe3410ce5c06c94
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226498
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I7f22151aad7fefd6896a57d4448d03fd3bdec0e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:981254
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-10 19:22:20 +00:00
Brian Salomon
4b40a1d5bf Revert "Revert "Restore GL_UNPACK_ROW_LENGTH to 0 between MIP levles""
This reverts commit abb5a315af.

Two fixes:
  1) GMs pass valid rowBytes when calling directly to GrGpu.
  2) Check for non-null data before trying to set UNPACK_ROW_LENGTH

Bug: chromium:981254

Change-Id: I24e46b0d2b14562d6b84a29fefe3410ce5c06c94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226498
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-10 16:13:44 +00:00
Florin Malita
9ab449ab69 Optional local matrix for SkShaders factories
Change-Id: Id913f89c699097ce53c9f8ef6deea264811a4179
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226082
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-07-09 18:09:14 +00:00
Greg Daniel
627d053913 Move uses of functions taking SkColorType to GrColorType versions in GrCaps.
Change-Id: I4feda6277cf14be0d32a8ce22257902483d7ae1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225734
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-09 13:29:07 +00:00
Hal Canary
c74a55057b GM: s/handleKey/onChar/
Change-Id: I917de2705807f61e6a6c3f76d52e290e8194d204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225936
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-08 22:28:50 +00:00
Brian Salomon
27ae52c6f4 Make deferred render target context without config or format
config is completely redundant. No caller really cares what the backend
format is.

Change-Id: I93f1feb3ee61db6c21b7915bab3ee3fba5656f92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225194
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-03 16:53:48 +00:00
Chris Dalton
effee20657 Use mixed samples internally for default coverage AA
Lays the infrastructure to use mixed samples internally, and begins
using nvpr with mixed samples on the default "gl" and "gles" configs.

In this rendition, we take the simplest approach possible re: stencil
attachments. We initially create a render target without stencil
(i.e., 0 samples). Then, any time a proxy needs a stencil buffer with
more samples than its target currently has, we create and attach a new
stencil buffer. However, we never "downgrade" a render target's
stencil attachment to one with fewer samples. So if the proxy only
needs one sample and the target has many, we leave it.

Bug: skia:
Change-Id: I8558ba799ac3dee457f349f77d4517c11413c9a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224456
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-02 06:04:09 +00:00
Robert Phillips
da2e67a357 Add GrProtected parameter to all createBackendTexture variants
Change-Id: I667bc730e321b579bef98f3d6003f7a7b29c9890
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224957
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-01 19:46:18 +00:00
Brian Salomon
d628747dfb Make GrColorSpaceInfo store GrColorType.
This is largely redundant with GrPixelConfig. However, we intend to
remove GrPixelConfig.

Bug: skia:7580

Change-Id: I03d92303be832711f7821f8a97d36387c9b04a9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222883
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-06-25 14:29:09 +00:00
Brian Salomon
e7499c7e8a GrColorSpaceInfo stores SkAlphaType.
This means GrSurfaceContext's know their alpha type.
All GrRenderTargetSurfaceContexts are kPremul.

Make GrTextureProducer store GrColorSpaceInfo.

Bug: skia:7580
Change-Id: I5ff321ef52c0edd32e5fac99dff95d44aa66f592
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223184
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-06-24 17:48:01 +00:00