Client code has been updated to call new version
Change-Id: Id7e18154fe273590f04435c936121b3a3e3665df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235317
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Client code has been updated
Change-Id: Ic6102effc63c0f4f00a47b8876107aa0b2306e32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235296
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Not currently used by any clients.
Change-Id: I21d554fb95ffef4f317945ab22c4cfb14fbb6b2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234660
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
With 462505f310 "include refresh" most of
the useful parts of the SkFontMetrics documentation were removed.
Restore the documentation and update it with the latest information.
Change-Id: I28c13bc194b53265818e31e7b26e93a390f6259c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234945
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I962e923a4994eb549a9c1002323f33d05b936b84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234912
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reinterprets the contents of an image as though they were in a
different color space. Helpful for tools and debug visualization.
Bug: chromium:795132 chromium:985500
Change-Id: Ia8739bbd73d72249b8bee9d51dfa11d560a2a1f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234328
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This also makes the isTexturable that takes a color explicitly called
isFormatTexturableAndUploadable. A lot of the uses of isConfigTexturable
were changed to the Uploadable version of the check, even though this is
not where we want to land in the long run. In the long run the uploadability
will be checked via calls to supportedWritePixelsColorType and all the
isTexturable calls should purely be about texturing. However, until those
changes land we keep it safe and keep the same functionality that
isConfigTexturable had by checking uploadability as well.
Bug: skia:6718
Change-Id: I3563f33f49811923da80e676fa3036ae46c4da70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234323
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Old version still exists until client code is migrated.
Change-Id: I087b6b977f586d334f9a20954e7ed7b5e4b7ea5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234579
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ie0af47ed842769a3f47056bb1d633c84fa4d06d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234329
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This is a reland of fe19203eb7
Original change's description:
> Initiate regeneration of mipmaps from proxy DAG land
>
> This allows us to resolve all the textures before executing a command
> buffer, rather than interrupting execution as is currently done in the
> GL backend.
>
> Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: Ic904d0b1bcb451bcb74cfae2204fb7297eaff108
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234016
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
These are meant to contrast MakeFromEncoded(), and emphasize that it is deferred/cached,
while the new methods are not.
Change-Id: I83ac22394cb14cdc84ff8507a514bf708734b84f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234476
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This is a stop gap. We should probably base the precision decision on the texture format.
Also removes all code used to add sampler precision to program keys. The precision that
was added to the key did not affect the generated GLSL.
Bug: skia:8863
Bug: skia:6718
Change-Id: Ibdb702e1aca5d48d83e2f24cb24010a0b7270871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234322
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is probably overkill but yields an officially thread-safe means of calling defaultBackendFormat.
Change-Id: Ibf344acf11102d938e335e9ea38bfaee575e00c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234324
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Previously YCbCr Vulkan samplers were supported only on Android for
external images, while Vulkan requires YCbCr sampler for I420 YUV image
formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
This CL:
- Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
- Updates GrVkYcbcrConversionInfo to add fFormat field and allow
fExternalFormat=0.
- Removes assertions format=VK_FORMAT_UNDEFINED for all images that
have ycbcr info.
Bug: chromium:981022
Change-Id: Id4d81b20d9fda4d9ad0831f77e6025eed3db2bfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233776
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
This reverts commit fe19203eb7.
Reason for revert: Turned a lot of bots red
Original change's description:
> Initiate regeneration of mipmaps from proxy DAG land
>
> This allows us to resolve all the textures before executing a command
> buffer, rather than interrupting execution as is currently done in the
> GL backend.
>
> Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com
Change-Id: Iaa8391b8fbd5a4f851ca41834c1dfeee4be6fedd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This allows us to resolve all the textures before executing a command
buffer, rather than interrupting execution as is currently done in the
GL backend.
Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Remove return statements immediately following SK_ABORTs.
Change-Id: I6446b6ba3a6fb272d84ea27f38cf366095cf801d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233565
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit cc4573dfed.
Reason for revert: Seems to be crashing in Win Intel vulkan bots
Original change's description:
> Enable YCbCr sampler support on platforms other than Android
>
> Previously YCbCr Vulkan samplers were supported only on Android for
> external images, while Vulkan requires YCbCr sampler for I420 YUV image
> formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
> VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
> This CL:
> - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
> VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
> - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
> fExternalFormat=0.
> - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
> have ycbcr info.
>
> Bug: chromium:981022
> Change-Id: I3989f72e918a257a081b81ae20429a6771229ad6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230918
> Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,sergeyu@chromium.org
Change-Id: Ia9c229fbec4cd397fb04304753fa49f34336ed3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:981022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233563
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Previously YCbCr Vulkan samplers were supported only on Android for
external images, while Vulkan requires YCbCr sampler for I420 YUV image
formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
This CL:
- Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
- Updates GrVkYcbcrConversionInfo to add fFormat field and allow
fExternalFormat=0.
- Removes assertions format=VK_FORMAT_UNDEFINED for all images that
have ycbcr info.
Bug: chromium:981022
Change-Id: I3989f72e918a257a081b81ae20429a6771229ad6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230918
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bugs:
morphology GM: Had swapped Erode and Dilate
imagefilterscropexpand GM: Was applying the filter to the wrong rectangle
imagefilterstransformed, filterfastbounds, et al GMs: The new
SkImageFilters::Image() factory had defaulted to using kNone for quality,
since it appeared to keep a 1-to-1 scale. However, it actually draws the
image from srcRect into the dstRect, mapped by the CTM, so if there's a
scaling factor in the CTM the filter no longer is 1-to-1 and kNone leads
to weird scaling artifacts. So switched back to the original kHigh default.
Change-Id: I30ee455008720048fb27eaed1c2c42915d222c97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232396
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:9281
Change-Id: I189dbf652580805641f8c4b9a6587cf15a9049dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231256
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is a more abstract representation of something that can
participate in the DAG by modifying a GrSurfaceProxy's pixels. This
will serve as the direct base class for future DAG participants that
aren't opLists, and help to eventually remove GrTextureOpList.
Bug: skia:
Change-Id: Ia903c0188e0f6a6602781b90ee8da87ba3cc13f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
In preparation for moving the filter-specific headers from include/effects and into src/effects/imagefilters, this exposes a more convenient API where all filters provided by Skia are accessible from the same factory.
It also only exposes the factories that take the shared enums (SkColorChannel, SkTileMode), so the per-filter enums can be phased out (SkBlurImageFilter::TileMode, etc.). It also accepts an SkIRect* instead of an SkImageFilter::CropRect* since all uses seem to be for integer rectangles and flags are either always on or always off. This will allow us to later remove the CropRect type.
Bug: skia:9280
Change-Id: I71f77ff44b573f87b837d6523b9eb565521f0f36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230876
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 0355f05b26.
Reason for revert: roll?
Original change's description:
> let color filters tell us their alpha format
>
> There are a bunch of native premul->premul color filters, and about an
> equal number of native unpremul->unpremul filters that all have roughly
> the same logic to interoperate with a premul color pipeline. I haven't
> seen anything that wants premul in and unpremul out or vice versa.
>
> (It's easy to find by grepping for ::unpremul.)
>
> This CL flags the natively unpremul color filters and centralizes the
> logic to handle premul interop. This mostly eliminates the need for
> SkColorFilter subclasses to know shaderIsOpaque, but not quite entirely.
> It's of course used in the centralized SkColorFilter::appendStages(),
> but is still also needed by any subclass that calls that, any subclass
> that composes other color filters. I've commented out any unused
> shaderIsOpaque arguments.
>
> In the future we could imagine handling this outside in a more
> sophisticated way, like eliding unnecessary alpha format conversions.
> We'd need to move this logic out of SkColorFilter::appendStages() to
> it's callers... the blitter, composing subclasses, and any other misc.
>
> Should be no diffs and no interesting perf change.
>
> I couldn't help but correct some misuse of "protected" where I was
> editing anyway. I'm feeling a mega CL coming...
>
> Change-Id: If3528820ca639357864b8b99c8fe11ab60c1ae0d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231465
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com
Change-Id: Ide8b887fe7ff445f503864ee935908bcb56f637e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231677
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit f4c5f63ab9.
Reason for revert: trying to revert my earlier CL. Sorry! I'll let you reland this one first and I'll rebase next time.
Original change's description:
> SkColorfilters::HSLAMatrix
>
> Introduce an SkColorFilter_Matrix flavor operating in HSLA space.
>
> (CPU-only for now)
>
> Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,brianosman@google.com,fmalita@chromium.org,reed@google.com
Change-Id: I6a4e85d3810e2ca30d072937c035c929917d36c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231678
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Introduce an SkColorFilter_Matrix flavor operating in HSLA space.
(CPU-only for now)
Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
There are a bunch of native premul->premul color filters, and about an
equal number of native unpremul->unpremul filters that all have roughly
the same logic to interoperate with a premul color pipeline. I haven't
seen anything that wants premul in and unpremul out or vice versa.
(It's easy to find by grepping for ::unpremul.)
This CL flags the natively unpremul color filters and centralizes the
logic to handle premul interop. This mostly eliminates the need for
SkColorFilter subclasses to know shaderIsOpaque, but not quite entirely.
It's of course used in the centralized SkColorFilter::appendStages(),
but is still also needed by any subclass that calls that, any subclass
that composes other color filters. I've commented out any unused
shaderIsOpaque arguments.
In the future we could imagine handling this outside in a more
sophisticated way, like eliding unnecessary alpha format conversions.
We'd need to move this logic out of SkColorFilter::appendStages() to
it's callers... the blitter, composing subclasses, and any other misc.
Should be no diffs and no interesting perf change.
I couldn't help but correct some misuse of "protected" where I was
editing anyway. I'm feeling a mega CL coming...
Change-Id: If3528820ca639357864b8b99c8fe11ab60c1ae0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231465
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Combine the GPU and Raster morph type and direction enums, and have the
morphology base class accept the type as an argument instead of a virtual.
Adds somewhat complex deserialization code to be backwards compatible with
the old erode and dilate create procs.
Also updates SkXfermodeImageFilter's implementation to be named with the
"Impl" suffix instead of _Base, and updates both filters to have the common
code layout for image filter implementations.
Change-Id: I5082914f9754c2be71becfceb0c7d9a8fd06f569
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231099
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Add weird color types that handle the swizzling.
Change-Id: Ie37a00eb877fe5e519f7498bf749e02a2f1dc204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230135
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:9280
Change-Id: Ice3624467f5e643f9d3d81da72d77911eeac963e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230198
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:9280
Change-Id: I638c2b3d34be2037648cf27bde933345f8abbd77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230126
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We can't remove the loopers themselves, as they are still used
by android and chrome (they just don't ever pass them to skia).
Eventually each of those clients will resolve this, but for now
we just keep the classes (and tests) in skia.
Bug: skia:4783
Change-Id: I5f507e6bb82280f2bc7c0b21eebe59c287aa9265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230579
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Bug: skia:9280
Change-Id: I6d40b83093d8a8e9e84bbe44d917d02dfde85877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230124
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Dawn doesn't support old-style combined texturesampler uniforms, so
they must be expressed as separate samplers and texture uniforms.
At the SkSL Type level, I've added a Texture2D type, and expressed
the Sampler2D (combined) type in terms of it. This ensures that we
emit only a single OpTypeImage for it in the SPIRV.
Eventually, all of the Texture types (1D, 3D, Rect) could be defined
and SamplerX could simply contain a reference to TextureX. I wanted to
float this idea with a single example for now (and since it's all that
the Dawn backend needs).
This also required adding a new "makeSampler2D" function to combine
them, which maps to OpSampledImage at the SPIR-V level.
Change-Id: Iaf33a6e7d339da415be6ea9a017340cb0ef3c1eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229417
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:9280
Change-Id: I1a1df193ce212300b7a84d2247fa9c63601c9446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230119
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
By making it in a more common header, this enum can be reused by the
SkDisplacementMapEffect.
Bug: skia:9280
Change-Id: Ia8352e0530f915cdad659c657bd86710226582b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230118
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This member variable is no longer used
TBR=bsalomon@google.com
Bug: skia:6718
Change-Id: I84680c8c3bc36eefa603f5be7f3c15b496a79948
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229478
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This CL is intended to further wean Ganesh off of using the GrBackendTexture's pixel config
TBR=bsalomon@google.com
Bug: skia:6718
Change-Id: Iedaa7811f9c4aac552f219c702627bc476325317
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228338
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This leaves just width, height, and GrPixelConfig. Once we remove the
latter we can replace GrSurfaceDesc with SkISize.
Also remove unused GrRenderTarget::overrideResolveRect
Also remove GrSurfaceProxy::Renderable and use GrRenderable instead.
Change-Id: I652fe6169a22ca33d199b144ec6385286ac07b5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228570
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
When Chrome has a LUM16F texture they tell Skia it is R16F. Although this has been working for them so far it causes trouble with some upcoming changes.
Change-Id: I2473f70e4f725128f143c2dfb08adb79f3c7c166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Adds the option to use a multisampled (or mixed sampled) atlas, and
uses the sample mask and stencil buffer instead of coverage counts.
Bug: skia:
Change-Id: I9fb76d17895ae25208124f6c27e37977ac31b5eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227428
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
While most callers of decomposeScale only depend on the scale factors
that are returned, image filter decomposition depends on the remaining
matrix as well. Hence, the following necessary updates to work with
the new behavior of decomposeScale:
* Update imagefilter DAG sample to reflect prescaling
* Correct embedded matrix in SkApplyCTMToFilter
* Add comment to clipRectBounds() clarifying coordinate spaces and image filters
But, we want to have decomposeScale using preScale() because it then
produces a remainder matrix that can be used as the transform for the
image filter draw, instead of wrapping the image filter in an
SkMatrixImageFilter as currently done by SkApplyCTMToFilter.
Bug: skia:7211
Change-Id: If14570afb4189cebc75f3815e8ccdde05cb074e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228438
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit 2f6c8af73a.
Reason for revert: Failing on some bots
Original change's description:
> Add Ganesh support for LUM16F
>
> When Chrome has a LUM16F texture they tell Skia it is R16F. Although this has been working for them so far it causes trouble with some upcoming changes.
>
> Change-Id: Ic2143ec69f33a17cb1cb64f6ebc39bffd94a5e68
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228557
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Ie52150f4f5255a2db697b9f0e810eff2042eadec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228560
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
When Chrome has a LUM16F texture they tell Skia it is R16F. Although this has been working for them so far it causes trouble with some upcoming changes.
Change-Id: Ic2143ec69f33a17cb1cb64f6ebc39bffd94a5e68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228557
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Changes the GrBackendSurface to not take it separately.
Change-Id: I5eb9684da1532907e7833e9d7835a74d1e71f5ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228396
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.
Change-Id: I443f3370522639e82f2fa0eebe6b206c372f13a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228137
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 9725638fb1.
Reason for revert: Chrome roll
Original change's description:
> Make rest of GrGpu::wrapBackend* methods take a GrColorType
>
> This CL is intended to further wean Ganesh off of using the GrBackendTexture's pixel config
>
> Bug: skia:6718
> Change-Id: I593c0c73922fb76045e379214e20adb1f17ea215
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227780
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: Id71acf1dec63c288a858fccd7109c84cf3cc6f0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228337
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I04493af0a6ce1425c4acf68365135722dd3c218b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227857
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This CL is intended to further wean Ganesh off of using the GrBackendTexture's pixel config
Bug: skia:6718
Change-Id: I593c0c73922fb76045e379214e20adb1f17ea215
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227780
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit 6cebea42a8.
Reason for revert: breaking google3 roll
Original change's description:
> First draft of Dawn backend: clears are working.
>
> First draft of (mostly stubbed-out) GrDawnGpu.
> Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
> First draft of DawnTestContext.
> First draft of psuedo-fences for Dawn, implemented with MapReadAsync.
>
> Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
> Commit-Queue: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,senorblanco@chromium.org
Change-Id: Ie494b5a403e8537c6539551533ae8b9156e90a61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228120
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I7fd3a8f6c02217d011f353ef602718a537bb87b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228116
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.
Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is the last surface desc flag, so remove flags from GrSurfaceDesc.
Bug: skia:6718
Change-Id: Id3ed66b161289927b62f40bfb1f6482cf544deda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227858
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Removes some usage of GrSurfaceDesc.
Bug: skia:6718
Change-Id: Icc4f93aba0e5c49a801b4c7bbfcba76a6e30c538
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227776
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
1) It only applies when a texture is created, not when recycled from cache
2) It is all textures or none, not a flag GrSurfaceDesc
3) It is implemented by GrGpu clearing the texture after creation if
such a thing is supported in underlying API. Otherwise, GrResourceProvider
must provide pre-zeroed mip levels.
4) Works for MIP mapped textures (all levels without initial data are cleared)
This could cause performance regressions in WebGL until we re-add the
ability to clear using glCear() in GL. Doing that requires making the "can
clear using GrGpu" caps query be per-format. Deferring doing that until
GrPixelConfig work is farther along.
Bug: skia:6718
Change-Id: I234715b9faaf61e8b44d54464497a17cd553585d
start
Change-Id: Ib84a8c3ece010cc3164b18895107e78484cbf76b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226977
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Found with a GCC compiler warning.
Seems like a sane idea to keep Slots fully initialized.
Change-Id: I7a7bd4ccc4a6800d6e262aa7c616d3cab36d74dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227121
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Also rename from GrGLSizedInternalFormat since the compressed formats
aren't really sized internal formats.
Change-Id: I8744f1f4b8156300ab69d89066b44913bce120a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226956
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
As the powers-of-2 get larger the coarse binning can burn a lot of VRAM.
Granted it isn't the best metric but, with this CL, the number of textures created and scratch textures reused remains unchanged when running the GMs.
Change-Id: I84abbbae0ed01aabb387671b5ee0e4fcdb82b671
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226226
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The switch to GrColorType does mean that we can no longer represent compressed backend formats in the Mock backend surfaces.
This will require a Chrome CL before it can land in Skia.
TBR=bsalomon@google.com
Change-Id: Ie4e2d4826f960664a21d3de79933eb1cb5d06896
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225538
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is a temporary change to allow us to switch GrMockOptions to be based on GrColorType. Chrome sets up their FakeWebGraphicsContext3DProvider in this manner.
TBR=bsalomon@google.com
Change-Id: I68c6b78aeb0395e1783c7acf1dbdbd028373433c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225720
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>