This also updates create_test_font so that it can be built, compiles,
and uses SkFontStyle instead of SkTypeface::Style.
BUG=b/63669723
Change-Id: I6eb0f851853f4721cf8e5052255b5b6750c3257f
Reviewed-on: https://skia-review.googlesource.com/24740
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 467022b186.
Reason for revert: GrAHardwareBufferImageGenerator.cpp
Original change's description:
> Reduce dependence on GrSurface's origin field
>
> Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
>
> Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
> Reviewed-on: https://skia-review.googlesource.com/24700
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/25620
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL.
Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d
Reviewed-on: https://skia-review.googlesource.com/24700
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: If6f0d0a57463bf99a66d674e65a62ce3931d0116
Reviewed-on: https://skia-review.googlesource.com/24644
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
I replaced the previous once, because I think this covers
everything it was testing, and lots more. It renders many
combinations of parameters, and automatically detects if
the results are correct or not. Each test is color coded,
and the overall image is tinted with gold's red/green to
make triaging easy.
Adds four new top-level GMs (single and double contour,
with and without AA). Each one tests several more params:
- Cap type
- Stroke width
- Path structure (M vs ML vs MZ vs MLZ)
- Different verbs (L vs Q vs C vs A)
Bug: skia:6781
Change-Id: Ie81b4417101fea0b439cb094a65257dc06b6b5c0
Reviewed-on: https://skia-review.googlesource.com/21480
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The default value is kRespect, so we were always using that value.
Replace that with more explicit (and correct) logic.
Bug: skia:
Change-Id: I6984a96fa16033f41824851cade3ff046b0fae94
Reviewed-on: https://skia-review.googlesource.com/22260
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Motivation: SkPDF uses the generation ID to to de-duplicate bitmaps.
gammaencodedpremul.cpp was not drawing correctly before this change.
Change-Id: I6c59758ee0693f18e6ed7c51b22ee748af604ddc
Reviewed-on: https://skia-review.googlesource.com/22207
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This reverts commit 742a3e298f.
Reason for revert: Breaking Android roll:
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorPtr = colorPtr;
~~~~~~~~~~~~ ^
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorCount = colorCount;
~~~~~~~~~~~~ ^
Original change's description:
> Remove support for decoding to kIndex_8
>
> Fix up callsites, and remove tests that no longer make sense.
>
> Bug: skia:6828
> Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
> Reviewed-on: https://skia-review.googlesource.com/21664
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
TBR=djsollen@google.com,scroggo@google.com
Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6828
Reviewed-on: https://skia-review.googlesource.com/22120
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Make SkImage_Lazy::onMakeColorSpace return a new SkImage_Lazy
with the color space of SkImage_Lazy::fInfo changed.
Update the call to SkImageGenerator::getPixels to specify
image info with this new color space.
Update the call to SkImageGenerator::generateTexture to specify
this new color space. Update SkPictureImageGenerator to respect
the color space argument. Add a SkTransferFunctionBehavior
argument to SkImageGenerator::generateTexture to indicate if
color conversion is to be doing using an xform canvas.
Update Generator_GrYUVProvider::refAsTextureProxy to include a
color conversion step to respect this new color space.
TBR=reed@google.com
Bug:739559
Change-Id: I156a858884659e9dfae739a653bab2ef89274959
Reviewed-on: https://skia-review.googlesource.com/21605
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Christopher Cameron <ccameron@chromium.org>
Reviewed-by: Christopher Cameron <ccameron@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Fix up callsites, and remove tests that no longer make sense.
Bug: skia:6828
Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
Reviewed-on: https://skia-review.googlesource.com/21664
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Gaussian blur filter will interpolate value by using out of bounds
coords, which is 0. This makes it appears darker near the bounds in the
blurred images. There are two issues: 1) when downsampling and
upsampling, we should use GrTextureDomainEffect kClamp_Mode to clamp
the texture coords to the bounds; 2) during Gaussian blur, we need to
clamp to texture bounds.
BUG=622128
TEST=cc_unittests, GM image test & manual. Some test results can be found at:
https://bugs.chromium.org/p/chromium/issues/detail?id=622128#c49
Change-Id: I9283da1d91efb0da94a991f2d372e9f62c288bdc
Reviewed-on: https://skia-review.googlesource.com/20465
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:6612
Change-Id: I2920bb7b1aa3ebb021223ed6345f13f1f9c8bc24
Reviewed-on: https://skia-review.googlesource.com/21141
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
On Android it looks like we have:
stencilClip1
draw1
stencilClip2
draw2
where draw1 is being forward combined with draw2 b.c. they are both stencil clipped but it shouldn't b.c. they are different stencil clips.
Change-Id: Ia704d7ab869022a055eed0726e2b7fab8eaaf817
Reviewed-on: https://skia-review.googlesource.com/20977
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: I1183574de4e3a429fe00c5a6a0f71745f1f6f5b4
Reviewed-on: https://skia-review.googlesource.com/20969
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
AFAICT none of our clients use this entry point and it is tangling up efforts to add a new parameter to the BlurImageFilter.
Change-Id: I494634db98a1d246854a5e3735380fbe55f425c2
Reviewed-on: https://skia-review.googlesource.com/20837
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Adding a GM (Golden Master) image test in Skia to reproduce the bleed
black issue in Chrome. This would allow regressions to be caught in
Skia's status page before being rolled into Chrome.
Bug: 622128
Change-Id: Ifd2824fff59483c8e4be48392ba467414d41ca13
TEST=imageblurclampmode.cpp
Reviewed-on: https://skia-review.googlesource.com/20778
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
I think this has been broken since we tried to simplify this in
https://skia-review.googlesource.com/16547
The HSW backend does still look a little wrong, but improved,
and the others seem fixed. Can you see how this affects your
test cases, layout tests, etc?
BUG=skia:6783
Change-Id: I17957ac8100331bea5b64d674bf43105048b72f6
Reviewed-on: https://skia-review.googlesource.com/20548
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
The only substantive changes are the removal of GrProxy instantiation in:
SkGpuBlurUtils::GaussianBlur
GrSimpleTextureEffect::Make*
Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc
Reviewed-on: https://skia-review.googlesource.com/19965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Consolidates op factory functions to a rewritten GrRectOpFactory.
Removes GrRenderTargetContext::drawNonAAFilledRect() in favor of creating and adding ops directly by the callers.
Change-Id: I57e5fc739bf4e92b4a4710c739e6d22cce82a479
Reviewed-on: https://skia-review.googlesource.com/17711
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This does push some additional work (& includes) into the .cpp files.
Change-Id: I27c847e371802270d13594dcc22aae44039990bb
Reviewed-on: https://skia-review.googlesource.com/19660
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Cause DeferredTextureImageData functionality to support low bit depth
(4444, 565) image formats (with dithering).
Updated to handle colorspace + 4444 colortype correctly.
Bug: 720105
Change-Id: Ib7e14d937849f4f6b08fda6992a240bb203d0089
Reviewed-on: https://skia-review.googlesource.com/19094
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This began as cleaning up SkSpecialImage.h & spiraled out of control from there.
Change-Id: I9a570ecd2a7af9ee724ebfebe4e9185748f38bbc
Reviewed-on: https://skia-review.googlesource.com/19290
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Moves cubic root finding logic out of GrPathUtils and
PathOpsCubicIntersectionTest, and unifies it in SkGeometry.
"Normalizes" the homogeneous parameter values of the roots, rather
than the cubic inflection function. Does this normalization by
twiddling the exponents instead of division (which causes a loss of
precision).
Abandons the built-in derivatives in GrCubicEffect. These don't have
high enough precision on many mobile gpus. Instead we pass the KLM
matrix to the vertex shader via uniform, where we can use it to set up
new linear functionals from which the fragment shader can calculate
the gradient of the implicit function.
Bug: skia:4410
Change-Id: Ibd64e999520adc8cdef7803a492d3699995aef5a
Reviewed-on: https://skia-review.googlesource.com/19017
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
... and related tests/gms.
We now exercise the 4f impl with raster-pipeline/burst, no need for a
special test flag.
Change-Id: If67684d2d8840b3c413db9eeebb051f59cbc5a34
Reviewed-on: https://skia-review.googlesource.com/19025
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Cause DeferredTextureImageData functionality to support low bit depth
(4444, 565) image formats (with dithering).
Bug: 720105
Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791
Reviewed-on: https://skia-review.googlesource.com/18945
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
SkCodec sets fRequiredFrame to be the earliest possible frame that a
given frame can depend on. e.g.
- Frame A fills the screen, Keep
- Frame B does not cover A, Keep
- Frame C covers B but not A, and is opaque
Frame C can depend on either A or B. SkCodec already reports that C
depends on A. This CL allows a client of SkCodec to use either A or
B to create C.
Also expose the DisposalMethod. Since any frame between A and C can
be used to create C except for DisposePrevious frames, the client
needs to be able to know the disposal method so they do not try to
use such a frame to create C.
Further, the disposal method can be used to give the client a better
idea whether they will continue to need a frame. (e.g. if frame i is
DisposePrevious and depends on i-1, the client may not want to steal
i-1 to create i, since i+1 may also depend on i-1.)
TODO: Share code for decoding prior frames between GIF and WEBP
Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6
Reviewed-on: https://skia-review.googlesource.com/13722
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
The stroke-to-rect test was accidentally doing both non-aa draws and
non-filtered texture sampling on exact half pixel boundaries. So
sometimes the CPU and GPU rounded in different directions. This CL
updates the draws and sampling to fall on integer boundaries.
Bug: skia:5522
Change-Id: If968bcbb327106eba8919e4abf3a7211c5326daf
Reviewed-on: https://skia-review.googlesource.com/18960
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The versions of showmiplevel that take both a width and height, round the
coords of draws to integers. The basic version did not do this which caused
sampling bugs on adreno when using nearest neighbor at half pixel coords.
Since this GM isn't testing the GPU rendering of the mips, this workaround is
okay.
Bug: skia:5905
Change-Id: I4080532e8c1f37d74c60089970c5d0fc83cd5373
Reviewed-on: https://skia-review.googlesource.com/18939
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Due to floating point inaccuracy, when intersecting edges, the
intersection point may fall above one of the edges' top vertices
or below one of the bottom vertices. In these cases, we were simply
splitting one edge on the relevant endpoint of the other edge. This
is incorrect if the intersection is far from the endpoint (e.g.,
the test case in the linked bug, where one of the intersected edges
is near-horizontal but the intersection falls below both of its
endpoints, in the middle of the edge.)
The correct solution is to split both edges as normal, and take care
to produce edges with the correct ordering where the intersection is
above or below an edge. However, since the new vertex may be above
the current vertex, simply restarting intersection checks at the
current vertex won't work. We need to process the intersection
vertex before the current one.
This introduces another problem: unlike all other splitting modes
(which always shorten edges), splitting an edge above the top or
below the bottom can lengthen it, causing it to violate the AEL
with an adjacent edge which then shortens it back to the original
point (in cleanup_active_edges()). Since the splitting and merging
code can't agree, we loop forever.
Instead of simply fusing neighboring edges in cleanup_active_edges(),
the proper fix to this problem is to detect the AEL violation and
rewind all processing to the vertex above it. For performance, we
only rewind when we detect that a split edge is no longer ordered
within the mesh (merge_enclosing_edges()) or within the the AEL
(rewind_if_necessary()). We also store the enclosing edges of each
vertex, which allows us to rewind quickly, since we know exactly which
edges need to be added/removed from the AEL.
cleanup_active_edges(), fix_active_state() and Vertex::fProcessed have
been removed. In their place are rewind_active_edges() and
rewind_if_necessary(), which uses the same logic as
cleanup_active_edges() but uses it to know when to rewind.
Bug: skia:5026
Change-Id: I3638a429f5428498d6df6bb7b98c67374dc291aa
Reviewed-on: https://skia-review.googlesource.com/18900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This should be immediately useful in the Skia-Android
rendering pipeline.
Possible future uses include creating a "renderable"
SkImage from a bitmap with a funny color space.
Inspired by:
https://skia-review.googlesource.com/c/13981/
Bug: b/62347704
Change-Id: I388c7af1fc43834b8ad22022d0caf3ac90b734c8
Reviewed-on: https://skia-review.googlesource.com/18598
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Trying to track down why the Galaxy S6 sometimes claims that every pixel
is different, even though the zoomed images look identical. It's helpful
to draw what's actually being diffed.
Bug: skia:6653
Change-Id: Ia577aa70ed11d806fa204eaffdef41e6a65a60f2
Reviewed-on: https://skia-review.googlesource.com/18623
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field.
Change-Id: Ib0176c78e500e6b5130310934253a75860245812
Reviewed-on: https://skia-review.googlesource.com/18482
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This one produces noticeable differences if we fail to dither.
Bug:720105
Change-Id: I208d0c8147f4cca1b484f2f55edc09ce1bef2dcb
Reviewed-on: https://skia-review.googlesource.com/18036
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: I02fd77796880b42ce55549a8340b116e1c5f19d6
Reviewed-on: https://skia-review.googlesource.com/18305
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Introduce a private base class (SkShaderBase), to hide
implementation details from the public interface (SkShader).
Change-Id: Ib1d76cde880bd51868b97408710f8bb38128e536
Reviewed-on: https://skia-review.googlesource.com/17925
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Introduce a private base class (SkShaderBase), to hide
implementation details from the public interface (SkShader).
Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176
Reviewed-on: https://skia-review.googlesource.com/17241
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:6655
Change-Id: I1431fb5bcf955dd32c15dad9d24a6a7a7aa626f0
Reviewed-on: https://skia-review.googlesource.com/17788
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: I79d0b0707b09a3eedeeaee940d6dafbbbdbe2fe2
Reviewed-on: https://skia-review.googlesource.com/17707
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I84b94a19c724e2152d1eac269f425f7f0f2286f5
Reviewed-on: https://skia-review.googlesource.com/17706
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:
Change-Id: I5626e4e4277255b1c0c10f912829ac2cd2ed1a8c
Reviewed-on: https://skia-review.googlesource.com/17600
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I1f80931513f7d2268b358fb38c86dd331f32f064
Reviewed-on: https://skia-review.googlesource.com/17394
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit ee26363aaa.
Reason for revert: Failing Google 3 roll.
Original change's description:
> Remove compressed (ETC1) texture support from Ganesh
>
> Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
> Reviewed-on: https://skia-review.googlesource.com/17456
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ie1a57187287e03600a69e374501478e93c41415c
Reviewed-on: https://skia-review.googlesource.com/17527
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 0b58ef7b52.
Reason for revert: Wasn't actually fixed.
Original change's description:
> Revert "Disable resource cache in shadow_utils GM for now"
>
> This reverts commit c34a946d5a.
>
> Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/.
>
> Original change's description:
> > Disable resource cache in shadow_utils GM for now
> >
> > This should make the GMs more stable in tiled mode.
> >
> > Change-Id: I72996b1305fc99e60626af35267952d0a5c38624
> > Reviewed-on: https://skia-review.googlesource.com/17275
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> >
>
> TBR=jvanverth@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583
> Reviewed-on: https://skia-review.googlesource.com/17304
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: If606795bfeb4e6ed78f199fcb86ee2767bde5216
Reviewed-on: https://skia-review.googlesource.com/17371
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Move the shader impl to a private class, leave SkPerlinNoiseShader as
a factory class only (similar to e.g. SkLightingShader).
Change-Id: Ic1180db8f5dfd3d8f6fba133c6bf6bbdfa4f97a4
Reviewed-on: https://skia-review.googlesource.com/17318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This reverts commit c34a946d5a.
Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/.
Original change's description:
> Disable resource cache in shadow_utils GM for now
>
> This should make the GMs more stable in tiled mode.
>
> Change-Id: I72996b1305fc99e60626af35267952d0a5c38624
> Reviewed-on: https://skia-review.googlesource.com/17275
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
TBR=jvanverth@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583
Reviewed-on: https://skia-review.googlesource.com/17304
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This should make the GMs more stable in tiled mode.
Change-Id: I72996b1305fc99e60626af35267952d0a5c38624
Reviewed-on: https://skia-review.googlesource.com/17275
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This demonstrates a new kind of hybrid unit test/GM.
It creates a grid of cells. In each cell, we do two
renders that are expected to produce the same result.
For each cell, we render the two results overlaid,
and highlight any differing pixels in red. Assuming
there is a diff, the area around the largest diff
is drawn zoomed in from both images.
Matching cells are outlined in green, failing cells
are outlined in red. Triaging this GM just involves
answering the question: "Are there any red boxes?"
"Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
"Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png
To get more tests to pass, (and fix an assert
in Ganesh), I've gone ahead and enforced that user
supplied rects (in drawRect and drawOval) are
always sorted once they hit the canvas virtuals.
Currently, drawArc rejects empty ovals, but I added
the same assert to onDrawArc, if we decide to change
the strategy there.
Re-land of: https://skia-review.googlesource.com/c/16983/
Bug: skia:
Change-Id: I48f85de5f2bcb7fdc9558c2fd80cb1f20800b244
Reviewed-on: https://skia-review.googlesource.com/17270
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 78d1b428a8.
Reason for revert: break preabandongpu bot
Original change's description:
> Add GM to verify that drawX == (path.addX, drawPath)
>
> This demonstrates a new kind of hybrid unit test/GM.
> It creates a grid of cells. In each cell, we do two
> renders that are expected to produce the same result.
> For each cell, we render the two results overlaid,
> and highlight any differing pixels in red. Assuming
> there is a diff, the area around the largest diff
> is drawn zoomed in from both images.
>
> Matching cells are outlined in green, failing cells
> are outlined in red. Triaging this GM just involves
> answering the question: "Are there any red boxes?"
>
> "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
> "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png
>
> To get more tests to pass, (and fix an assert
> in Ganesh), I've gone ahead and enforced that user
> supplied rects (in drawRect and drawOval) are
> always sorted once they hit the canvas virtuals.
> Currently, drawArc rejects empty ovals, but I added
> the same assert to onDrawArc, if we decide to change
> the strategy there.
>
> Bug: skia:
> Change-Id: I021a18c85e234298e1d29f333662683d996dd42c
> Reviewed-on: https://skia-review.googlesource.com/16983
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: skia:
Change-Id: Id1ead4e22115c49cad5d0adb6151ede81734b4d3
Reviewed-on: https://skia-review.googlesource.com/17269
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This demonstrates a new kind of hybrid unit test/GM.
It creates a grid of cells. In each cell, we do two
renders that are expected to produce the same result.
For each cell, we render the two results overlaid,
and highlight any differing pixels in red. Assuming
there is a diff, the area around the largest diff
is drawn zoomed in from both images.
Matching cells are outlined in green, failing cells
are outlined in red. Triaging this GM just involves
answering the question: "Are there any red boxes?"
"Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
"Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png
To get more tests to pass, (and fix an assert
in Ganesh), I've gone ahead and enforced that user
supplied rects (in drawRect and drawOval) are
always sorted once they hit the canvas virtuals.
Currently, drawArc rejects empty ovals, but I added
the same assert to onDrawArc, if we decide to change
the strategy there.
Bug: skia:
Change-Id: I021a18c85e234298e1d29f333662683d996dd42c
Reviewed-on: https://skia-review.googlesource.com/16983
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: Icddc82a095aa698bdba9004641acdc411392632f
Reviewed-on: https://skia-review.googlesource.com/17044
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Realized that a pending CL needed to add (yet another) private type to SkRecords.h, but w/o this CL I'd be forced to move that header also into private. This change frees us up to not have transitive exposure for types that need to be recorded.
Bug: skia:
Change-Id: Id79f1c2e44ba85e063c1360cf96c92de6397ca2b
Reviewed-on: https://skia-review.googlesource.com/17031
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Dither can bump color values above alpha (duh), or below
zero (duh), so clamp back to premul after dithering.
BUG=skia:6644,skia:6643
Change-Id: Ida107e866380e06130af0d01467117bca929ba44
Reviewed-on: https://skia-review.googlesource.com/17070
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
rcp(rsqrt(x)) doesn't have enough precision when x is a coordinate.
(It's fine when x is a color, like in the softlight blend mode.)
Adds a GM to test this. It used to look quite ugly.
Change-Id: Icec295c2e2f50ae7a5e3e33c62270f632a58f65c
Reviewed-on: https://skia-review.googlesource.com/16914
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Classifies fully visible opaque shadows differently
than transparent to avoid cache collisions.
Change-Id: Iba5aab2b2cbe08f70205c343e86fe92b0cab7497
Reviewed-on: https://skia-review.googlesource.com/16858
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This is fairly aggressive in that it will break any client
that is currently using SkImageGenerator with kIndex8.
I'm guessing that we don't have any clients doing that.
Bug: skia:6620
Change-Id: Ifd16f5232bb3a9f759c225315c57492d917ed9ca
Reviewed-on: https://skia-review.googlesource.com/16601
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I70a927261b6530d2352d8d5a713b309aa518e6b0
Reviewed-on: https://skia-review.googlesource.com/16545
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:
Change-Id: I116bec82783d297e91ef061217b5e61f7ff16a76
Reviewed-on: https://skia-review.googlesource.com/16371
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Like three gray with alpha blends and taking the max alpha.
Change-Id: I104c84f784979030744127f8f66905ad9d1bdf0e
Reviewed-on: https://skia-review.googlesource.com/15898
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This adds perspective to GrNewNonAAFillRectOp, renames it to GrNonAAFillRectOp, and deletes the previous version of that namespace.
Change-Id: I20f35bf019f9c9105e6ec83dda11328451138109
Reviewed-on: https://skia-review.googlesource.com/15634
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.
Re-land of https://skia-review.googlesource.com/c/14180/
Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This instructs us on how to encode jpegs when the src
image has alpha. The original behavior is to ignore
the alpha channel. This CL adds the option to blend
the pixels onto opaque black.
Note that kBlendOnBlack and kIgnore are identical
unless the input alpha type is kUnpremul.
Bug: 713862
Bug: skia:1501
Change-Id: I4891c70bb0ccd83f7974c359bd40a2143b5c49ac
Reviewed-on: https://skia-review.googlesource.com/15817
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>