On at least one machine, I've seen SetPixelFormat fail after Vulkan was
used to render to a window, preventing us from creating a GL context.
This is ham-fisted, but solves the problem.
Bug: skia:
Change-Id: I76d0cb26e181304846aa06109c1af768f8363a18
Reviewed-on: https://skia-review.googlesource.com/22740
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This was being triggered at viewer startup, while initalizing the slide
list (and then again when switching to the slide). Removing it
declutters startup, particularly if you're trying to debug raster
drawing code.
Bug: skia:
Change-Id: If21cdd10b0dbda74f4a845031ae3e33f7305a1d7
Reviewed-on: https://skia-review.googlesource.com/22742
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit beae8a9faa.
Clean revert of revert.
Change-Id: Ibb486bf3411ed347b560fc110a2cfbb0e0caa4f2
Reviewed-on: https://skia-review.googlesource.com/22730
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
For single-contour paths (MLZ), the close is ignored during iteration,
and we instead process the 'Done', which does extend in both directions.
But if there's a second contour (MLZM), then we process the 'Close', and
only extend the degenerate segment in one direction. Depending on where
the path was positioned (relative to pixel centers), this led to some
contours not drawing at all.
Bug: skia:
Change-Id: I88aeaecc94c0e69532479e50920ba2e0cc6f4bda
Reviewed-on: https://skia-review.googlesource.com/22520
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
A false return from adjustMatrixAndAppendStages() currently means we'll
attempt to create a legacy context wrapper stage.
Only two gradient impls can return false, and they don't really want the
same thing:
1) linear returns false when the stops are compressed, to get the "nice"
legacy blend color behavior
2) two-point radial returns false when it cannot map the center points
(degenerate matrix); in this case we prolly don't want to draw at all
This setup made sense while we were retrofitting gradients with stages,
but now that all of them support RP, it is confusing to sometimes get
a legacy context wrapper even when we are specifically asked for stages.
I propose we align the semantics with SkShader::onAppendStages(), such
that a false return means "don't draw" rather than "try to draw with a
legacy context".
This means we're giving up the compressed stop behavior for linear, but
that's such an arbitrary corner case that I don't think we care at all.
Change-Id: I01256c4acb81b16fb68e6c74cf8d91ea77b95a3b
Reviewed-on: https://skia-review.googlesource.com/22541
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Previously, suitableForAAA disabled Analytic AA for small rects.
But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects
(~800ns -> ~700ns measured by path_fill_small_rect nanobench).
Bug: skia:
Change-Id: I943f1c754669391f55e46471781fa65840629377
Reviewed-on: https://skia-review.googlesource.com/22205
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Change-Id: I7fd0739d7bae9176e816772b3aed54528c4fa576
Reviewed-on: https://skia-review.googlesource.com/21865
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Change-Id: I6205769ea77e12647985496a5c74d3754edd3108
Reviewed-on: https://skia-review.googlesource.com/22365
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This reverts commit d96ed9d0de.
Reason for revert: dm crashing
https://luci-milo.appspot.com/swarming/task/374d82c1d1263910/steps/symbolized_dm/0/stdout
Likely culprit:
unit test BlurDrawing
Stack trace:
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2440eb) [0x568770eb]
linux-gate.so.1(__kernel_sigreturn+0) [0xf7714ca0]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter11blurOneScanENS_10FilterInfoEPKhjS2_PhjS3_+0x236) [0x5766301e]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter4blurERK6SkMaskPS0_+0x285) [0x57663491]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN10SkBlurMask7BoxBlurEP6SkMaskRKS0_f11SkBlurStyle13SkBlurQualityP8SkIPointb+0x5c) [0x5720d48e]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl10filterMaskEP6SkMaskRKS0_RK8SkMatrixP8SkIPoint+0x67) [0x5720e427]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl17filterRectsToNineEPK6SkRectiRK8SkMatrixRK7SkIRectPN12SkMaskFilter9NinePatchE+0x579) [0x5721a247]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK12SkMaskFilter10filterPathERK6SkPathRK8SkMatrixRK12SkRasterClipP9SkBlitterN11SkStrokeRec9InitStyleE+0xf6) [0x5706c2bc]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw11drawDevPathERK6SkPathRK7SkPaintbP9SkBlitterb+0x1bb) [0x57034f1b]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixbbP9SkBlitter+0x47f) [0x57035dd3]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN14SkBitmapDevice8drawPathERK6SkPathRK7SkPaintPK8SkMatrixb+0x6e) [0x56f937fc]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas10onDrawPathERK6SkPathRK7SkPaint+0x39d) [0x56fb12e5]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas8drawPathERK6SkPathRK7SkPaint+0x18) [0x56fad926]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x3f71b3) [0x56a2a1b3]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2450bd) [0x568780bd]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2450fb) [0x568780fb]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xae53e7) [0x571183e7]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNKSt8functionIFvvEEclEv+0x20) [0x569f98de]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN12SkThreadPool4LoopEPv+0x298) [0x57045b2f]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xbbd92c) [0x571f092c]
/lib/i386-linux-gnu/libpthread.so.0(+0x627a) [0xf76e827a]
/lib/i386-linux-gnu/libc.so.6(clone+0x66) [0xf70ecb56]
Segmentation fault
Original change's description:
> Experimental blur code.
>
> This uses a new method of blurring that runs the three
> passes of the box filter in a single pass. This implementation
> currently only does 1x1 pixel at a time, but it should be simple
> to expand to 4x4 pixels at a time.
>
> On the blur_10_normal_high_quality benchmark, the new is 7% faster
> than the old code. For the blur_100.50_normal_high_quality
> benchmark, the new code is 11% slower.
>
> Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02
> Reviewed-on: https://skia-review.googlesource.com/21739
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=herb@google.com,reed@google.com
Change-Id: I9e896c548d0a4cd3308d6a311c8bd16719a08a85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22421
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This uses a new method of blurring that runs the three
passes of the box filter in a single pass. This implementation
currently only does 1x1 pixel at a time, but it should be simple
to expand to 4x4 pixels at a time.
On the blur_10_normal_high_quality benchmark, the new is 7% faster
than the old code. For the blur_100.50_normal_high_quality
benchmark, the new code is 11% slower.
Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02
Reviewed-on: https://skia-review.googlesource.com/21739
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
SkPathRef::Iter::next and several other bits of code depend on the first
verb of a path always being a move. Contructors and builders currently
enforce this, so the deserializer must do so also.
BUG=chromium:740789
Change-Id: Iad0f6fc6d2b2fe40064c674fa7dd1612c120bb8f
Reviewed-on: https://skia-review.googlesource.com/22216
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Remove #defines that lived in gn_to_bp.py and
android_framework_defines.gni. These have been moved into a new file
in Android, SkUserConfigManual.h, in https://googleplex-android-review.git.corp.google.com/#/c/2519600/
Update gn_to_bp.py to include SkUserConfigManual.h, so it will still
result in using the same #defines.
Lately, we've found it difficult to guard changes behind a flag. e.g.
a change to drawing causes a CTS failure in Android, so we have to do
the following:
- put the change behind a flag, and add it to gn_to_bp.py or
android_framework_defines.gni
- generate new images on Android (by running CTS with external/skia
modified to not define the flag)
- create a CL in CTS that uses the new images
- land a CL in Skia that stops defining the flag
- when the Skia change lands, wait for the auto-roller to create a CL
that includes the change, stop the auto-roller, add the topic to the CTS
CL so the two can land at the same time
- land both Android changes (with TreeHugger)
- restart the Android auto-roller
With SkUserConfigManual.h (which lives in Android), the process will
be similar to Chromium:
- land a CL in Android's external/skia that defines a flag e.g.
SK_SUPPORT_LEGACY_FEATURE. Land without TreeHugger because it isn't used
in Skia and does not do anything
- land a change in Skia that changes behavior unless
SK_SUPPORT_LEGACY_FEATURE is defined. This will safely go through the
Android roll and not change any behavior for Android
- create two Android CLs - one in CTS to use the new images, and one in
external/skia to delete SK_SUPPORT_LEGACY_FEATURE. Set them to the same
topic and land them with TreeHugger
In the new process, there is no need to mess with the Android roll.
A downside to the new process is that we cannot test the android
framework defines without checking in to Android. But given how much
we've progressed in automating Android testing, this is fine.
Bug: b/63429612
Change-Id: Idfbaef2f4cae641a75fb6e7bf70428733a441336
Reviewed-on: https://skia-review.googlesource.com/22072
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
If the bounds of the blob are empty, we will request a zero-sized surface
which will fail. Just check for that.
Only expect this if the typeface is empty (e.g. faked out for testing)
Bug: skia:
Change-Id: Idcac0e9d4e2a5fe68926a33250015609b5c7e365
Reviewed-on: https://skia-review.googlesource.com/22360
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
I am removing the builder entirely in 22072, but the CQ stops me.
Remove it from the CQ so we can then delete it.
Bug: b/63429612
Change-Id: I05381df71cb849bbbc02ef270388c48dcf088737
Reviewed-on: https://skia-review.googlesource.com/22219
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Serialize the new TileMode in SkBlurImageFilterImpl. And also update the
SkReadBuffer::Version and CURRENT_PICTURE_VERSION in SkPicture.
Bug: 622128
Change-Id: I3b04be2a36406227c6d8112e943d7415566c0c42
Reviewed-on: https://skia-review.googlesource.com/22079
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Also updates SDL to 2.0.5.
Change-Id: I3a3c8f69360fc20a3d543c19dcf82dd3f42f1309
Reviewed-on: https://skia-review.googlesource.com/22204
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@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>
A recent change up-stack tickled the cross context image test, exposing
this bug. I have no idea how it didn't manifest sooner. In that test,
we're takng a subset of a lazy image, which implements onGenerateTexture
via a surface copy. In this case, we were in legacy mode, but the
textures were all created with sRGB configs. In normal drawing, we
disable sRGB decode. For the copy draw, we were explicitly enabling sRGB
decode, but not setting the FB setting, so if it was still off (it was),
the image would get decoded but not re-encoded, coming out too dark.
Bug: skia:
Change-Id: I4a480b11315cc308ea016b7082aff17920764214
Reviewed-on: https://skia-review.googlesource.com/22211
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 7343c197fc.
The initial revert was because the random test factory was choosing msaa as the aatype when the render target was not msaa, triggering and assert.
Bug: skia:
Change-Id: I1bfec86492b69af1101c65d249140af804c16684
Reviewed-on: https://skia-review.googlesource.com/22203
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@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>
Blink attempts this optimization explicitly, but Skia seems like a
better home for it.
Change-Id: I2ecd8d0b4e91fbd9be6f89005319b2d9f04836ba
Reviewed-on: https://skia-review.googlesource.com/21821
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Let the pool handle the initial allocation on first use.
Change-Id: I77e0a84f19ccefa0c3bf298483929345787c0d7e
Reviewed-on: https://skia-review.googlesource.com/22078
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Also adds a test factory and fixes a bug in the lattice iter validator where it compared each div value against the start rather than the previous div.
Bug: skia:
Change-Id: I30e9ddfcbaab7829a2f646ad851f99d1e518ab4a
Reviewed-on: https://skia-review.googlesource.com/21871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Although this adds a new method to GrResourceProvider, it is a slight improvement in that it removes some GrProxy stuff from GrResourceProvider (which arguably should only deal in GrSurface-derived classes).
Bug: skia:
Change-Id: I6d097ed178cd2aa5662770a164135bf2553b80e6
Reviewed-on: https://skia-review.googlesource.com/22023
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 6d70274ccf.
Reason for revert: need rebaseline
Original change's description:
> Always enable Analytic AA for rects
>
> Previously, suitableForAAA disabled Analytic AA for small rects.
> But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects
> (~800ns -> ~700ns measured by path_fill_small_rect nanobench).
>
> Bug: skia:
> Change-Id: I1d8bf4c105d8d116ea441a46e6c955c546bcbb22
> Reviewed-on: https://skia-review.googlesource.com/22074
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
TBR=mtklein@chromium.org,herb@google.com,caryclark@google.com,liyuqian@google.com,reed@google.com
Change-Id: I87011bf7b8f30fa3be5d46287afbaf38c0be7da9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22140
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@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>
Bug: skia:
Change-Id: I959287780ef94a258a6746132f3acb9f90e6c6cc
Reviewed-on: https://skia-review.googlesource.com/21863
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Previously, suitableForAAA disabled Analytic AA for small rects.
But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects
(~800ns -> ~700ns measured by path_fill_small_rect nanobench).
Bug: skia:
Change-Id: I1d8bf4c105d8d116ea441a46e6c955c546bcbb22
Reviewed-on: https://skia-review.googlesource.com/22074
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>