Rather than showing a generic `assert(!fErrorCount)` message, this will
put the actual error message in the IDE error log.
Example: http://screen/7hPTTFronJV3ssb
Change-Id: Ic05f354281275d2aca3e006035b01efae29302e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323098
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I308dda52c259e1a23d14395d9a632fe2eafab19f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323016
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Identical to https://skia-review.googlesource.com/c/skia/+/286070.
Bug: skia:10165
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-arm-Debug-Chromebook_GLES;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Release-All-TSAN,Build-Debian10-Clang-arm64-Debug-Android_ASAN
Change-Id: I0ec9d5f6875768e665f444e1ada211d3da537678
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322976
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Adds a new helper that creates a GrBackendRenderTarget using
GrGpu and then wraps it in a SkSurface. Uses the SkSurface
release proc to delete the BERT using GrGpu.
Upgrades GrGpu::createTestingOnlyBackendRenderTarget to create MSAA
buffers.
Updates many tests/tool to call sites to use the helper instead of
SkSurface::MakeFromBackendTextureAsRenderTarget.
Adds syncToCpu bool to SkSurface:: and GrContext::flushAndSubmit.
Bug: skia:9832
Change-Id: I73a8f0ce09dc6523729af0814464c6b6657fda06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293683
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This fixes includes like <cxxabi.h> in Android ASAN builds.
Bug: skia:10165
Change-Id: Ieeff45b29cd527dd0a60ed21422378f5aa610cc7
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-arm64-Debug-Android_ASAN,Build-Debian10-Clang-arm-Debug-Android_ASAN
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322906
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Added a flag to switch from using the memory pool to
using new and delete for GrOp allocation.
Just add the following to your gn args.
extra_cflags = [
"-DGR_OP_ALLOCATE_USE_NEW",
]
Change-Id: Icea4a6df047cff2cd5e50032f0bd4b714a5740d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322625
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
When flattening we always flatten to kTopLeft.
Rename some origin params to SkImage factories to make it clearer
that they refer to input texture origins.
Only preserve the origin in the variants that immediately flatten
to RGBA as part of contract (make SkImage_Gpu not SkImage_GpuYUVA).
Bug: skia:10632
Change-Id: I0ed9d693758086c4050f983b579d0d77daefc3d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322486
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This starts pulling apart draw_shape_with_mask_filter so we can
share HW-generated blur masks with DDL recording threads.
Change-Id: I2ff3ed8557e979dce342f4dd0156112d47f8a6a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322479
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This should be it. Caught up with 0.18.0
Change-Id: Ibe846d756601e42e315ab510807abd4bbd9cf30d
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322323
Reviewed-by: Kevin Lubick <kjlubick@google.com>
The docs on the C++ side are not complete in some areas, so
these docs are incomplete as well.
Bug: skia:10717
Change-Id: I1cbb559ab5c8b3973686b85f420ccd9752eaa24d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322321
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This moves the type juggling to the callers, but means that we don't
have to allocate a second vector in the constructor and copy things
over.
Change-Id: If017a7d6fe4eaa678679b1506f6c0c241d72a381
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322626
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
hash_fn was the only missing piece. I tried to avoid the duplicated code
(eg, by compiling SkOpts.cpp in skslc), but that triggers a chain of
dependencies that was hard to break. (SkColor, SkImageInfo, ...).
Change-Id: Iddf4291b4038c95930ef512328a0e9e67efe3944
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322493
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I4d71b1cab2812b43de61cf066568e15c05f9dc24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322439
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This lets more matrix types pre-convert rects and rrects to device space.
Since the clip geometry isn't itself shaded, we can apply the matrix
without worrying about preserving local vs. device coordinates.
Bug: skia:10730
Change-Id: I61ae3e13eec66f0e5eb83a6504dcb8004620b151
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320222
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
go/skiastyle: "Externed functions or static class functions are camel-
capped with an initial cap."
Change-Id: Id86de2b8477eaee2319effad7319061982e78957
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322476
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
We had an #ifdef DEBUG (rather than the intended SK_DEBUG) which was
never actually compiled due to DEBUG not being defined. Apparently G3
defines DEBUG, and this code started failing.
Change-Id: I4c3695440ddae91c90605f742791eabc51b2fe6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322616
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This is a reland of c1916c34fe
As it turns out, benches are not always given a canvas.
Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I61a2ac058fafc99653e3304876cf4b97350dac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322490
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This takes the "one pass" code path more often, using less memory, as it
does not have to allocate an intermediate width*height pixel buffer.
Wuffs v0.2 did not support SRC_OVER, only SRC, but Wuffs v0.3 does.
The gif-transparent-index.gif test file comes from the
test/data/artificial directory of the github.com/google/wuffs
repository. It was programmatically generated.
The new GifTest.cpp test passes with skia_use_wuffs true or false, with
or without the SkWuffsCodec.cpp change.
Change-Id: I46fb4c849319fbefc39f331416a8b7d3836093ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320116
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This reverts commit 58384ad0a7.
Change-Id: I18fcf623675cd97224f99c048fd691b4799d2479
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This provides an overall ~5% speedup in sksl_medium and sksl_large.
http://screen/9d992SKbYf7DzhW
Change-Id: Ia006a0b6b9f5d3d4e5b2298c64c491a4e04464c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322436
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
These changes aren't on the critical path, so this doesn't lead to a
measurable speed boost, but this code does a bit less work in the
FunctionDeclaraction/UnresolvedFunction cases, and is flattened out a
bit for easier readability.
Change-Id: I105a1a0b1d02c9ec87f6f874437ddf1a53d9be0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322456
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
draw_shape_with_mask_filter needs to be pulled apart and refactored to
support sharing the result of HW-generated blur masks with DDL recording
threads.
Change-Id: I4b03d5f0cbdd0f12e9740889159d9e91d7f8a060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322397
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit c1916c34fe.
Reason for revert: Bots unhappy
Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com
Change-Id: I365d2b1d19241a90130bc1b59663651817966f63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322400
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
In the ongoing effort to remove the display globals from Skia, allow
their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
in a normal Skia build and remove all use from Skia code.
Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 2d403f203b.
Change-Id: Idbcf128f170d17c371221e57ef05a5dc5e306e3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321777
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Our code relies on std::unordered_map for storage of unordered data.
Unfortunately, while unordered_map is algorithmically quite efficient,
in many real-world scenarios--particularly with small amounts of data--
a simple vector with linear search runs rings around it.
This CL doubles the performance of `nanobench -m sksl_large`:
http://screen/7uGYGLCaTtaHU4j
Change-Id: Ia2f6cedfac338876c2da57642e9b34addd85b683
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322320
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
0.18.1 should add docs
0.19.0 should remove Sk prefix
Change-Id: I21ef6e0735186bffc215a5855d3d53f405bde0fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322318
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This adds docs or stubs for everything that is on the main CanvasKit
object.
Paragraph, Particles, and Skottie will be their own CLs.
Bug: skia:10717
Change-Id: I0f5027d73b2ac7d127f3a03a8f1aaa15f694ae38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321789
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Paragraph will be its own CL.
Bug: skia:10717
Change-Id: I5c0d0ff40b500ec8f8eb74e7a44402a9e9548f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321519
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This also includes matrices (which I'm reminded I want to test with
TypedArrays and make optional).
Bug: skia:10717
Change-Id: I0f6565a46b766c1f81c28dfc1229d403bff32e69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321118
Reviewed-by: Nathaniel Nifong <nifong@google.com>
This is the object with the most APIs by far.
Some APIs are stubbed out temporarily and will be given more
detail in a follow-up CL.
Bug: skia:10717
Change-Id: Iff5d4269303e7102ad79de90f20640918f403ff4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320770
Reviewed-by: Nathaniel Nifong <nifong@google.com>