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>