Change-Id: If3e838f22f1b99fd7a3b1c6bca0affd39f5573b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449843
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
`removeprefix` was only added to Python in March 2020. It isn't
available on Python 3.8.2, which is the default macOS Python installed
version.
https://www.python.org/dev/peps/pep-0616/
Change-Id: I7b8db0dfc55f1448cc72f41ba9a6ad5f099d48ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448259
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We need to ensure all async reads are completed before we finish
encoding -- otherwise late reads will fire from the GrContext destructor
and crash because the encoder is no longer valid.
Change-Id: I0065561d2411ddd202897e625a187592e40ced87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447184
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Unblocks angle roller into skia that was triggering an assert in
EGLImageTest. In that test, there were two egl contexts created that
shared the same egl display. The child context was destroyed first,
and ANGLEGLContext's destroyGLContext() implementation always called
eglTerminate on the display. According to the egl spec you're not
supposed to do anything with the terminated display other than call
makeCurrent() to release any active context.
In this case, the child context's termination would cause the display
to be deferred until the parent context was destroyed. This triggered
a bug in ANGLE's D3D backend, leading to the assert. However, with
that fixed, we then trigger critical error messages about calling
eglDestroySurface, etc. in the parent context's destroyGLContext()
function since the display was terminated out from beneath it.
This change adds a rudimentary ownership tracking mechanism to the
ANGLEGLContext so that when a child context is cleaned up it won't
call eglTerminate on its display. This happens to avoid the bug in
ANGLE's D3D backend as well as silencing the critical warnings if it
were fixed.
Bug: skia:12413
Change-Id: I31f64189315a1921adbee204d11138272d4b40af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446182
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Also update RELEASE_NOTES to describe new syntax.
Change-Id: I2666551b98f80b61ae3a48c92a9e306cdc7242b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444735
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Bug: skia:11837
Change-Id: I3dde13940e57763d5a8224cb1a4b555e904351d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442716
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11837
Change-Id: Ie99b1c512885404351d6917bbea751d99a2ca23e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442797
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:8451 skia:10827
Change-Id: I5b38a1d72cd4558f8e2a92aaf9b12f05efce0923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442683
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
We'll switch to the correct context when necessary (e.g. before
calls that talk to the GPU). This is achieved by adding in
calls at the JS layer to switch the context before making a call
that is known to talk to the GPU (e.g. draw calls on SkCanvas).
Another implementation that was considered was to add a C++
shim in GrGLInterface that would switch the context before
every call in the GPU - however, that seemed too difficult
and would add extra overhead if a single draw* call talks
to the GPU multiple times.
Bug: skia:12255
Change-Id: I96e4c6b41a5bfcc9913aeaca7ccb125358048ad3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432136
Reviewed-by: Brian Salomon <bsalomon@google.com>
Support is added so we can differentiate between using discardable
msaa for normal msaa draws and using it for DMSAA. Before this
many asserts and checks throughout GrVk* assumed we could only have
discardable msaa if the actual render target was msaa.
After this change the only thing missing to enable DMSAA on Vulkan
is to fix GrProgramInfo to store the actual sample count the program
will use instead of the same count of the GrRenderTarget.
Change-Id: Ifdb9a3beb641f96f6dfebe3241ccc5a2c8770bb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441517
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:12302
Change-Id: I8cf958acf9214d0de903a4097647afd74f2a659e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441541
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of 0f7c10ef56
Original change's description:
> Add sRGB 8888 colortype
>
> A color type that linearizes just after loading, and re-encodes to sRGB
> just before storing, mimicking the GPU formats that work the same way.
>
> Notes:
> - No mipmap support
> - No SkPngEncoder support (HashAndEncode's .pngs are ok, though?)
> - Needs better testing
>
> This is a re-creation of reviews.skia.org/392990
>
> Change-Id: I4739c2280211e7176aae98ba0a8476a7fe5efa72
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438219
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I5b6bb28c4c1faa6c97fcad7552d12c331535714d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441402
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 0f7c10ef56.
Reason for revert: Unhappy rollers
Original change's description:
> Add sRGB 8888 colortype
>
> A color type that linearizes just after loading, and re-encodes to sRGB
> just before storing, mimicking the GPU formats that work the same way.
>
> Notes:
> - No mipmap support
> - No SkPngEncoder support (HashAndEncode's .pngs are ok, though?)
> - Needs better testing
>
> This is a re-creation of reviews.skia.org/392990
>
> Change-Id: I4739c2280211e7176aae98ba0a8476a7fe5efa72
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438219
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reed@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Ie199535b9b65ec7c7fef3c773452ea06bdbd2d9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441376
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
A color type that linearizes just after loading, and re-encodes to sRGB
just before storing, mimicking the GPU formats that work the same way.
Notes:
- No mipmap support
- No SkPngEncoder support (HashAndEncode's .pngs are ok, though?)
- Needs better testing
This is a re-creation of reviews.skia.org/392990
Change-Id: I4739c2280211e7176aae98ba0a8476a7fe5efa72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438219
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This CL just moves the files and renames them. It doesn't move them into the skgpu::v1 namespace.
Bug: skia:11837
Change-Id: Iab322d0dc5b5d1cfd32436785081539dc85c18d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440776
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Having this enum on GrTessellationPathRenderer forced it to be over-#included and was blocking making GrTessellationPathRenderer.h v1-only.
Bug: skia:11837
Change-Id: I80660ed659946d7aa555057c9f4fd1136b44cca0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440536
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This centralizes the new color-space parsing into SkCommandLineConfig,
and then wires that up in DM, nanobench, and skpbench. It also removes
all of the old config names that encoded both color type and space.
Change-Id: I9a63a97f1d153e7636a1fb974cc4071f5ada3184
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438377
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is patterned after http://review.skia.org/439776, but uses the
`six` library for Python 2/3 cross-compatibility.
Change-Id: If64c48c35d86b83c77316bb5536be6e7bd24c967
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439936
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This reverts commit bd40fb55bb.
Reason for revert: I give up.
Original change's description:
> Update rewrite_includes.py for python3
>
> Change-Id: Ib1b6f8c17554f8121bd2351b5b214e1b2a79f758
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439776
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=kjlubick@google.com,brianosman@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: I6be08249f805cce00d35e28e457fe5628b447629
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ib1b6f8c17554f8121bd2351b5b214e1b2a79f758
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439776
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These changes will allow us to enable shadowed-variable warnings.
Change-Id: I24ee7e198c1c77b58836237c37557c00452680e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit d90777ada3.
Reason for revert: relanding with fix to GrBackendTexture
Original change's description:
> Revert "Remove GrBackendFormat's textureType use from isFormatTexturable call."
>
> This reverts commit 832c817bc8.
>
> Reason for revert: uninitialized value in GrBackendTexture
>
> Original change's description:
> > Remove GrBackendFormat's textureType use from isFormatTexturable call.
> >
> > The goal of this change was to remove the use of GrBackendFormat::textureType()
> > from GrCaps::isFormatTexturable call. Instead we will always pass in a
> > GrTextureType into this call.
> >
> > To do this a lot of plumbing of GrTextureType was added to various call
> > sites. However, this CL halts the plubming up at the proxy level where we
> > get it from the GrBackendFormat still. Future CLs will continue removing
> > these call sites and others that use GrBackendFormat::textureType().
> >
> > Bug: skia:12342
> > Change-Id: Ic0f02b9c7f7402405623b8aa31aa32a9a7c22297
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439277
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
>
> Change-Id: I354bbbf00be7a86c480009f3e7b36a8777a6bf3a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:12342
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439338
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
# Not skipping CQ checks because this is a reland.
Bug: skia:12342
Change-Id: I151196f149f9e191d2975b8fe81334f4f8720744
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439339
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
I will follow up with a CL actually moving the newly V1-only files to their final homes and adding namespaces.
Bug: skia:11837
Change-Id: I0fed1a802ae93a4357c53cde2b665ad6ddb49a6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418996
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 832c817bc8.
Reason for revert: uninitialized value in GrBackendTexture
Original change's description:
> Remove GrBackendFormat's textureType use from isFormatTexturable call.
>
> The goal of this change was to remove the use of GrBackendFormat::textureType()
> from GrCaps::isFormatTexturable call. Instead we will always pass in a
> GrTextureType into this call.
>
> To do this a lot of plumbing of GrTextureType was added to various call
> sites. However, this CL halts the plubming up at the proxy level where we
> get it from the GrBackendFormat still. Future CLs will continue removing
> these call sites and others that use GrBackendFormat::textureType().
>
> Bug: skia:12342
> Change-Id: Ic0f02b9c7f7402405623b8aa31aa32a9a7c22297
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439277
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: I354bbbf00be7a86c480009f3e7b36a8777a6bf3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439338
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
The goal of this change was to remove the use of GrBackendFormat::textureType()
from GrCaps::isFormatTexturable call. Instead we will always pass in a
GrTextureType into this call.
To do this a lot of plumbing of GrTextureType was added to various call
sites. However, this CL halts the plubming up at the proxy level where we
get it from the GrBackendFormat still. Future CLs will continue removing
these call sites and others that use GrBackendFormat::textureType().
Bug: skia:12342
Change-Id: Ic0f02b9c7f7402405623b8aa31aa32a9a7c22297
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439277
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Basically, ensure all the headers about to become V1-only only appear in contexts that are currently or will soon be V1-only.
This is almost all fallout from retracting some of the moving headers from other headers i.e.:
GrMeshDrawOp.h from GrOpFlushState.h
GrDrawOp.h from GrOpsRenderPass.h
GrDrawOp.h from GrOpsTask.h
GrSimpleMeshDrawOpHelper.h from GrTessellationShader.h
Bug: skia:11837
Change-Id: I939f5c82c3042e9ab00571b5796ab82dbe968085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438677
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is needed so we can support VK_EXT_image_drm_format_modifier. These
headers are just used internally in Skia so this should have no effect
on anyone using Skia.
Bug: skia:12336
Change-Id: I502f8e7dbbeb8e48ff03fb7ef0e5db3e8bcbb40d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438737
Reviewed-by: Brian Salomon <bsalomon@google.com>
Move ProgramImpl function definitions into Processor subclass cpp files.
Delete separate h/cpp files.
Modify GrGLSLVaryingHandler::addPassThroughAttribute to break #include
cycle. It now takes a ShaderVar rather than a GP::Attribute, making
it slightly more flexible as the input can be any variable defined
in the vertex shader.
Bug: skia:11358
Change-Id: I94ee8cd44d29e194216592ecae5fd28de785c975
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438596
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Named "Impl" and nested in GP or makeProgramImpl definition.
Remove unused INHERITED typedefs.
Remove GenKey pattern.
Bug: skia:11358
Change-Id: Icb4d5a0844184f51d92135de6cee6f6e77f57a5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438478
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
(Turtle.cpp is #included from a cpp in the tools directory.)
Change-Id: I1685086ec0ceae1d51efa7daa0f46137b535ce77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438476
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The skdiff code leaks some file names. Instead of augmenting the
existing manual ownership, give everything an owner.
Change-Id: I8bc2cb39ad4176bb3be645710ae28271f5b12ff9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437000
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Almost entirely mechanical.
Bug: skia:11837
Change-Id: I984339097fdeeae2eccb6c1d790d510020511961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438177
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is necessary cleanup before changing the type of the matrix and
clip stack. That work has landed and reverted several times, so landing
this piece separately, first.
Change-Id: I147e4cc4260fa5e07a0712503f879da120f8466a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435278
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
return from GrGP by unique_ptr, rename factory function to
makeProgramImpl()
Bug: skia:11358
Change-Id: I61dd36f770d2fc0b54de0e0e7b78ac4d3fbd119a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437741
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
I noticed Viewer lagging significantly when interacting with certain
sliders (such as transform state). It turns out that the UI tracking
would trigger calling Window::setRequestedDisplayParams and that in
turn can trigger a full context recreation, depending on backend.
I'd recently changed GPUs in my machine and apparently its context
creation is substantially slower than my previous one. Historically
I noticed minor jank when interacting, but it was never a deal
breaker.
This splits the parameter tracking into two categories so that lighter
weight widgets can still trigger window invalidation / re-rendering,
without triggering the context creation.
Change-Id: I3eb4c15b802f8b8ea8d8eca386de5dcee22ba9ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/437685
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11358
Change-Id: Ie70e45b18c12126c8e86700ad1040bc319be385a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436998
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:10209
Change-Id: I72639b7e768742dcdec810a5a714ce21ff0f6e0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: I0e093fd35b11e9a765ef9c09f3b6346086ff66bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435983
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Fix a number of warnings as errors about unused private methods when
skia_use_gl is set to false and SK_GL is not set.
Change-Id: Idcc08a1434ec11a6ce9c8df034c9fa472bf08d08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436822
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The SkClipOpPriv.h header will be going away soon, but a number of
places still use its kIntersect_SkClipOp definitions instead of the
equivalent SkClipOp::kIntersect. Besides updating these references,
a number of unnecessary includes to SkClipOpPriv.h are removed and
some test cases exercising expanding clip ops are deleted since they
will be unnecessary shortly.
Bug: skia:10208
Change-Id: I2bbdd6bb39869134c6a80ef2b4482e6cabdeb0b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436157
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:11837
Change-Id: I60112e370c95e6f9d9bc12cb9b05d40dd2220bc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435279
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
In the new GrSurfaceContext class hierarchy we can get either a v1 or v2 SFC/SDC depending on the context options setting.
Bug: skia:11837
Change-Id: Ia25bc10b58bbbaf65a484b323d9d0eee471bb7ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435276
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Now that we support sampling from an SkBlender inside a Runtime Effect,
we can leverage that to reuse the blends from SkBlender::Mode. This lets
us avoid hard-coding copies of every built-in blend function.
Change-Id: I51f380490611fbde943c16648999b4fd4e6a14a9
Bug: skia:12257, skia:12085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434472
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit cc9d20f308.
Reason for revert: Wrong API pre-C++17
Original change's description:
> SkCanvas: switch from SkDeque to std::deque
>
> Bug: skia:10987
> Change-Id: If252f644dc3b8827356f9c7044c8e01fd0fc5afe
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434676
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,reed@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com
Change-Id: Ica125d5ad04332d68f54dd544373fa29eaf2b69c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434856
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:10987
Change-Id: If252f644dc3b8827356f9c7044c8e01fd0fc5afe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434676
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This CL is mostly mechanical. It:
replaces "src/gpu/GrSurfaceDrawContext.h" #includes with
"src/gpu/v1/SurfaceDrawContext_v1.h" and reorders
replaces "class GrSurfaceDrawContext;" with
"namespace skgpu { namespace v1 { class SurfaceDrawContext; }}"
replaces "GrSurfaceDrawContext*" with "auto" where possible
replaces "rtc" with "sdc"
replaces "surfaceDrawContext" with "sdc"
replaces GrSurfaceDrawContext with skgpu::v1::SurfaceDrawContext
reflows parameters as needed
This CL does not try to:
make skgpu::v1::SurfaceDrawContext V1-only
minimize the skgpu and/or skgpu::v1 prefixes
Those two tasks will be accomplished in follow up CLs. This CL is just trying to get the bulk of the mechanical changes comprehensibly landed.
Bug: skia:11837
Change-Id: I6fe59080249d585df8f5d27c6b67569cdc35842f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433156
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Since:
https://skia-review.googlesource.com/c/skia/+/431539 (Feed all top-level GPU accessors through skgpu::BaseDevice (take 2))
The OveridePaintFilterCanvas now blocks access to the true SurfaceDrawContext that backs the top device of a GPU-backed SkCanvas. This is because the SkPaintFilterCanvas doesn't pass on SkCanvas::topDevice calls to the canvas it is wrapping so it always returns a SkNoPixelsDevice.
Given that accessing the top SDC is an incredibly specialized testing-only feature this CL keeps the feature working short-term w/o gumming up the public API.
Change-Id: I99012ba34c2800e0149251667156b412c4e8aa63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433362
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Creates a new path renderer, GrAtlasPathRenderer, that handles all the
atlasing. Managing the atlas in its own path renderer gives us more
control over when atlasing happens in the chain, will allow us to more
easily use the atlas in kCoverage mode, and makes the clipping code
cleaner.
Bug: skia:12258
Change-Id: Ie0b669974936c23895c8ab794e2d97206ed140f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431896
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
AndroidFramework uses both their own custom display list (which could
handle resetClip with android-side changes) AND conventional picture
recording. In order for replace op emulation to work when they have
been recorded into a picture, we need to make it virtual and supported
in SkPicture.
This also renames the API to ResetClip() from ReplaceClip() and does not
have any additional arguments. Based on AF's usage pattern, it only n
needs to reset the clip to the surface bounds or the device clip
restriction, it seems best to reduce the API as much as possible before
it's adopted.
Bug: skia:10209
Change-Id: I37adb097c84a642f4254b8c0f9d4c7fea8d9abdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430897
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of 202ce887ec
Original change's description:
> Prefer the NV_framebuffer_blit extension over ANGLE
>
> The ANGLE/CHROMIUM glBlitFramebuffer requires full size blits, which
> is really bad for DMSAA. The NV extension does allow blits of
> sub-rectangles, so we prefer that one if it's available.
>
> Bug: skia:12176
> Bug: skia:12177
> Bug: skia:12234
> Bug: skia:12235
> Change-Id: I463ac631fff64ad564f294cf2f26be7410e8c356
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430576
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:12176
Bug: skia:12177
Bug: skia:12234
Bug: skia:12235
Change-Id: I41d062f9894f5a81c78a37de27a288bc17812643
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431817
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 202ce887ec.
Reason for revert: Need to update Chrome first to give us the NV one.
Original change's description:
> Prefer the NV_framebuffer_blit extension over ANGLE
>
> The ANGLE/CHROMIUM glBlitFramebuffer requires full size blits, which
> is really bad for DMSAA. The NV extension does allow blits of
> sub-rectangles, so we prefer that one if it's available.
>
> Bug: skia:12176
> Bug: skia:12177
> Bug: skia:12234
> Bug: skia:12235
> Change-Id: I463ac631fff64ad564f294cf2f26be7410e8c356
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430576
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:12176
Bug: skia:12177
Bug: skia:12234
Bug: skia:12235
Change-Id: Iaa9f82e1c0c935a67dd8f446d1513b2b0a98f725
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430819
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The ANGLE/CHROMIUM glBlitFramebuffer requires full size blits, which
is really bad for DMSAA. The NV extension does allow blits of
sub-rectangles, so we prefer that one if it's available.
Bug: skia:12176
Bug: skia:12177
Bug: skia:12234
Bug: skia:12235
Change-Id: I463ac631fff64ad564f294cf2f26be7410e8c356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430576
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
All JS strings are now single-quoted, so double-quotes don't need
escaping. There are some symbols (in fullsymbols mode) that contain
single quotes, though - so escape those instead.
Change-Id: Ibdcca5634413c6a5e292f81503fbbf89f3d52b0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430040
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Pull a thread, and end up removing logs of old fontmgr code.
Change-Id: I73cebf9c011a99e9d12fd728e8677fcb0700407f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429338
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: chromium:1220246
Change-Id: I0e9db2e403455ccc5d75acc714aa8201db285afc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429678
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
In a perfect world, this should always render the same, just perhaps a
bit more slowly.
Change-Id: I750ad43142d4d192be4db7396989d978025179a8
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429101
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>
There is so much more that could be done here (some ideas in TODO
comments), but this greatly streamlines the process for average
developers to navigate the code-size of skia executables.
Currently, I'm using a locally built copy of bloaty, but we should see
about using DEPS or adding a fetch-able package to eliminate even more
friction.
Change-Id: I92186c0370a1ab8d2c8edd73932547402c43612d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428959
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This will help us write tests confirming that runtime blends work the
same as the built-in blends.
Change-Id: I2f94aa7bbbc7124d09b490fc7509a4c281025307
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427618
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
onCreateProgramInfo needs to know if DMSAA will be rendering to a
separate MSAA target in order to properly set up its pipeline and
shaders. This CL mostly just plumbs this unformation through, but also
cleans up FillRRectOp now that this information is available.
Bug: skia:12201
Change-Id: I7300d2725da72484a12bd0c9d3ad298ae81bff90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427577
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This CL has some rough edges since some classes that use it (e.g., GrOpsTask) aren't yet V1-only. That said, the big CL has to be broken up somehow.
Bug: skia:11837
Change-Id: I41ed9982ca4664f893e447ba23c7aec59f42c964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426416
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL:
finishes off some renaming I missed earlier
removes some extraneous #includes from headers
TBR=bsalomon@google.com
Bug: skia:11837
Change-Id: If7163435a44d4067dac041a7f9e68b1ad63432d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426037
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Making GrDrawRandomOp and test_ops V1-only drags several GMs and tests with them. All the other GMs/tests explicitly require Ops.
Bug: skia:11837
Change-Id: I45c0a1054c3b1ec43f509595c6492581d10314cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Id2061ebe7873aa8b9480a2d8b0133c2fb79e79bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424098
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
... since it mysteriously returns something even if the blender doesn't
map to any enum. Clients should use asBlendMode() or getBlendMode_or().
Change-Id: I5dc5aea51f47f297ef9b2a89535d47ac58aea9bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425177
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
//tools/fiddle/make_all_examples_cpp.py had not run in a while, so
some of these fiddles were not being compiled regularly and bit-rotted.
A follow-up CL will try running that script as a presubmit.
Change-Id: Ib851cb5d70485e354de3388abf56666492335d46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423956
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 0734c6223c.
Reason for revert: This was fixing the symptom and not the disease
Original change's description:
> Clear the tile backend textures when drawing DDLs
>
> It appears that the flutter SKPs don't contain an initial clear so the background can be random noise.
>
> This only appears to be an issue for the Metal backend.
>
> Change-Id: I4f5c823cdb1a0a76c0704d4d48355c3a0ed75d43
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423316
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com
Change-Id: Iaa52a66248cef2896fc310ee199c3cef7029e532
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423581
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It appears that the flutter SKPs don't contain an initial clear so the background can be random noise.
This only appears to be an issue for the Metal backend.
Change-Id: I4f5c823cdb1a0a76c0704d4d48355c3a0ed75d43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423316
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Discovered while trying to run viewer in ASAN
Change-Id: Ic7469fdbf8cb77573c2f93503440b2137bdba783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423016
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is a reland of 76b80eca64
Original change's description:
> Use GL_ANGLE_instanced_arrays
>
> It turns out the es2 command buffer has supported instanced rendering
> all along. We just weren't using it! This CL starts using
> GL_ANGLE_instanced_arrays, after which point chrome es2 will start
> taking many of our instanced codepaths. It can even use tessellation if
> we update the shaders to not rely on gl_VertexID.
>
> Bug: chromium:1220246
> Change-Id: I173f4c07771691143d2540ecb9c3f8222ed8e4b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422379
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: chromium:1220246
Change-Id: I4d6f74adff4e2eda4b55a459faf16b5f5a230d06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422616
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Adds the ability to create an es3 command buffer context, but does not
yet begin testing it because libcommand_buffer_gles2.dylib needs to be
updated first to respect the EGL_CONTEXT_CLIENT_VERSION attrib. Adds a
version check on the context as well to verify we actually get an es3
context when we ask for one.
Bug: chromium:1220246
Change-Id: I996f482d8ad831b81f873e1bfd2f0526e5f1e73e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419616
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 76b80eca64.
Reason for revert: Chrome layout test diffs
Original change's description:
> Use GL_ANGLE_instanced_arrays
>
> It turns out the es2 command buffer has supported instanced rendering
> all along. We just weren't using it! This CL starts using
> GL_ANGLE_instanced_arrays, after which point chrome es2 will start
> taking many of our instanced codepaths. It can even use tessellation if
> we update the shaders to not rely on gl_VertexID.
>
> Bug: chromium:1220246
> Change-Id: I173f4c07771691143d2540ecb9c3f8222ed8e4b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422379
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: I62c25be4f6cf6937c0b5ab6e765a7113aad76916
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1220246
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422441
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The make_lotties_with_assets is a handy tool to take a
directory of lottie files and move them into their own
folders. This will make it easier to add assets (e.g. fonts,
images) if we want to get more accurate benchmarks.
This also makes the test not stop on the first failure, but complete
all of them, so we can see more easily if multiple things have broken.
Change-Id: Idb2ece71376a11e7524cd513a2798884a44bb59f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421927
Reviewed-by: Florin Malita <fmalita@google.com>
We also catch any errors that happen during running the
test or flushing. This allows them to show up in the CI logs.
For skottie-frames in particular, we stop clearing the canvas
before each render, as that was masking an error (and not how
we do things on skottie.skia.org).
Change-Id: I83936a35b6c314da76a0a64e15deaabd156e71f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421923
Reviewed-by: Kevin Lubick <kjlubick@google.com>
It turns out the es2 command buffer has supported instanced rendering
all along. We just weren't using it! This CL starts using
GL_ANGLE_instanced_arrays, after which point chrome es2 will start
taking many of our instanced codepaths. It can even use tessellation if
we update the shaders to not rely on gl_VertexID.
Bug: chromium:1220246
Change-Id: I173f4c07771691143d2540ecb9c3f8222ed8e4b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422379
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is a reland of e58831cd95
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:12143
Change-Id: Id3c0c21436ebd13899908d5ed5d44c42a0e23921
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421918
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit e58831cd95.
Reason for revert: looks like breaking a few build bots
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This CL fixes up many existing format-specifier violations in Skia.
Note that GCC has a warning for formatting nothing, so existing calls to
`SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
These were apparently meant to be used as a place to set a breakpoint.
Some of our clients also use SkDebug with bad format specifiers, so this
check is currently only enabled when SKIA_IMPLEMENTATION is true.
Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The previous version accidentally retrieved all values from
the in memory glyph cache because it was always measuring
the range 1-300. This changes the glyphID to always be an
increasing number, which avoids the cache hits.
There is now some differences between the font types:
- ttf: ~4ms
- woff: ~160ms
- woff2: ~230ms
The high numbers in the woff categories are expected to be
fixed by https://skia-review.googlesource.com/c/skia/+/420578
Bug: skia:12112
Change-Id: I52f6f7baf27fc28b99ac65a067142281918d7298
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421324
Reviewed-by: Kevin Lubick <kjlubick@google.com>
It is no longer used. The example runner uses the registry and fiddle
checks for the '#if'.
Change-Id: I1213702e89cc4927108eeeabcc10501b30eab934
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205588
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Rewrites tessellation atlases as normal render tasks instead of
"onFlush" tasks. These tasks get inserted into the DAG upfront, lay
out their atlases as dependent tasks get built and reference them, and
finally add their ops to render themselves during onMakeClosed. Doing it
this way allows us to pause the flush and re-render the atlas whenever
it runs out of room.
Bug: b/188794626
Bug: chromium:928984
Change-Id: Id59a5527924c63d5ff7c5bce46a88368e79fc3ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420556
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Change-Id: I015cc2401c9f4a87fa7a02a93890bcf0a6704a91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420901
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
As is, all 3 formats have a median time of about 0.12 milliseconds.
Perhaps the performance hit is more strongly felt on larger font
files.
Bug: skia:12112
Change-Id: Ifb4b0aa5a8240d93e94f4b674d0a50e6009887ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420097
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This is a reland of 7bf6bc0d06
Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: If0be86902e7cc4755eba91a89be1ec1a6a4b54b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419720
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: Ib45c569e3bbfeb41003ca9c261408840fb0af9dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419897
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
This reverts commit 7bf6bc0d06.
Reason for revert: Android build references kCoverageCounting
Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: I01d99287978f848eb8bf900c07cba90ceb3b6edc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419898
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Now that the clip atlas has been successfully migrated to
tessellation, we don't need this code anymore!
Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
The Tessellator classes will survive in the NGA and they use
GrMeshDrawOp::Target - but GrMeshDrawOp will not survive.
This is a prelude to making all the remaining GrOp-derived classes OGA-only.
Bug: skia:11837
Change-Id: I62dc92e5f42d672342113f12dcedf3435fab993f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419198
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is almost purely a query/replace CL (% the #include juggling).
The VisitProxyFunc is used by more than just the Ops and will probably
still be required in the NGA.
This is a prelude to making all the remaining GrOp-derived classes OGA-only.
Bug: skia:11837
Change-Id: If1c127e5c126c676be529ed2a61dd7953abb03d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419162
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Ia1c775fffff7086ecc1e672792921d2146abd0f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419158
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This was a particularly bad hash (A == B didn't imply
hash(A) == hash(B)). It was also entirely unused.
Change-Id: Id923bf1035effce04e12b1cc01d1c6aa4d11fdb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419336
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:11837
Change-Id: I92aacf8b412d0158036a5f27aa767590e426bd5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417657
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL preserves the "StringFragment" name as an alias for
string_view to reduce the impact. The StringFragment alias
will be removed in a followup CL.
Change-Id: I89209bc626b0be0d0190823b6217f4c83cafe1bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416736
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Change-Id: Id2f0b65a28424868e1b897688bcd451041698da4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417000
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
`constexpr char` arrays in header files generate a separate object in
each translation unit; we should add `inline` to these.
http://go/totw/140#within-a-header-file-beware
Change-Id: I7e2dd8f81053577127e349e9dc4a691e432c2c05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416780
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The GTX 1080 Ti with driver version 466.47 wants to enable
VK_NV_acquire_winrt_display, which depends on VK_EXT_direct_mode_display
but VK_EXT_direct_mode_display is not one of its available device
extensions. This leads to correct validation errors that prevent viewer
from launching in debug mode.
Change-Id: I989477861007d7a5baa529698ffd86910618b9f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415173
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
While the SDC-accessing versions have to stick around due to their
usage in unit tests, they will return null when exercising the NGA.
The render-target-proxy versions will work in both the OGA and NGA
and should, thus, be prefered.
Bug: skia:11837
Change-Id: I36213472e46e9da3ae6561f80d413090ceb6ad3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415058
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bumps [ws](https://github.com/websockets/ws) from 7.3.0 to 7.4.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>7.4.6</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a ReDoS vulnerability (00c425ec).</li>
</ul>
<p>A specially crafted value of the <code>Sec-Websocket-Protocol</code> header could be used
to significantly slow down a ws server.</p>
<pre lang="js"><code>for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
const value = 'b' + ' '.repeat(length) + 'x';
const start = process.hrtime.bigint();
<p>value.trim().split(/ *, */);</p>
<p>const end = process.hrtime.bigint();</p>
<p>console.log('length = %d, time = %f ns', length, end - start);
}
</code></pre></p>
<p>The vulnerability was responsibly disclosed along with a fix in private by
<a href="https://github.com/robmcl4">Robert McLaughlin</a> from University of California, Santa Barbara.</p>
<p>In vulnerable versions of ws, the issue can be mitigated by reducing the maximum
allowed length of the request headers using the <a href="https://nodejs.org/api/cli.html#cli_max_http_header_size_size"><code>--max-http-header-size=size</code></a>
and/or the <a href="https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener"><code>maxHeaderSize</code></a> options.</p>
<h2>7.4.5</h2>
<h1>Bug fixes</h1>
<ul>
<li>UTF-8 validation is now done even if <code>utf-8-validate</code> is not installed
(23ba6b29).</li>
<li>Fixed an edge case where <code>websocket.close()</code> and <code>websocket.terminate()</code> did
not close the connection (67e25ff5).</li>
</ul>
<h2>7.4.4</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a bug that could cause the process to crash when using the
permessage-deflate extension (92774377).</li>
</ul>
<h2>7.4.3</h2>
<h1>Bug fixes</h1>
<ul>
<li>The deflate/inflate stream is now reset instead of reinitialized when context
takeover is disabled (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1840">#1840</a>).</li>
</ul>
<h2>7.4.2</h2>
<h1>Bug fixes</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f5297f7090"><code>f5297f7</code></a> [dist] 7.4.6</li>
<li><a href="00c425ec77"><code>00c425e</code></a> [security] Fix ReDoS vulnerability</li>
<li><a href="990306d144"><code>990306d</code></a> [lint] Fix prettier error</li>
<li><a href="32e3a8439b"><code>32e3a84</code></a> [security] Remove reference to Node Security Project</li>
<li><a href="8c914d18b8"><code>8c914d1</code></a> [minor] Fix nits</li>
<li><a href="fc7e27d12a"><code>fc7e27d</code></a> [ci] Test on node 16</li>
<li><a href="587c201bfc"><code>587c201</code></a> [ci] Do not test on node 15</li>
<li><a href="f672710797"><code>f672710</code></a> [dist] 7.4.5</li>
<li><a href="67e25ff502"><code>67e25ff</code></a> [fix] Fix case where <code>abortHandshake()</code> does not close the connection</li>
<li><a href="23ba6b2922"><code>23ba6b2</code></a> [fix] Make UTF-8 validation work even if utf-8-validate is not installed</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.3.0...7.4.6">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ws&package-manager=npm_and_yarn&previous-version=7.3.0&new-version=7.4.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/google/skia/network/alerts).
</details>
This is an imported pull request from
https://github.com/google/skia/pull/80
GitOrigin-RevId: a9a98b522212ab86f81c15979a3550ea7e276edb
Change-Id: Ia61edf467fb25d96bed7066b9355975005ca6393
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415377
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
At present, only Xfer processors allow reading back from the destination
image since they are in charge of blending. However, we'd like to expose
the destination color to fragment processors and Runtime Effects in the
future. To make this possible, the DstProxyView will need to be
accessible outside of Xfer processors.
This CL migrates DstProxyView to be a top-level Ganesh class and fixes
up the references to it throughout Skia. It's interesting to note that
several call sites were already using typedefs to hide the class
nesting anyway.
Change-Id: I93a294aa097f9319a968503c4f2f7e4f388ff033
Bug: skia:12066
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414899
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
We did this to allow pipelining of GPU/CPU work in nanobench on devices
that don't have GL sync objects (or NV fence). However, we've found
that on the AndroidOne/Mali400 and Nexus7/Tegra3 devices that the
majority of a frame's work can be reordered to complete before an
earlier EGL sync. This makes the results unreliable, especially the
min_ms result. Just accept that we will sync the CPU and GPU on these
devices.
Change-Id: I04d168cbb05504d367f6a06b7b4903163ab2aa79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414897
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Change-Id: I4e00edd2d1572c3e2c1fcb56824239c166253cbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412958
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These have been replaced by `sk try` and `sk release-branch`,
respectively.
Change-Id: Idc297dd7c84a87a09f69f310de495f91fcce36b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409898
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
This reverts commit 789ec0533e.
Reason for revert: Not ready for this yet
Original change's description:
> Temporarily disable reordering on bots again
>
> To be landed after CL 412636. This should give us a clearer picture of
> the perf impact of reordering, now that the fence issue is mitigated.
>
> Will flip it back after perf runs.
>
> Bug: skia:10877
> Change-Id: I255c68f148f7aaebacb2469a56b7eade6d41696c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412638
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,adlai@google.com
Change-Id: Idef91adade6f2814e472c70f71bd8d1b51aa4fa8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412665
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
To be landed after CL 412636. This should give us a clearer picture of
the perf impact of reordering, now that the fence issue is mitigated.
Will flip it back after perf runs.
Bug: skia:10877
Change-Id: I255c68f148f7aaebacb2469a56b7eade6d41696c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412638
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Now that hardware tessellators chop, support raw triangles, and can
handle any path, we don't need complicated logic anymore to determine
when we can't use them. This CL simplifies the criteria for selecting
a tessellation algorithm and adds a fAlwaysPreferHardwareTessellation
context option to override it.
Bug: skia:10419
Change-Id: I8492e8f285ff27eb9d0dd6b1e9817dbeeb386c63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411496
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Makes the code from yuv_splitter reusable and able to produce subsampled
planes.
Bug: chromium:1210557
Change-Id: Icce112658bbdb866c3ecb9dcff1a5e8d0d30135a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411297
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 9604eab2bd.
Reason for revert: Got perf data
Original change's description:
> Temporarily disable reduceOpsTaskSplitting on bots
>
> When we enabled this, at that time CCPR atlasing would
> auto-disable when reordering was enabled, so the perf
> impact was unclear.
>
> Since then, CCPR atlasing has been disabled for everyone,
> so let's flip this flag, get some perf data, and then flip it back.
>
> Bug: skia:10877
> Change-Id: I67f081981e84c573dfc2907018b50c740f3a32cc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411216
> Auto-Submit: Adlai Holler <adlai@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
Change-Id: Ic90be563da759b48f5aa3d9c951cfb76439ce604
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411298
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
When we enabled this, at that time CCPR atlasing would
auto-disable when reordering was enabled, so the perf
impact was unclear.
Since then, CCPR atlasing has been disabled for everyone,
so let's flip this flag, get some perf data, and then flip it back.
Bug: skia:10877
Change-Id: I67f081981e84c573dfc2907018b50c740f3a32cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411216
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Skia has an atlas clipping mode (historically called CCPR clipping) that
doesn't quite work. It will fail on blend modes that require a dst read
and is also drawing the complexclip_* tests wrong on several devices.
We plan to rewrite the clip atlas, but in the meantime we need to
disable the "CCPR" clipping.
Bug: b/188794626
Change-Id: I126030a2a81057ffca85fd8b8e7db97b716451ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408557
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Fixed: dawn:788
Change-Id: I2ec810fdd177aff61519192c234d5cb8cabe68d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409236
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
Also three fixes for drawing to offscreen layers in MSKPPlayer:
*Only play from last full redraw to next cmd
*Clear before full redraw
*Actually track current cmd in layer state.
Bug: skia:11900
Change-Id: I988afb61f96c8acb7e7554d65bfa6cd6020196c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407460
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I674f038600afd6d49316c1ece515941ee5579068
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406939
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This effectively reverts a80ce1a36d,
and goes back to using SkMakeSpan (which works in C++14).
Change-Id: Iaa63c86b5acaadbdd60588b0a5c703820e810770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406938
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Currently our ANGLE vendor/renderer detection is based ANGLE's D3D
backends. To detect on the GL backend it'd be helpful to reuse the
normal GL detection after extracting the relevant GL backend strings
that ANGLE puts in GL_RENDERER in its GLES frontend. This is a step in
that direction.
Bug: 1203705
Change-Id: I5367c49e8aaee2e138088316566f95900b9c4831
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405689
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Should not change functionality.
Bug: 1203705
Change-Id: I2a17fb0ccb729033c964a138dbd5e86be7f93d9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405200
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Chromium has been updated to use makeAnalysisCanvas directly and there are
no more references to SkTextBlobDiffCanvas as a type in its code base.
Since the GlyphTrackingDevice extends SkNoPixelsDevice, any SkCanvas that
uses it is effectively a "no-draw" canvas. However, by returning a base
SkCanvas the text tracking now automatically happens in the context of
the base's AutoLayerForImageFilter handling it applies on every draw. This
means that drawing a text blob with an image filter that modifies the
transform state will now be analyzed in that context automatically
(simplifying code in chrome after this lands).
Another behavioral change is that all non-text draws will still go through
the base SkCanvas' virtuals and invoke the device function. Since it's an
SkNoPixelsDevice, it'll still be a no-op, it just happens a little later.
This won't really impact performance because oop-r already inspects their
operations and only plays back text and transform related ones to the
analysis canvas, so we shouldn't really see non-text draws being invoked
anyways.
Bug: chromium:1187246
Change-Id: I83f86571300751f385b3065dfe889f218fa1edc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405196
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of adadb95a9f
... adds a temporary workaround for some Android framework code.
Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
> stage was declared, not just the name). The factories verify that the
> declared types in the SkSL match up with the C++ types being passed.
> Today, we still only support adding children of the same type, so the
> checks are simple. Once we allow mixing types, we'll be testing the
> declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
> is now the only way to invoke a colorFilter child. Internally, we
> support passing a color when invoking a child shader, but I'm not
> exposing that. It's not clearly part of the semantics of the Skia
> pipeline, and is almost never useful. It also exposes users to
> several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
> to filter individual colors. In that case, we don't set the constant
> output for constant input optimization, and filterColor4f falls back
> to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:11813 skia:11942
Change-Id: I2c31b147ed86fa8c4dddefb7066bc1d07fe0d285
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404637
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit adadb95a9f.
Reason for revert: breaking android
Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
> stage was declared, not just the name). The factories verify that the
> declared types in the SkSL match up with the C++ types being passed.
> Today, we still only support adding children of the same type, so the
> checks are simple. Once we allow mixing types, we'll be testing the
> declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
> is now the only way to invoke a colorFilter child. Internally, we
> support passing a color when invoking a child shader, but I'm not
> exposing that. It's not clearly part of the semantics of the Skia
> pipeline, and is almost never useful. It also exposes users to
> several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
> to filter individual colors. In that case, we don't set the constant
> output for constant input optimization, and filterColor4f falls back
> to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I94ba57e73305b2302f86fd0c1d76f667d4e45b92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11813 skia:11942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404117
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This does a few things, because they're all intertwined:
1) SkRuntimeEffect's API now includes details about children (which Skia
stage was declared, not just the name). The factories verify that the
declared types in the SkSL match up with the C++ types being passed.
Today, we still only support adding children of the same type, so the
checks are simple. Once we allow mixing types, we'll be testing the
declared type against the actual C++ type supplied for each slot.
2) Adds sample variants that supply the input color to the child. This
is now the only way to invoke a colorFilter child. Internally, we
support passing a color when invoking a child shader, but I'm not
exposing that. It's not clearly part of the semantics of the Skia
pipeline, and is almost never useful. It also exposes users to
several inconsistencies (skbug.com/11942).
3) Because of #2, it's possible that we can't compute a reusable program
to filter individual colors. In that case, we don't set the constant
output for constant input optimization, and filterColor4f falls back
to the slower base-class implementation.
Bug: skia:11813 skia:11942
Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:11900
Change-Id: I97d1f2a9523252318ffb4f479b197cb0ef9cf0b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Default the background color to transparent black, which is correct for
mskps captures from Android framework.
Bug: skia:11900
Change-Id: I97cab04993c0f85259e831f3d0c44f9b962365af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403077
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Sometimes I like to dump the shaders from reduced shader mode.
Bug: skia:11844
Change-Id: I33c986116e326a023c432d582e3653267f311bca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402999
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is a reland of 3b7587814d
Use SkTPin instead of std::clamp (C++17 library feature).
Original change's description:
> FPS and frame control for MSKP slide.
>
> Bug: skia:11900
> Change-Id: Ib4d8da6a86da7966e613de2d7cfd61ff545b296a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400676
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: skia:11900
Change-Id: I29d3f6a717bbdd4e1fee3322e98d33e51a28f264
Cq-Include-Trybots: luci.skia.skia.primary:Housekeeper-PerCommit-CreateDockerImage_Skia_Release
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402917
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:11900
Change-Id: Ib4d8da6a86da7966e613de2d7cfd61ff545b296a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400676
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This reverts commit 9230fc59b7.
Reason for revert: broke something in housekeeping docker build.
Original change's description:
> Add mskp player, use in viewer slide
>
> viewer now takes --mskps <dir> and will have a slide per mskp and
> overview slide (just like --skps).
>
> Player uses offscreen surfaces to draw offscreen layers, allows
> random access to mskp frames.
>
> slide just plays mskp at fixed frame rate (for now).
>
> Bug: skia:11900
> Change-Id: I66104ffe88f5df721a1a835570acc3e4c23c3f07
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400537
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,bsalomon@google.com,nifong@google.com
Change-Id: I97fb7a64d5ef2ca14dba1cf9e2ba91ab0e9d0018
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11900
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402639
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
viewer now takes --mskps <dir> and will have a slide per mskp and
overview slide (just like --skps).
Player uses offscreen surfaces to draw offscreen layers, allows
random access to mskp frames.
slide just plays mskp at fixed frame rate (for now).
Bug: skia:11900
Change-Id: I66104ffe88f5df721a1a835570acc3e4c23c3f07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400537
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This relands the idea that onMatchFaceStyle is no longer used, but
leaves the baseclass virtual to stage removing it from client
subclasses.
This reverts commit 3c04a65508.
Change-Id: I18570065249c86f7f155c28288dce3ea9d59f619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401759
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Mixed samples is no longer relevant for Ganesh. DMSAA and the new
Ganesh architecture both rely on full MSAA, and any platform where
mixed samples is supported will ultimately not use the old
architecture.
Change-Id: I5acc745010e090ef26310d92ec6240be2cd494cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399837
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
We exclude the NUC5PPYH just to get desktop coverage,
and we exclude the Pixel4, 4XL, 5 because of an apparent driver
bug I'm in the progress of tracking down.
Bug: skia:10877
Change-Id: Ic925cc7434c5228bcc2ee07ae752f89229db55c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399742
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This reverts commit b8e02c5f38.
Reason for revert: Broke Pixel5 glesmsaa4 desk_mapsvg.skp
Original change's description:
> Enable DAG reordering on all bots except one
>
> Before this CL, only select bots used reordering. After this CL,
> all bots except the NUC5PPYH use the flag.
>
> Once all our clients are migrated, we'll remove the flag altogether.
>
> Bug: skia:10877
> Change-Id: Iee734f8b99ae9eba6c1947009d8164032594b051
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398219
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
TBR=rmistry@google.com,robertphillips@google.com,adlai@google.com
Change-Id: Iadf4f779bbaa1c5406d5f88e448994951ae89ae4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398179
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Before this CL, only select bots used reordering. After this CL,
all bots except the NUC5PPYH use the flag.
Once all our clients are migrated, we'll remove the flag altogether.
Bug: skia:10877
Change-Id: Iee734f8b99ae9eba6c1947009d8164032594b051
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398219
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
The "raster" window on macOS and iOS is actually backed by GL. Fix the
build rules and code conditions to reflect this. This allows for some
sk_app applications to run on macOS and iOS with skia_use_gl=false.
> Revert:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Land:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Ia8a421f4818856dd90cb4847095eee0d1836d1e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398056
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This will let us see the reordered_dags_over_budget stat
in perf so that we know our fallback code path is getting tested.
Bug: skia:10877
Change-Id: I073c8622ddb8f3449511193bac045bfebc4e277c
Cq-Include-Trybots: luci.skia.skia.primary:Perf-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Release-All
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398217
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
This reverts commit 163ba10dde.
Reason for revert: Mac linker errors
Original change's description:
> Fix sk_app macOS raster window build conditions.
>
> The "raster" window on macOS is actually backed by GL. Fix the build
> rules and code conditions to reflect this. This allows for some sk_app
> applications to run on macOS with skia_use_gl=false.
>
> Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=bungeman@google.com,brianosman@google.com
Change-Id: Ie5fa24138e4387784c21559f28528a4c4d335626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The "raster" window on macOS is actually backed by GL. Fix the build
rules and code conditions to reflect this. This allows for some sk_app
applications to run on macOS with skia_use_gl=false.
Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Ic5192b072c98617dee85f28f8f4214c7a805a1fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Previously, the conflicting header names were printed between several
lines of "boilerplate" text, and without any explanatory text. This
made them difficult to notice. The assertion now has an explanatory
message and prints the conflicting filenames directly at the point of
the assertion.
Before:
---
Running presubmit upload checks ...
tests/sksl/dslfp GrSwizzle.h /Users/johnstiles/skia/src/gpu/GrSwizzle.h
Traceback (most recent call last):
File "tools/rewrite_includes.py", line 60, in <module>
assert file_name not in headers
AssertionError
** Presubmit ERRORS ** (etc)
username$ _
After:
---
Running presubmit upload checks ...
Traceback (most recent call last):
File "tools/rewrite_includes.py", line 61, in <module>
assert file_name not in headers, message
AssertionError: Header filename is used more than once!
- tests/sksl/dslfp/GrSwizzle.h
- /Users/johnstiles/skia/src/gpu/GrSwizzle.h
** Presubmit ERRORS ** (etc)
username$ _
Change-Id: I2b6848ef82c4b1c6d4b5577a76969785e5e122bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397149
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is a reland of 5a2de5e72f
This is part one of two CLs. In this CL, I put a
sk_sp<GrArenas> on GrRenderTargetProxy where GrArenas wraps
a SkArenaAlloc to add ref counting. Creating
a GrOpsTask shares the GrArenas with the ops task. When an
GrOpsTask is destroyed, it nulls out the fArenas sk_sp on
the GrRenderTargetProxy to limit the life span of the arenas.
New plumbing was added to GR_DRAW_OP_TEST_DEFINE to allow a
proper GrSurfaceDrawContext to be passed to GrAtlasTextOp's
GR_DRAW_OP_TEST_DEFINE so the arena will have a proper lifetime.
The second CL will work on replacing GrOpsTask's fAllocators
system with the shared arena.
Change-Id: Ieb568e4533c17e31b3b015e7781365d7d898c483
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396818
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
These enforce stricter rules about the signature of main, and each one
uses a separate pre-include module. That prevents color filters from
being able to reference sk_FragCoord (or coords passed to main) at all.
It also limits the versions of sample() that are exposed.
In the new world, an effect created for a specific stage of the Skia
pipeline can only be used to create instances of that stage (SkShader or
SkColorFilter). For now, SkRuntimeEffect::Make uses kRuntimeEffect,
which continues to be more lenient and allow creation of either shaders
or color filters from a single effect. After we migrate all clients, we
can deprecate and then delete that mode.
Bug: skia:11813
Change-Id: I0afd79a72beeec84da42c86146e8fcd8d0e4c09f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395716
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Modifies helpers on GrGLSLGeometryProcessor that insert, set, and make
keys for view/local matrix uniforms to not omit the uniform when
the matrix is identity or use a float4 when it is scale/trans. Always
uses a 3x3.
Bug: skia:11844
Change-Id: I0f25b60b46b8932d7e2cac4a50159d22b9cd84d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395656
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This lets us test out the memory-fallback code in the new
ops task reordering pathway on our bots.
Bug: skia:10877
Change-Id: Ic5662ef68e46b144eb2821687390c858d0056ba1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396157
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
We are up to having seven distinct types of codegen, and will soon have
an 8th (DSL C++).
Change-Id: I6758328390c234ba1d5c30c118199dbc820af52a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395817
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This code is not performance-sensitive, and there doesn't seem to be any
benefit to making it header-only.
Change-Id: Ic83be5cbb96f08c18a144954be7453aaabaa5a72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394900
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Currently doesn't do anything other than add new configs that set
a GrContextOption that becomes available in GrCaps. Runs new configs
on Perf/Test bots (MTL/iPhone11 and GL/Ubuntu).
Bug: skia:11844
Change-Id: I58586cae0980e52701abd1633dbc79b381f6015b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394996
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
We really do use this.
Change-Id: I0defcf8aa3b23eec89b38b6720228daa8d50c27b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394956
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This reverts commit 5a2de5e72f.
Reason for revert: Upon further investigation this still leaks
Original change's description:
> put an arena on GrSurfaceDrawContext
>
> This is part one of two CLs. In this CL, I put a
> sk_sp<GrArenas> on GrSurfaceFillContext where GrArenas wraps
> a SkArenaAlloc to add ref counting. Creating
> a GrOpsTask shares the GrArenas with the ops task. New plumbing
> was added to GR_DRAW_OP_TEST_DEFINE to allow a proper
> GrSurfaceDrawContext to be passed to GrAtlasTextOp's
> GR_DRAW_OP_TEST_DEFINE so the arena will have a proper lifetime.
>
> The second CL will work on replacing GrOpsTask's fAllocators
> system with the shared arena.
>
> Change-Id: Ife3be0ab265441cbffab360f2808f5eed86db8b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392936
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=bsalomon@google.com,herb@google.com
Change-Id: I9ca5c8b1e16b468003788cd3126eda1d40ff93ed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393177
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This is part one of two CLs. In this CL, I put a
sk_sp<GrArenas> on GrSurfaceFillContext where GrArenas wraps
a SkArenaAlloc to add ref counting. Creating
a GrOpsTask shares the GrArenas with the ops task. New plumbing
was added to GR_DRAW_OP_TEST_DEFINE to allow a proper
GrSurfaceDrawContext to be passed to GrAtlasTextOp's
GR_DRAW_OP_TEST_DEFINE so the arena will have a proper lifetime.
The second CL will work on replacing GrOpsTask's fAllocators
system with the shared arena.
Change-Id: Ife3be0ab265441cbffab360f2808f5eed86db8b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This allows directories in sources, e.g.
$ fm -b cpu -s skimage/dm/01_original.jpg -w foo
skimage/dm/01_original.jpg f181c4655d0f55d7000dd04a4d28d407 330ms
$ find foo
foo
foo/skimage
foo/skimage/dm
foo/skimage/dm/01_original.jpg.png
where previously,
$ fm -b cpu -s skimage/dm/01_original.jpg -w foo
sk_fopen: fopen("foo/skimage/dm/01_original.jpg.png", "wb") returned nullptr
(errno:2): No such file or directory
libpng error: HashAndEncode::encodePNG() failed writing stream
Signal 6:
_sigtramp (+0x1d)
Change-Id: I6950d77cacba16363315fb8d5c6d866d207c9a25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392198
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:11803
Change-Id: I925f14be282b96355721986de6049090b35adf3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Add GrCPixmap, a GrPixmap but with const void* instead of void*. Share
impl via template base class GrPixmapBase.
Change-Id: I7dfdf24a73c1bc8557ff7b90f93a9399da2f3f75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350022
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Previously, the Compiler optimization overrides only supported force-
disabling a particular behavior; we assumed that the default state of
a Compiler was to allow all optimizations. This assumption is about to
be invalidated, as the Inliner will soon be off by default unless you
are using GLES.
The override flags are now a tri-state; optimization and inlining can
be set to "default", "on" or "off".
Change-Id: I5637693222ca1de74ca1073c24d86c8e7c5026f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390136
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>
The main change here is just fusing the following three methods into recreateSKP:
deflateSKP
createCallbackContexts
createSKP
All the remaining changes are just API fallout from that.
Bug: skia:11728
Change-Id: Iae2ce65983ad56c8288bdc830e248394a0055bfb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389925
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:11768
Change-Id: I6107362457dce380e3fb1647ad58d8e33e453e2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388743
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
This reverts commit 3f5bee1a7a.
Reason for revert: concluding experiment
Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This is a reland of 045d7513d7
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
> In previous trials, we encountered an issue with overloads of cross()
> which prevented us from collecting data on some platforms.
>
> Original change's description:
> > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> >
> > This is a reland of 3f35ac10b4
> >
> > Time to run this experiment again.
> >
> > Original change's description:
> > > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> > >
> > > This will allow us to measure the impact (positive or negative) of
> > > inlining functions before submitting a shader to the driver.
> > >
> > > Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: John Stiles <johnstiles@google.com>
> >
> > Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Change-Id: I49a1555bde93c339fda567fc85a85e937af95628
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388396
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Ifd63edeb06fea8eea4ac0a4242c93449b288b074
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388796
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is a reland of 045d7513d7
This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.
In previous trials, we encountered an issue with overloads of cross()
which prevented us from collecting data on some platforms.
Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This is a reland of 3f35ac10b4
>
> Time to run this experiment again.
>
> Original change's description:
> > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> >
> > This will allow us to measure the impact (positive or negative) of
> > inlining functions before submitting a shader to the driver.
> >
> > Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I49a1555bde93c339fda567fc85a85e937af95628
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388396
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:11760, skia:11787
Change-Id: Idfedb90576e0484bf32a9002081c0fcb888141eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388216
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
into a new GrGLSLGeometryProcessor. Since NVPR is no more this
distinction (between GLSL- Primitive and Geometry -Processor)
probably isn't needed/useful.
Bug: skia:11760
Change-Id: I75621725bd2b0ef3dbac2ea6449bd571551babab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388036
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
With the removal of NVPR we no longer need this distinction.
Bug: skia:11760
Change-Id: I225a4feb764395fb72aca3ffc8b6d05396bf0b1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386890
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This reverts commit 045d7513d7.
Reason for revert: experiment complete
Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This is a reland of 3f35ac10b4
>
> Time to run this experiment again.
>
> Original change's description:
> > Performance experiment: Disable SkSL inliner in nanobench/skpbench.
> >
> > This will allow us to measure the impact (positive or negative) of
> > inlining functions before submitting a shader to the driver.
> >
> > Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I54d417e65bd134dee72ff46e9331f8fabfc724df
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387536
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is a reland of 3f35ac10b4
Time to run this experiment again.
Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
>
> Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reland 188443be8d without the DMSAA bots
to ensure nothing else changes.
Original change's description:
> Add tooling support for dmsaa
>
> Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
> tooling code. When dmsaa is set, SkGpuDevice draws everything
> antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
> to run them.
>
> Bug: skia:11396
> Change-Id: I165e89434b733f7b02312cea0e6649812528083b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com
Bug: skia:11396
Change-Id: Icb45097e0a34543dc577fa32f19a692e90643a35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386338
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 188443be8d.
Reason for revert: It looks like non-dmsaa bots might have been
affected. Let's land first without the new bots to make sure nothing
else changes.
Original change's description:
> Add tooling support for dmsaa
>
> Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
> tooling code. When dmsaa is set, SkGpuDevice draws everything
> antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
> to run them.
>
> Bug: skia:11396
> Change-Id: I165e89434b733f7b02312cea0e6649812528083b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: Ib805b417ebd34d1fad79e0e1fe625765ee487f65
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386336
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Adds a "fAlwaysAntiAlias" flag to GrContextOptions that can be set from
tooling code. When dmsaa is set, SkGpuDevice draws everything
antialiased. Adds new "gldmsaa" and "glesdmsaa" configs and creates bots
to run them.
Bug: skia:11396
Change-Id: I165e89434b733f7b02312cea0e6649812528083b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
intelwiki has html tables to test
Cq-Include-Trybots: luci.skia.skia.primary:Housekeeper-Nightly-RecreateSKPs_DryRun
Bug: skia:11354
Change-Id: I84fb2b91ffd7b28b46bb5d303f546f193a9883d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385498
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is a reland of c0c3231bde
Original change's description:
> On NVIDIA + ANGLE, test 4x MSAA, not 8x
>
> By all accounts, this should produce much more deterministic output,
> letting us remove quite a few ignores.
>
> Bug: skia:6813 skia:6545
> Change-Id: I7bc2c8e05c2f6e8110ea550882d5f0a45548008b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384856
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:6813 skia:6545
Change-Id: I2bbff8c8807940024eeefbca823656ab105acdd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384998
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 3f35ac10b4.
Reason for revert: concluding experiment
Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
>
> Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: Ia7c34e3e2bb4f777a4bd18a5646e494eeb3c93ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384456
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.
Change-Id: Icbd64096445a353187b30feea68573d89ca18664
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This converts ccpr to just a poorly named atlas manager. The atlas
gets rendered by normal calls on its MSAA draw context:
for (;;) {
surfaceDrawContext->stencilPath(); // Stencil.
}
surfaceDrawContext->stencilRect(atlasBounds); // Cover.
Bug: chromium:1158093
Change-Id: I758ffd372b2ed5bb8b370156b6f80f6204146700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381618
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
All that's left is a clip atlas renderer.
Bug: chromium:1158093
Change-Id: I8b509904a752a202ff1321e5302c41a3f57a5edb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383741
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
We no longer derive a performance benefit from this pass in practice,
and it is a very expensive compilation step. It is also prone to fuzz-
related errors.
Doc: http://go/optimization-in-sksl
Change-Id: Ief08ffac659a8fe7fe92c92b9a5da14c9f713bc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This declutters the atlas generation code so there are fewer variables.
Next we will delete all the lower level rendering code and render the
atlas with stencilPath/stencilRect instead.
Bug: chromium:1158093
Change-Id: I36cff285d0f7de6f8ece4b027e62ae84aa01adc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380656
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is useful because it allows the variables to be declared as `const`
when they are trivial values like `half4(1)`. This enables the constant
folder to simplify or eliminate them. In most cases, this is only a
small benefit, as you'd expect a competent GPU driver to do the same.
However, Mali-400 can benefit significantly from optimizing away the
multiplication against a constant half4(1) coverage in Porter-Duff.
Mali-400 performance is back to normal: http://screen/3cDxdaGkYE8oBcS
Change-Id: I21fd23f91f747079cd05b082f7b3444aeabafb93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382476
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This lets us see at a glance what each optimization pass contributes to
our final compiled SkSL output.
Change-Id: I52c56c92c408eee34045c5e6f60298cf9548ff5d
Bug: skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381257
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This gives Viewer a way to dynamically toggle CFA off and on, so we can
immediately see the impact on shader optimization.
Change-Id: I912df70de126a74a1f0d11c511b2acc64f1e9f28
Bug: skia:11319
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380456
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
- Added "Dump Shaders" button; this writes the shaders to disk in the
`/resources/sksl` directory. This will allow us to more easily check
real-world shader code generation, instead of synthetic examples.
- Renamed "Load" and "Save" to "View" and "Apply Changes," to clarify
that they are not about files on disk. (Otherwise they seemed
confusing when placed next to a Dump Shaders button.)
Also, fixed a bug which would prevent a new deferred action from being
registered while running deferred actions.
(This CL implements the "test real-world shaders" portion of
http://go/optimization-in-sksl)
Change-Id: I7626a9e9c4f3ecb31b51f29b8106e4ca55de4dd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/380317
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
In addition to the unsurprising changes to eliminate references to
src/, we also had to tighten up some C++17-isms as they are not
permitted in public headers.
Change-Id: Ie5005a33d7a135e69fb66beca5e7a5f960dbd453
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378496
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:11372
Change-Id: Ib764b8d995655317e8968e57b1ea0528339d430b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of bbbf1a7f50
Original change's description:
> Redesign program key construction
>
> This does two things:
> 1) Moves responsibility for bit-packing portions of the key into the key
> itself. A new GrKeyBuilder type manages adding bits, with asserts to
> ensure a value always fits in the requested number. In theory this
> will let us generate smaller keys overall, at the expense of slightly
> more complex code during construction.
> 2) Adds a string label parameter for key methods that fold in data. For
> new methods, the label is required. To ease migration, the old add32
> does not require a label (yet). This will let us generate detailed,
> human readable keys, either based on SK_DEBUG, or a runtime option
> (if we're comfortable paying the cost).
>
> Bug: skia:11372
> Change-Id: Ib0f941551e0dbadabbd2a7de912b00e9e766b166
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377876
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:11372
Cq-Include-Trybots: luci.skia.skia.primary:Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan
Change-Id: I179ed581bc9ba772191e727274ac0ac6979ebdf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378778
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit bbbf1a7f50.
Reason for revert: D3D Failures
Original change's description:
> Redesign program key construction
>
> This does two things:
> 1) Moves responsibility for bit-packing portions of the key into the key
> itself. A new GrKeyBuilder type manages adding bits, with asserts to
> ensure a value always fits in the requested number. In theory this
> will let us generate smaller keys overall, at the expense of slightly
> more complex code during construction.
> 2) Adds a string label parameter for key methods that fold in data. For
> new methods, the label is required. To ease migration, the old add32
> does not require a label (yet). This will let us generate detailed,
> human readable keys, either based on SK_DEBUG, or a runtime option
> (if we're comfortable paying the cost).
>
> Bug: skia:11372
> Change-Id: Ib0f941551e0dbadabbd2a7de912b00e9e766b166
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377876
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
Change-Id: I7bfb20905c87083e84a1ea21bc53d63e882e2c68
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11372
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378777
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This does two things:
1) Moves responsibility for bit-packing portions of the key into the key
itself. A new GrKeyBuilder type manages adding bits, with asserts to
ensure a value always fits in the requested number. In theory this
will let us generate smaller keys overall, at the expense of slightly
more complex code during construction.
2) Adds a string label parameter for key methods that fold in data. For
new methods, the label is required. To ease migration, the old add32
does not require a label (yet). This will let us generate detailed,
human readable keys, either based on SK_DEBUG, or a runtime option
(if we're comfortable paying the cost).
Bug: skia:11372
Change-Id: Ib0f941551e0dbadabbd2a7de912b00e9e766b166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377876
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Try to uncover races by running parallel replicas.
The default --race 0 should keep FM working as before, but now with
--race ≥2 we'll actively try to race replicas, syncing between tests.
--race 1 is almost pointless, just changing the thread tests run on but
without any interesting concurrency.
Rearrange a bit how fm_driver decides what flags to pass to which
invocations of FM, so individual runs can easily override defaults (e.g.
--nativeFonts overriding the usual --nonativeFonts). Use that here to
set --race 0 for unit tests; many unit tests are not reentrant.
Change-Id: Ida451626c093793b0805d3036beb185e7d54f27e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376761
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
tabl_mozilla.skp is uselessly large without a clip.
Change-Id: I6e8ab8c31e790b6629be01e6eeb2e8d60c6ff56f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378360
Reviewed-by: Brian Osman <brianosman@google.com>
We think this has the same effect as written right?
I'm looking ahead to a mode of FM where each round
of this loop might run in a different thread, and
I think there we'd want to give each its own pool?
Change-Id: I8f4e215fb2f96f4fe433d15f8654445200fdca5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377896
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This does mean we won't print the name of a failing source, but that
shouldn't be needed so much given how FM runs on the bots... should be
obvious what failed without it.
On the flip side, this means each log line will print out atomically,
which might be nice when reading through TSAN runs with async threads.
Change-Id: Ib971416f255e60ea6d900ea687abb8404d799dfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377916
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
* Adds GrMtlPipelineStateBuilder::PrecompileShaders.
* Adds GrMtlPrecompileShaderLibrary.
* Stores metadata with SkSL shaders so we can convert to MSL properly
Change-Id: Id2c23a54cc04ca3b61a639c1cbc7234b697c41ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376856
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Just refactoring code that predates SkColorInfo.
Change-Id: Iba5ffdf91e2e2517bf55ea8c5a36c4fe6583a6b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376760
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
afaik Chrome only tiles in Y which should yield less threaded text blob contention
Change-Id: I9ff484ed2ce66428e2d7ca6188eba79cd99b1547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376608
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
- Migrate our code to SkImage::MakePromiseTexture
- Have DDLTileHelper share one SKP and one set of promise images across all tiles.
- Disallow on-the-fly allocation of mips for promise textures.
Bug: skia:10286
Change-Id: Ie35976958454fc520f3c9d860e6285441260c9f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291938
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This will allow users to create PDFs with the actual text embedded. This
will allow for correct search and copy operations on the generated PDF.
Since these are now public, SkTextBlobBuilderPriv is no longer needed
and is removed. For consistency, the allocRunRSXform overload is renamed
to allocRunTextRSXform.
Change-Id: I44be82d9038a433e1221d5cbfd8ed113ecb6d4fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375017
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The 'lang' was never stored or used, so this makes no current practical
difference. The original intent was to be able to specify a language so
that it could be emitted as a 'Lang' override in the 'ActualText' when
generating a PDF. However, due to the way 'ActualText' is generally used
this would be impractical. If there is ever a desire to mark up sections
of the PDF with a specific language it would be better handled in a
different way.
Change-Id: Id63596190235fc45ce17249b9b578b6f9b838b2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The Viewer status box 's' is quite small on high resolution displays.
The 'u' key doubles its size and has been used as a work-around, but
let the status box scale take the backing scale into account.
Change-Id: I98db37a4ed86698ba7c02666478dff248ff6daae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374377
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Cloned from http://review.skia.org/369716
Re-running the experiment now that @switch is supported when
optimizations are disabled.
Change-Id: I428051d9c679a8084589fba428a637f36587be16
Bug: skia:11341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/374516
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is the only place we provide a proxy from a SkImage other than
asView() and is only used in one place in the library. Add a utility
function to replace uses in tests based on asView().
Bug: skia:11208
Change-Id: Ica6eae6e5f153f208523331566acc0360925a20e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This intended to let us experiment w/ threaded compilation before having
to worry about upstreaming features.
Change-Id: Id9d1807de0fa16475184203d293e00bfaf5fcc01
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373736
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
This is a reland of 4c4c80fa12
Original change's description:
> Remove ARC from tools lib.
>
> Trying this in baby steps to manage leaks better.
>
> Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>
Change-Id: Ib5c949ee9e8ac9f47de1991297aec718f3185424
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373616
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 4c4c80fa12.
Reason for revert: Need to update Flutter with sk_cf_obj renaming.
Original change's description:
> Remove ARC from tools lib.
>
> Trying this in baby steps to manage leaks better.
>
> Change-Id: Id8597ba236c752bcbf1c7ec94f6c1021e636d547
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372556
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>
TBR=jvanverth@google.com,bsalomon@google.com,adlai@google.com
Change-Id: I7dc226d002184b80a1d8d2aee09d122d2e13d732
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372680
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>