Label temprory offscreen textures for draws. In this CL, we will
label texture for gradient from GrGradientShader which will help
labeling parts of SkImages too.
Bug: chromium:1164111
Change-Id: Iea49598f7632bb2edfaef21a0956771af5833cc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550736
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Change-Id: I238d29ba0250224fa593845ae65192653f58faff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528156
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This is in prep for compiling with -std=c++14 and -Wno-c++17-extensions
when building with clang. Chrome has encountered problems with
third_party headers that are included both in Skia and other Chrome
sources that produce different code based on whether preprocessor macros
indicate a C++14 or C++17 compilation.
In C++17 they are already inline implicitly. When compiling with C++14
we can get linker errors unless they're explicitly inlined or defined
outside the class. With -Wno-c++17-extensions we can explicitly inline
them in the C++14 build because the warning that would be generated
about using a C++17 language extension is suppressed.
We cannot do this in public headers because we support compiling with
C++14 without suppressing the C++17 language extension warnings.
Bug: chromium:1257145
Change-Id: Iaf5f4c62a398f98dd4ca9b7dfb86f2d5cab21d66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457498
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Salomon <bsalomon@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>
The SDC will soon be V1-only. Remove it from the generic testing infrastructure and require each V1-specific GM to explicitly retrieve it.
Bug: skia:11837
Change-Id: I4c904b7e333333382062bde4b17a1f9f81bee6a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430425
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This is mainly to get GrTextureEffect.h out of this header. Its distribution keeps gumming up efforts to make more classes V1-only.
Bug: skia:11837
Change-Id: I6d5aae20bb20cfe3fb4d93c526efe8cf7e5e0c52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425017
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Replace with two methods in SkGr.h that make cached/uncached texture
proxies from SkBitmap. Move code that makes a GrFP from the proxy
to SkImage_Raster::asFragmentProcessor.
Bug: skia:11877
Change-Id: I51a0ae687561be9b0e44b98ee50f171e42476d94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401920
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: Ie36ea4d5186f6cca341efc6300b813ec8255bdbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388457
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Just the class/files. variable names and additional comments to follow.
Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
I think this is vestigial from some time in the past where RTC was
public.
Also just expose the methods that add ops rather than have so many
friends + testingOnly versions.
Change-Id: I60d9fdff23b2d67039a7b37815da7ff9e73d8999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339158
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Mechanically updated via Xcode "Replace Regular Expression":
typedef (.*) INHERITED;
-->
using INHERITED = $1;
The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.
Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This fixes a large number of SkSL namespaces which were labeled as if
they were anonymous, and also a handful of other mislabeled namespaces.
Missing namespace-end comments have been added throughout.
A number of diffs are just indentation-related (adjusting 1- or 3-
space indents to 2-space).
Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Does not add kNearest as a mip map mode yet.
Bug: skia:10344
Change-Id: Ida80cbf19e2b1eed5209d0680837fb45e54b4261
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Change-Id: Ia2cfbca8982b57399b6681cbb4501c2933ab4df7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304576
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Aligning with SkSamplingMode.
Bug: skia:10344
Change-Id: Ie303c3ca1d664d4c23f779b84c9a661076bd74d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303022
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Most of this CL is just noise (i.e., all the header changes) due to the
signature change. The 'discard' GM has some substantive changes but
that's about it.
Change-Id: I72011a442c149b5db93cf8decade6779be4f63d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296704
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit c80ee456ad.
fix: update flutter's gn file to add guard
Change-Id: Iac5171c8475d9a862d06255dab1c6f38f10de2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Also strengthens/adds some guarantees about this function:
* Always returns the same image if the original is texture-backed and
compatible with GrMipMapped (WRT HW MIP support)
* If a new texture backed image is returned it is always an uncached
texture that is not shared with another image or owned by an image
generator.
Adds a GrImageTexGenPolicy that allows control through image/bitmap
GrTextureProducers of whether a new texture must be made and whether
that texture should be budgeted or not.
Increases unit test coverage of this API.
Bug: skia:8669
Change-Id: Ifc0681856114a08fc8cfc57ca83d22efb1c1f166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274938
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The only thing that affects the view returned is whether it ought to
be MIP mapped or not. So don't take a whole GrSamplerState.
The view() function won't ever change the colortype so just query
GrTextureProducer rather than having view() return a tuple.
The rest is transitively reaching through callers and callees of
GrTextureProducer::view() to only pass filter or GrMipMapped instead of
GrSamplerState. Also, some params that indicate whether MIPs are
requested are changed from bool to GrMipMapped. And some minor style
stuff (mainly de-yoda-ifying GrMipMapped checks, using
GrSurfaceProxyView operator bool()).
Change-Id: Ia184aa793cf51d42642ea3bb0521ce06da2efb10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274205
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Originally there was a distinction WRT half pixel insetting, but as I
learned more about what the call sites expected the distinction was
erased. Callers with a SkIRect can just convert to SkRect.
Change-Id: Ib1e117baffdb532ba09a668da7f851d02c2c5206
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270941
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: I12ea00b35967f13e81410c584e34b62eea6c2ffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270445
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Support MIP map for all but kRepeat.
Update texel_subset_ GMs to exercise newly supported modes.
Also makes GrTextureEffect do shader wrap modes for rectangle/
external textures even when not subsetted.
Change-Id: Ie2d299106120b5c6cc40365e8f300cc426dd5489
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268163
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Draw placeholder gray rectangles rather than omitting cols/rows.
Swap x and y mode iteration so they correspond with GM layout.
Change-Id: I3c2d95bcd5d684f5a5a99cb677c326864e13f252
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270641
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The existing scale factor put the decal edge exactly on a pixel center
causing some jaggies as different row columns has slightly different
interpolated values and fell on different sides of the decal edge,
Change-Id: I396395f68366e3cfc3b0c0ce11466c43dd4e60ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268306
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
As it stands they're at integers and so snap differently on different
GPUs.
Change-Id: I80b955a728aa590af12d9307ba2c36731d333594
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268170
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Rename to texel_subset.
Test different x/y wrap modes.
Use a real image that is non-square.
Add dividers to group MakeTexelSubset() with Make() reference draw.
Use a smaller image, fewer matrices, and only one subset rect to
make room for the additional mode combinations.
Change-Id: I3fab54cb7f160b92c7e5192e64a8a09f5c837492
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>