1Skia Graphics Release Notes 2 3This file includes a list of high level updates for each milestone release. 4 5Milestone 127 6------------- 7 * SkSL now properly recognizes the types `uvec2`, `uvec3` or `uvec4`. 8 9 Unsigned types are not supported in Runtime Effects, as they did not exist in GLSL ES2; however, 10 SkSL should still recognize these typenames and reject them if they are used in a program. 11 That is, we should not allow `uvec3` to be used as a variable or function name. We will now properly 12 detect and reject this as an error. 13 * The following deprecated fields have been removed from `GrVkBackendContext`: 14 - `fMinAPIVersion`. Use `fMaxAPIVersion` instead. 15 - `fInstanceVersion`. Use `fMaxAPIVersion` instead. 16 - `fFeatures`. Use `fDeviceFeatures` or `fDeviceFeatures2` instead. 17 - `fOwnsInstanceAndDevice`. No replacement, as it had no effect. 18 19 `GrVkBackendContext` is now an alias for `skgpu::VulkanBackendContext`. Clients should use the latter, as the former will be eventually removed. 20 * SkShaderMaskFilters and SkTableMaskFilters have been deprecated. They will be removed entirely in an upcoming Skia release. 21 22* * * 23 24Milestone 126 25------------- 26 * Skia's internal array class (`skia_private::TArray<T>`) now protects its unused capacity when 27 [Address Sanitizer (ASAN)](https://clang.llvm.org/docs/AddressSanitizer.html) is enabled. Code which 28 inadvertently writes past the end of a Skia internal structure is now more likely to trigger an ASAN 29 error. 30 * `SkFloat2Bits` and `SkBits2Float` have been removed from the Skia public headers. These were always 31 private API (since they lived in `/include/private`) but they had leaked into some example code, and 32 tended to be available once a handful of Skia headers were #included. 33 * SkSL now allows the ++ and -- operators on vector and matrix variables. 34 35 Previously, attempting to use these operators on a vector or matrix would lead to an error. This was 36 a violation of the GLSL expression rules (5.9): "The arithmetic unary operators negate (-), post- 37 and pre-increment and decrement (-- and ++) operate on integer or floating-point values (including 38 vectors and matrices)." 39 * `SkScalarIsFinite`, `SkScalarsAreFinite`, and `SkScalarIsNaN` have been removed from the Skia API. 40 These calls can be replaced with the functionally-equivalent `std::isfinite` and `std::isnan`. 41 * Clients can explicitly make a Ganesh GL backend for iOS with 42 `GrGLInterfaces::MakeIOS` from `include/gpu/ganesh/gl/ios/GrGLMakeIOSInterface.h` 43 * Clients can explicitly make a Ganesh GL backend for Mac with 44 `GrGLInterfaces::MakeMac` from `include/gpu/ganesh/gl/mac/GrGLMakeMacInterface.h` 45 * The following headers have been relocated (notice "ganesh" in the filepath): 46 - include/gpu/gl/egl/GrGLMakeEGLInterface.h -> include/gpu/ganesh/gl/egl/GrGLMakeEGLInterface.h 47 - include/gpu/gl/glx/GrGLMakeGLXInterface.h -> include/gpu/ganesh/gl/glx/GrGLMakeGLXInterface.h 48 - include/gpu/gl/epoxy/GrGLMakeEpoxyEGLInterface.h -> include/gpu/ganesh/gl/epoxy/GrGLMakeEpoxyEGLInterface.h 49 50* * * 51 52Milestone 125 53------------- 54 * The size of the GPU memory cache budget can now be queried using member `maxBudgetedBytes` of `skgpu::graphite::Context` and `skgpu::graphite::Recorder`. 55 * Added `skgpu::graphite::Context::maxTextureSize()`, which exposes the maximum 56 texture dimension supported by the underlying backend. 57 * Using a MTLBinaryArchive to pre-load the MSL shader cache is no longer 58 supported in Ganesh, and the fBinaryArchive member of GrMtlBackendContext 59 has been removed. 60 * The `sksl-minify` tool can now eliminate unnecessary braces. For instance, 61 given the following SkSL code: 62 63 ``` 64 if (condition) { 65 return 1; 66 } else { 67 return 2; 68 } 69 ``` 70 71 The minifier will now emit: 72 73 ``` 74 if(a)return 1;else return 2; 75 ``` 76 * Added `SkBitmap::setColorSpace`. This API allows the colorspace of an existing 77 `SkBitmap` to be reinterpreted. The pixel data backing the bitmap will be left 78 as-is. The colorspace will be honored when the bitmap is accessed via APIs which 79 support colorspace conversion, like `readPixels`. 80 * `SkDrawLooper` has been removed completely from Skia. It was previously deprecated. 81 * Metal-specific constructors and methods have been removed from `GrBackendFormat`, 82 `GrBackendTexture`, and `GrBackendRenderTarget` and moved to 83 `include/gpu/ganesh/mtl/GrMtlBackendSurface.h` 84 * By default, //modules/skottie and //modules/svg will use primitive text shaping. 85 Clients that wish to use harfbuzz/icu for more correct shaping will need to 86 use one of the builders and call `setTextShapingFactory` with a newly-created 87 `SkShapers::Factory` implementation during construction. 88 89 For ease of configuration, `modules/skshaper/utils/FactoryHelpers.h` can be used 90 to provide this, but only if the client is depending on the correct skshaper 91 and skunicode modules (which should set defines such as `SK_SHAPER_HARFBUZZ_AVAILABLE`). 92 93 For example `builder.setTextShapingFactory(SkShapers::BestAvailable())` will use 94 Harfbuzz or CoreText for shaping if they were compiled in to the clients binary. 95 96* * * 97 98Milestone 124 99------------- 100 * `SkColorFilter::filterColor` is now deprecated and will eventually be removed in favor of `filterColor4f`. 101 * The Perlin noise shaders (`MakeFractalNoise` and `MakeTurbulence`) will now properly rotate when 102 transformed. On raster surfaces, the performance of Perlin noise has also been significantly 103 improved. 104 * Graphite's `SkImages::WrapTexture` now takes an additional parameter that indicates whether 105 a mipmapped texture should be used as is or whether Graphite should generate the upper level 106 contents from the base level contents. 107 * `GrBackendSemaphore::initMetal`, `GrBackendSemaphore::mtlSemaphore`, and 108 `GrBackendSemaphore::mtlValue` have been replaced with `GrBackendSemaphores::MakeMtl`, 109 `GrBackendSemaphores::GetMtlHandle`, and `GrBackendSemaphores::GetMtlValue`, defined in 110 `include/gpu/ganesh/mtl/GrMtlBackendSemaphore.h` 111 * `GrDirectContext::MakeMetal` has been moved to `GrDirectContexts::MakeMetal`, located in 112 `include/gpu/ganesh/mtl/GrMtlDirectContext.h`. The APIs that passed in void* have been removed 113 in that change, so clients who use those need to create a `GrMtlBackendContext` themselves. 114 115 `include/gpu/mtl/GrMtlTypes.h` and `include/gpu/mtl/GrMtlBackendContext.h` have been relocated to 116 `include/gpu/ganesh/mtl/GrMtlTypes.h` and `include/gpu/ganesh/mtl/GrMtlBackendContext.h` 117 respectively. 118 * Added `SkCodecs::DeferredImage` which is similar to `SkImages::DeferredFromEncodedData` except it 119 allows the caller to pass in a `SkCodec` directly instead of depending on compiled-in codecs. 120 * The following SkShaper functions have been moved or deleted: 121 - SkShaper::MakePrimitive() -> SkShapers::Primitive() 122 - SkShaper::MakeShaperDrivenWrapper() -> SkShapers::HB::ShaperDrivenWrapper() 123 - SkShaper::MakeShapeThenWrap() -> SkShapers::HB::ShapeThenWrap() 124 - SkShaper::MakeShapeDontWrapOrReorder() -> SkShapers::HB::ShapeDontWrapOrReorder() 125 - SkShaper::MakeCoreText() -> SkShapers::CT::CoreText() 126 - SkShaper::Make() -> deleted, use one of the above directly, 127 - SkShaper::MakeSkUnicodeBidiRunIterator() -> SkShapers::unicode::BidiRunIterator() 128 - SkShaper::MakeBiDiRunIterator() -> deleted, use SkShapers::unicode::BidiRunIterator() or SkShapers::TrivialBiDiRunIterator() 129 - SkShaper::MakeIcuBiDiRunIterator() -> deleted, use SkShapers::unicode::BidiRunIterator() 130 - SkShaper::MakeSkUnicodeHbScriptRunIterator() -> SkShapers::HB::ScriptRunIterator() 131 - SkShaper::MakeHbIcuScriptRunIterator() -> SkShapers::HB::ScriptRunIterator() 132 - SkShaper::MakeScriptRunIterator() -> deleted, use SkShapers::HB::ScriptRunIterator() or SkShapers::TrivialScriptRunIterator 133 134 Additionally, two `SkShaper::shape` method overloads have been removed - clients now need to 135 specify all 10 arguments (although it is common to pass in nullptr for features). 136 * `SkStream::getData()` has been added as a virtual. Subclasses can implement this if it is efficient 137 to turn the underlying contents into an SkData (e.g. SkStreamMemory). `SkStreamMemory::asData()` 138 has been renamed to `getData()` as a result of this change and will be removed in a future release. 139 140* * * 141 142Milestone 123 143------------- 144 * When `SkCodec::SelectionPolicy::kPreferStillImage` is passed to `SkWuffsCodec`/`SkGifDecoder` 145 creation, and the input stream cannot be rewound, the resulting `SkWuffsCodec` will no longer copy 146 the stream. Because it will now have a non-seekable stream, it no longer supports `getFrameCount`, 147 which will now simply report `1`, or `getFrameInfo`, which is useful only for animation anyway. 148 Chromium uses `kPreferStillImage`, simply because it is the default, but will not be affected by 149 this change because it always supplies a seekable stream. 150 * A `kDefault_Flag = 0` value has been added to the `SkSurfaceProps::Flags` enum. This is just a 151 self-documenting zero-value that aims to improve code readability, e.g.: 152 153 ``` 154 // The two lines below are equivalent. 155 156 SkSurfaceProps(/* surfaceFlags= */ 0, kRGB_H_SkPixelGeometry); 157 158 SkSurfaceProps(SkSurfaceProps::kDefault_Flag, kRGB_H_SkPixelGeometry); 159 ``` 160 * In native builds the default use of `wgpu::Device::Tick` to detect GPU progress has been updated 161 to use `wgpu::Instance::ProcessEvents` instead. To simulate the non-yielding behavior of `Context` 162 in native `DawnBackendContext::fTick` may still be explicitly set to `nullptr`. 163 * The Vulkan backend for both Ganesh and Graphite will now invoke an optional client-provided callback 164 function when a `VK_ERROR_DEVICE_LOST` error code is returned from the Vulkan driver. Additional 165 debugging information will be passed from the driver to this callback if the `VK_EXT_device_fault` 166 extension is supported and enabled. 167 168 This optional callback can be be provided via the `fDeviceLostContext` and `fDeviceLostProc` fields 169 on `GrVkBackendContext` (Ganesh) and `VulkanBackendContext` (Graphite). 170 * `SkAnimCodecPlayer` has been removed from the public API. 171 * `SkCodec::getImage()` will now respect the origin in the metadata (e.g. Exif metadata that 172 rotates the image). This may mean callers who provide an SkImageInfo may need to rotate it, 173 e.g. via `SkPixmapUtils::SwapWidthHeight`. 174 175* * * 176 177Milestone 122 178------------- 179 * `graphite::BackendTexture` can be created from a `WGPUTextureView`. This comes with a 180 perfomance cost when reading pixels to or writing pixels from the CPU. An intermediate 181 WGPUTexture is created to support these operations. However, this enables creating 182 `SkSurface` or `SkImage` from `wgpu::SwapChain::GetCurrentTextureView`. 183 * SkSL now properly reports an error if the body of a for-loop declares a variable which shadows the 184 for-loop induction variable. 185 186 In other words, SkSL code like this will now generate an error: 187 188 ``` 189 for (int x = 0; x < 10; ++x) { 190 int x = 123; // error: symbol 'x' was already defined 191 } 192 ``` 193 194 Previously, the declaration of `x` would be allowed, in violation of the GLSL scoping rules (6.3): 195 "For both for and while loops, the sub-statement does not introduce a new scope for variable names." 196 * The PDF code now directly depends on Skia's JPEG decoder and encoder. The build 197 time shims to avoid using a JPEG decoder and encoder have been removed. In the 198 future these may be made optional again by allowing the user to supply them at 199 runtime. 200 * SkSL variables declared inside of a switch statement will now properly fall out of scope after the 201 closing brace of the switch-block, as one would expect. 202 203 In other words, SkSL code like this will now generate an error: 204 205 ``` 206 switch (n) { 207 case 1: 208 int x = 123; 209 } 210 return x; // error: unknown identifier 'x' 211 ``` 212 213 Previously, `x` would remain accessible after the switch's closing brace. 214 * `skgpu::graphite::ContextOptions::fNeverYieldToWebGPU` is removed. Instead, yielding in an 215 Emscripten build is controlled by installing a client-provided function on 216 `skgpu::graphite::DawnBackendContext`. The client may install a function that uses Asyncify to 217 yield to the main thread loop. If no function is installed then the Context has the same 218 restrictions as with the old option. 219 220 In native builds the default is to use `wgpu::Device::Tick` to detect GPU progress. To simulate the 221 non-yielding behavior of `Context` in native `DawnBackendContext::fTick` may be explicitly set to 222 to `nullptr`. 223 224 By externalizing the use of Asyncify it is possible to build Skia without generated JS 225 code that relies on Asyncify. 226 * SkSL will now properly report an error if a function contains a top-level variable with the same 227 name as a function parameter. SkSL intends to match the scoping rules of GLSL, in particular: "A 228 function’s parameter declarations and body together form a single scope nested in the global scope." 229 230 A program like this will now be rejected: 231 232 ``` 233 void func(int var) { 234 int var; 235 } 236 237 error: 2: symbol 'var' was already defined 238 int var; 239 ^^^^^^^ 240 ``` 241 * `SkFont::getTypeface()` will no longer return a nullptr to indicate "the default typeface". 242 If left unspecified, SkFonts will use an empty typeface (e.g. no glyphs). 243 * `SkFontMgr::RefDefault()` has been deleted. Clients should instantiate and manage their own 244 `SkFontMgr`s and use them to explicitly create `SkTypeface`s 245 * `GrGLMakeNativeInterface` has been deprecated and will eventually be removed. Clients should 246 be calling the precise factory (e.g. `GrGLInterfaces::makeGLX`) they need. Some APIs that currently allow a nullptr GrGLInterface will be stop allowing this (e.g. `GrDirectContexts::MakeGL`). 247 * `SkFontArguments::Palette::Override`'s index member is changing from an `int` 248 type to `uint16_t` to make the size exact and remove an unneeded 249 signedness. This avoids platform/compiler-specific size ambiguiity and more 250 closely matches the OpenType CPAL table. 251 252* * * 253 254Milestone 121 255------------- 256 * `SkFontConfigInterface::makeTypeface` now has a required `sk_sp<SkFontMgr>` parameter to be used for 257 parsing the font data from the stream. 258 * `skgpu::graphite::ContextOptions` has a new field, `fNeverYieldToWebGPU`. This new option 259 is only valid with the Dawn backend. It indicates that `skgpu::graphite::Context` should never yield 260 to Dawn. In native this means `wgpu::Device::Tick()` is never called. In Emscripten it 261 means `Context` never yields to the main thread event loop. 262 263 When the option is enabled, `skgpu::SyncToCpu::kYes` is ignored when passed to 264 `Context::submit()`. Moreover, it is a fatal error to have submitted but unfinished 265 GPU work before deleting `Context`. A new method, `hasUnfinishedGpuWork()` is added 266 to `Context` that can be used to test this condition. 267 268 The intent of this option is to be able to use Graphite in WASM without requiring Asyncify. 269 * Deprecated `GrMipmapped` and `GrMipMapped` alias have been removed in favor of `skgpu::Mipmapped`. 270 * Harfbuzz-backed SkShaper instances will no longer treat a null SkFontMgr as meaning "use the 271 default SkFontMgr for fallback" and instead will *not* do fallback for glyphs missing from a font. 272 * `GrBackendSemaphore::initVk` and `GrBackendSemaphore::vkSemaphore` have been replaced with 273 `GrBackendSemaphores::MakeVk` and `GrBackendSemaphores::GetVkSemaphore`, defined in 274 `include/gpu/ganesh/vk/GrVkBackendSemaphore.h` 275 * The Vulkan-specific methods and constructor of `MutableTextureState` have been deprecated in favor 276 of those found in `include/gpu/vk/VulkanMutableTextureState.h`. 277 278* * * 279 280Milestone 120 281------------- 282 * `SkBase64.h` has been removed from the public API. 283 * `SkFont::refTypefaceOrDefault` and `SkFont::getTypefaceOrDefault()` have been removed from the 284 public API. 285 * `GrBackendSemaphore::initGL` and `GrBackendSemaphore::glSync` have been removed 286 from the public API. 287 * For Graphite, `SkImages::AdoptTextureFrom` has been renamed to `SkImages::WrapTexture` to 288 better reflect what is happening to the passed in texture. 289 * `GrSurfaceInfo.h` has been removed from the public API. 290 * SkMesh now allows shaders, color filters, and blenders to be used in the mesh-fragment program. 291 Pass in effects using the `children` parameter of `SkMesh::Make` or `SkMesh::MakeIndexed`. 292 For a working example, see `gm/mesh.cpp`. 293 * The behavior for SkPicture deserialization (via SkReadBuffer) to fallback to 294 `SkImages::DeferredFromEncodedData` when `SkDeserialImageProc` is not set or returns null is 295 deprecated and will be removed shortly. 296 297 `SkDeserialImageFromDataProc` has been added to SkDeserialProcs to allow clients to *safely* 298 avoid a copy when decoding image data in SkPictures. 299 300 `SkDeserialImageProc` now takes in an optional AlphaType which can be used to override the 301 AlphaType that an image was serialized with, if desired. 302 * skgpu::graphite::RecorderOptions::kDefaultRecorderBudget is now a static data member. 303 * `SkTypeface::MakeFromName`, `SkTypeface::MakeFromFile`, `SkTypeface::MakeFromStream`, and 304 `SkTypeface::MakeFromData` are deprecated and will be removed eventually. These should be replaced 305 with calls directly to the SkFontMgr that can provide the appropriate typefaces. 306 307 `SkTypeface::MakeDefault()` has been deprecated. Soon it will return an empty typeface and 308 eventually be removed. 309 310 `SkTypeface::UniqueID()` has been removed - clients should use the method instead of this static 311 function. 312 * `GrDirectContext::MakeVulkan...` has been moved to `GrDirectContexts::MakeVulkan...` which are defined 313 in `include/gpu/ganesh/vk/GrVkDirectContext.h` 314 * The various GPU wait calls on GrDirectContext, SkSurface, and GrVkSecondaryCBContext which take 315 a client supplied semaphore, now only guarantee to block the gpu transfer and fragment stages 316 instead of all gpu commands. This shouldn't affect any client since client provided gpu resources 317 (e.g. textures) are only ever used by Skia in the fragment stages. 318 319* * * 320 321Milestone 119 322------------- 323 * Added new `SkImageFilters::Crop(SkRect, SkTileMode, sk_sp<SkImageFilter>)` image filter effect that crops the output from the wrapped SkImageFilter and optionally applies the SkTileMode when sampling outside of the crop rect. 324 * `GrDirectContext::MakeGL...` has been moved to `GrDirectContexts::MakeGL...` which are defined 325 in `include/gpu/ganesh/gl/GrGLDirectContext.h` 326 * `GrDirectContext::submit` and `GrDirectContext::flushAndSubmit` calls now take a GrSyncCpu enum 327 instead of a error-prone boolean. 328 329 Similarly, calls to `GrDirectContext::performDeferredCleanup` and 330 `GrDirectContext::purgeUnlockedResources` take a GrPurgeResourceOptions enum. 331 * SkMeshSpecification no longer rejects fragment programs which include `uniform shader`, `uniform 332 colorFilter` or `uniform blender`. However, `SkMesh::Make` will not allow the mesh specification 333 to be used. 334 * `SkMesh::Make` and `SkMesh::MakeIndexed` now require a span of child effects as a new parameter. 335 This functionality is still a work in progress; for now, always pass an empty span. 336 * `sksl-minify` can now minify SkMesh programs. Pass `--meshvert` or `--meshfrag` to indicate 337 that the input program is an SkMesh vertex or fragment program. When minifying a mesh program, 338 you must supply `struct Varyings` and `struct Attributes` which correspond to the 339 SkMeshSpecification; these will be eliminated from the minified output. 340 * `SkMergePathEffect`, `SkMatrixPathEffect`, `SkStrokePathEffect`, and 341 `SkStrokeAndFillPathEffect` have been removed from the public API. 342 These effects can be implemented on the SkPath objects directly using other means and clients 343 will likely find performance boosts by doing so. 344 * `SkShadowFlags` are now visible in `include/utils/SkShadowUtils.h` 345 * `SkPicture`s no longer serialize `SkImage`s to PNG encoded data by default. Clients who wish to 346 preserve this should make use of `SkSerialProcs`, specifically the `fImageProc` field. 347 348* * * 349 350Milestone 118 351------------- 352 * `GrDirectContext::flush` variants now expect a SkSurface pointer only, not 353 an sk_sp<SkSurface>. 354 * `SkImage::makeWithFilter` has been deprecated. It has been replaced with three factory functions: 355 356 Ganesh: `SkImages::MakeWithFilter(GrRecordingContext*, ...);` -- declared in SkImageGanesh.h 357 358 Graphite: `SkImages::MakeWithFilter(skgpu::graphite::Recorder*, ...);` -- declared in Image.h 359 360 Raster: `SkImages::MakeWithFilter(...);` -- declared in SkImage.h 361 362 The new factories require the associated backend context object be valid. For example, the Graphite version will return nullptr if it isn't supplied with a `Recorder` object. 363 * SkSL and Runtime Effects are no longer optional features of Skia; they are always available. 364 The GN flag `skia_enable_sksl` has been removed. 365 * SkSL will now properly reject sequence-expressions containing arrays, or sequence-expressions 366 containing structures of arrays. Previously, the left-side expression of a sequence was checked, 367 but the right-side was not. In GLSL ES 1.0, and therefore in SkSL, the only operator which is 368 allowed to operate on arrays is the array subscript operator (`[]`). 369 * The Dawn backend for Ganesh has been removed. Dawn will continue to be supported in the 370 Graphite backend. 371 * We plan to remove SkTime.h from the public API. As of now, SkAutoTime has been 372 deleted as it was unused. 373 * Vulkan-specific calls are being removed from GrBackendSurface.h. Clients should use the 374 equivalents found in `include/gpu/ganesh/vk/GrVkBackendSurface.h"` 375 376* * * 377 378Milestone 117 379------------- 380 * `SkGraphics::AllowJIT()` has been removed. It was previously deprecated (and did nothing). 381 * New methods are added to `SkImage`, `SkSurface`, and `skgpu::graphite::context` named 382 `asyncRescaleAndReadPixeksYUVA420`. These function identically to the existing 383 `asyncRescaleAndReadPixelsYUV420` methods but return a fourth plane containing alpha at full 384 resolution. 385 * `SkAutoGraphics` was removed. This was a helper struct that simply called `SkGraphics::Init`. 386 Any instance of `SkAutoGraphics` can be replaced with a call to `SkGraphics::Init`. 387 * `SkCanvas::flush()` has been removed. It can be replaced with: 388 ``` 389 if (auto dContext = GrAsDirectContext(canvas->recordingContext())) { 390 dContext->flushAndSubmit(); 391 } 392 ``` 393 394 `SkCanvas::recordingContext()` and `SkCanvas::recorder()` are now const. They were implicitly const 395 but are now declared to be such. 396 * `SkCanvas::recordingContext()` and `SkCanvas::recorder()` are now const. 397 They were implicitly const but are now declared to be such. 398 * `SkMesh::MakeIndexBuffer`, `SkMesh::CopyIndexBuffer`, `SkMesh::MakeVertexBuffer`, and 399 `SkMesh::CopyVertexBuffer` have been moved to the `SkMeshes` namespace. Ganesh-specific versions 400 have been created in `include/gpu/ganesh/SkMeshGanesh.h`. 401 * SkPath now enforces an upper limit of 715 million path verbs. 402 * `SkRuntimeEffectBuilder::uniforms()`, `SkRuntimeEffectBuilder::children()`, 403 `SkRuntimeShaderBuilder::makeShader()`, `SkRuntimeColorFilterBuilder::makeColorFilter()`, and 404 `SkRuntimeBlendBuilder::makeBlender()` are now marked as const. No functional changes internally, 405 just making explicit what had been implicit. 406 * `SkRuntimeEffect::makeImage` and `SkRuntimeShaderBuilder::makeImage` have been removed. 407 * GL-specific calls have been removed from GrBackendSurface.h. Clients should use the 408 equivalents found in `include/gpu/ganesh/gl/GrGLBackendSurface.h` 409 * A new `SkTiledImageUtils` namespace (in `SkTiledImageUtils.h`) provides `DrawImage` and `DrawImageRect` methods that directly mirror `SkCanvas'` `drawImage` and `drawImageRect` calls. 410 411 The new entry points will breakup large `SkBitmap`-backed `SkImages` into tiles and draw them if they would be too large to upload to the gpu as one texture. 412 413 They will fall through to their `SkCanvas` correlates if tiling isn't needed or possible. 414 415* * * 416 417Milestone 116 418------------- 419 * `SkPromiseImageTexture` has been removed from the public API, as well as 420 `SkImages::PromiseTextureFrom` and `SkImages::PromiseTextureFromYUVA`, public consumers of that 421 data type. 422 * `SkDeferredDisplayList`, `SkDeferredDisplayListRecorder`, and `SkSurfaceCharacterization` have 423 been removed from the public API. 424 * The intermediate color computed by `SkBlenders::Arithmetic` is now always clamped to between 0 and 1 (inclusive), and then `enforcePremul` is applied when that parameter is true. 425 * Added a new public type, `SkColorTable`, to own the lookup tables passed into `SkColorFilters::Table`, which allows clients and the returned `SkColorFilter` to share the table memory instead of having to duplicate it in any wrapper types that lazily create Skia representations. 426 * The deprecated `SkImageFilters::Magnifier` factory that did *not* take a lens bounds parameter has been removed. 427 * `SkImageFilters::RuntimeShader` has variations that take a maximum sample radius, which is used to provide padded input images to the runtime effect so that boundary conditions are avoided. 428 * `SkImageFilters::AlphaThreshold` has been removed. Its only use was in ChromeOS and that usage has been replaced with a `Blend(kSrcIn, input, Picture(region))` filter graph to achieve the same effect. 429 * The single-argument `SkImageFilters::Image(sk_sp<SkImage>)` factory is removed. The `SkSamplingOptions` to use when rendering the image during filtering must be provided. `SkFilterMode::kLinear` is recommended over the previous bicubic default. 430 * `GrTextureGenerator` now has a subclass `GrExternalTextureGenerator` which can be subclassed by 431 clients and used with `SkImages::DeferredFromTextureGenerator` in order to create images from 432 textures that were created outside of skia. `GrTextureGenerator` has been removed from the public 433 API in favor of `GrExternalTextureGenerator`. 434 * SkPoint now uses float for its coordinates. This starts the process of removing SkScalar from Skia. 435 SkScalar was a typedef for float, so this has no practical impact on code that uses Skia. 436 * `SkSamplingOptions(SkFilterMode)` and `SkSamplingOptions(SkCubicResampler)` are no longer marked `explicit` so that samplings can be created inline more succinctly. 437 * `SkShaders` is now a namespace (was previously a non-constructable class with only static 438 functions). `SkPerlinNoiseShader::MakeFractalNoise` and `SkPerlinNoiseShader::MakeTurbulence` have 439 been moved to the `SkShaders` namespace and `SkPerlinNoiseShader` (the public non-constructable 440 class) has been slated for moving into private internals of Skia. 441 There are no functional differences in the moved functions, however the change of some #includes 442 in `include/core/SkShader.h`, `include/effects/SkGradientShader.h`, and 443 `include/effects/SkPerlinNoiseShader.h` may cause clients who were depending on the transitive 444 dependencies to now fail to compile. 445 * The following methods have been removed from SkSurface and relocated to other methods/functions: 446 - `SkSurface::asImage` -> `SkSurfaces::AsImage` (include/gpu/graphite/Surface.h) 447 - `SkSurface::flushAndSubmit` -> `GrDirectContext::flushAndSubmit` 448 - `SkSurface::flush` -> `GrDirectContext::flush` 449 - `SkSurface::makeImageCopy` -> `SkSurfaces::AsImageCopy` (include/gpu/graphite/Surface.h) 450 - `SkSurface::resolveMSAA` -> `SkSurfaces::ResolveMSAA()` (include/gpu/ganesh/SkSurfaceGanesh.h) 451 452 Additionally, `SkSurface::BackendSurfaceAccess` is now in the `SkSurfaces` namespace. 453 * The deprecated `SkTableColorFilter` class and its methods have been removed. Clients should use 454 `SkColorFilters::Table` and `SkColorFilters::TableARGB` (defined in include/core/SkColorFilter.h). 455 * The `SkYUVAPixmapInfo::SupportedDataTypes(const GrImageContext&)` constructor has been removed from 456 the public API. 457 458* * * 459 460Milestone 115 461------------- 462 * Clients now need to register codecs which Skia should use to decode raw bytes. For example: 463 `SkCodecs::Register(SkJpegDecoder::Decoder());`. Skia still provides many supported formats 464 (see `include/codec/*Decoder.h`). Clients are free to specify their own, either supplementing 465 the existing set or using a custom version instead of the one previously provided by default 466 by Skia. See `SkCodecs::Decoder` for the necessary data to provide when using a custom decoder 467 (in `include/codec/SkCodec.h`). 468 469 To ease the transition, Skia will continue (for a short while) to register codecs unless 470 `SK_DISABLE_LEGACY_INIT_DECODERS` is defined. 471 * `SkDrawable::newPictureSnapshot` is removed. Instead, call `SkDrawable::makePictureSnapshot`. 472 The old method returned a bare (but ref-counted) pointer, which was easy for clients to get wrong. 473 The new method returns an `sk_sp<SkPicture>`, which is easier to handle, and consistent with the 474 rest of skia. 475 * `SkGraphics::PurgePinnedFontCache()` has been added to allow clients to 476 explicitly trigger `SkStrikeCache` purge checks for `SkStrikes` with 477 pinners. Defining `SK_STRIKE_CACHE_DOESNT_AUTO_CHECK_PINNERS` in the 478 user configuration now disables automatic purge checking of strikes with 479 pinners. 480 * The following SkImage factories have been moved to `include/gpu/graphite/Image.h`: 481 - `SkImage::MakeGraphiteFromBackendTexture -> SkImages::AdoptTextureFrom` 482 - `SkImage::MakeGraphiteFromYUVABackendTextures -> SkImages::TextureFromYUVATextures` 483 - `SkImage::MakeGraphiteFromYUVAPixmaps -> SkImages::TextureFromYUVAPixmaps` 484 - `SkImage::MakeGraphitePromiseTexture -> SkImages::PromiseTextureFrom` 485 486 The SkImage method `makeTextureImage` has been moved to `SkImages::TextureFromImage`. 487 488 `SkImage::RequiredImageProperties` has been renamed to `SkImage::RequiredProperties`, 489 with fMipmapped turned into a boolean instead of the GPU enum. 490 * `SkImage::makeColorSpace` and `SkImage::makeColorTypeAndColorSpace` now take a `GrDirectContext` 491 as the first parameter. This should be supplied when dealing with texture-backed images and can 492 be `nullptr` otherwise. 493 * `SkImage::subset` now takes a `GrDirectContext*` as its first parameter (this can be `nullptr` for 494 non-gpu backed images. Images which are backed by a codec or picture will not be turned into a GPU 495 texture before being read. This should only impact picture-backed images, which may not be read 496 correctly if the picture contain nested texture-backed images itself. To force a conversion to 497 a texture, clients should call `SkImages::TextureFromImage`, passing in the image, and then call 498 subset on the result. Documentation has been clarified that `SkImage::subset` will return a raster- 499 backed image if the source is not backed by a texture, and texture-otherwise. 500 501 `SkImages::SubsetTextureFrom` has been added to subset an image and explicitly return a texture- 502 backed image. This allows some optimizations, especially for large images that exceed a maximum 503 texture size of a GPU. 504 505 `SkImage::makeRasterImage` and `SkImage::makeNonTextureImage` now take a `GrDirectContext*` which 506 clients should supply for reading-back pixels from texture-backed images. 507 * `SkImageFilters::Image` now returns a non-null image filter if the input `sk_sp<SkImage>` is 508 null or the src rectangle is empty or does not overlap the image. The returned filter evaluates to 509 transparent black, which is equivalent to a null or empty image. Previously, returning a null image 510 filter would mean that the dynamic source image could be surprisingly injected into the filter 511 evaluation where it might not have been intended. 512 * `SkImageFilters::Magnifier(srcRect, inset)` is deprecated. These parameters do not provide enough 513 information for the implementation to correctly respond to canvas transform or participate accurately 514 in layer bounds planning. 515 516 A new `SkImageFilters::Magnifier` function is added that takes additional parameters: the outer 517 lens bounds and the actual zoom amount (instead of inconsistently reconstructing the target zoom 518 amount, which was the prior behavior). Additionally, the new factory accepts an SkSamplingOptions 519 to control the sampling quality. 520 * `SkImageFilters::Picture` now returns a non-null image filter if the input `sk_sp<SkPicture>` is 521 null. The returned filter evaluates to transparent black, which is equivalent to a null or empty 522 picture. Previously, returning a null image filter would mean that the dynamic source image could 523 be surprisingly injected into the filter evaluation where it might not have been intended. 524 * `SkImageFilters::Shader` now returns a non-null image filter if the input `sk_sp<SkShader>` is 525 null. The returned filter evaluates to transparent black, which is equivalent to a null or empty 526 shader. Previously, returning a null image filter would mean that the dynamic source image could 527 be surprisingly injected into the filter evaluation where it might not have been intended. 528 * `SkImageGenerator::MakeFromEncoded` has been removed from the public API. 529 `SkImage::DeferredFromEncoded` or `SkCodec::MakeFromData` should be used instead. 530 * `SkSurface::getBackendTexture` and `SkSurface::getBackendRenderTarget` have been deprecated and 531 replaced with `SkSurfaces::GetBackendTexture` and `SkSurfaces::GetBackendRenderTarget` respectively. 532 These are found in `include/gpu/ganesh/SkSurfaceGanesh.h`. The supporting enum `BackendHandleAccess` 533 has also been moved to `SkSurfaces::BackendHandleAccess` as an enum class, with shorter member 534 names. 535 * SkSurface factory methods have been moved to the SkSurfaces namespace. Many have been renamed to 536 be more succinct or self-consistent. Factory methods specific to the Ganesh GPU backend are 537 defined publicly in include/gpu/ganesh/SkSurfaceGanesh.h. The Metal Ganesh backend has some 538 specific factories in include/gpu/ganesh/mtl/SkSurfaceMetal.h. 539 * SkSurface::MakeFromAHardwareBuffer -> SkSurfaces::WrapAndroidHardwareBuffer 540 * SkSurface::MakeFromBackendRenderTarget -> SkSurfaces::WrapBackendRenderTarget 541 * SkSurface::MakeFromBackendTexture -> SkSurfaces::WrapBackendTexture 542 * SkSurface::MakeFromCAMetalLayer -> SkSurfaces::WrapCAMetalLayer 543 * SkSurface::MakeFromMTKView -> SkSurfaces::WrapMTKView 544 * SkSurface::MakeGraphite -> SkSurfaces::RenderTarget 545 * SkSurface::MakeGraphiteFromBackendTexture -> SkSurfaces::WrapBackendTexture 546 * SkSurface::MakeNull -> SkSurfaces::Null 547 * SkSurface::MakeRaster -> SkSurfaces::Raster 548 * SkSurface::MakeRasterDirect -> SkSurfaces::WrapPixels 549 * SkSurface::MakeRasterDirectReleaseProc -> SkSurfaces::WrapPixels 550 * SkSurface::MakeRasterN32Premul -> SkSurfaces::Raster (clients should make SkImageInfo) 551 * SkSurface::MakeRenderTarget -> SkSurfaces::RenderTarget 552 553* * * 554 555Milestone 114 556------------- 557 * The CPU backend for Runtime Effects has been rewritten. This may cause slight differences in 558 performance and image quality when runtime effects are painted onto a raster surface. 559 * Gradient shaders support interpolation in several different color spaces, by passing a 560 `SkGradientShader::Interpolation` struct to the shader factory functions. The color space and 561 hue method options are based on the CSS Color Level 4 specfication: 562 * https://www.w3.org/TR/css-color-4/#interpolation-space 563 * https://www.w3.org/TR/css-color-4/#hue-interpolation 564 * `SkImages::GetBackendTextureFromImage` has been renamed `SkImages::MakeBackendTextureFromImage`. 565 * `SkImage::getBackendTexture()` has been moved to `SkImages::GetBackendTextureFromImage()` in 566 `SkImageGanesh.h`. 567 * `SkImage::makeTextureImage()` has been moved to `SkImages::TextureFromImage()` in 568 `SkImageGanesh.h`. 569 * `SkImage::flush()` and `SkImage::flushAndSubmit()` has been moved to 570 `GrDirectContext::flush()` and `GrDirectContext::flushAndSubmit()` in `SkImageGanesh.h`. 571 * `SkSurfaceProperties::kAlwaysDither_Flag` added to globally enable dithering for a specific 572 `SkSurface` target. 573 * `SkSerialImageProc` and `SkDeserialImageProc` are now also used to encode/decode the SkMipmap 574 layers of certain SkImages. 575 * The defines `SK_USE_WIC_ENCODER` and `SK_USE_CG_ENCODER` have been removed, as well as the code 576 to use the Windows Image Codecs and Core Graphics as a way to have Skia encode files in PNG, 577 JPEG, and WEBP format. Skia continues to support use of the NDK codecs on Android, as well 578 as using external C++ libraries (e.g. libpng, libjpeg-turbo) to *encode* images. WIC and CG 579 are still used to *decode* images on the appropriate platforms. 580 * `SkImage::encodeToData` has been deprecated. Clients should use `refEncodedData` if the image 581 was from an encoded bytestream or one of `SkPngEncoder::Encode`, `SkJpegEncoder::Encode`, 582 `SkWebpEncoder::Encode` directly. 583 * The following defines no longer do anything. GN clients should instead set the provided 584 arguments (from gn/skia.gni) as necessary: 585 - `SK_ENCODE_PNG` -> `skia_use_libjpeg_turbo_encode` 586 - `SK_ENCODE_JPEG` -> `skia_use_libpng_encode` 587 - `SK_ENCODE_WEBP` -> `skia_use_libwebp_encode` 588 Other clients should make sure the appropriate `*EncoderImpl.cpp` files from `src/encode` are 589 included in the build. 590 * `SkImageEncoder` has been removed. Clients should use one of `SkPngEncoder::Encode`, 591 `SkJpegEncoder::Encode` or `SkWebpEncoder::Encode` directly. 592 * `SkImageGenerator` has a new subclass `GrTextureGenerator` which can be used if clients want to 593 provide specialized ways of making Ganesh texture-backed Images. 594 * `SkImageGenerator::MakeFromPicture` has been removed from the public API. Clients should be 595 drawing the picture directly instead of turning it into an image first. 596 597 598* * * 599 600Milestone 113 601------------- 602 * The define SK_SUPPORT_GPU is now SK_GANESH. It is no longer detected as a 0 or 1, but 603 as the absence or presence of that define. As a result, it defaults to off (not defined) if 604 not defined (SK_SUPPORT_GPU would default to SK_SUPPORT_GPU=1 if not defined). 605 * SkStrSplit is no longer part of the public API. 606 * SkImage::encodeToData now takes a GrDirectContext. The versions which do not have that are 607 deprecated and will be removed at some point. 608 * SkMatrix::Scale, preScale, setScale, etc. with any scale factor of 0 correctly no longer 609 return true from rectStaysRect(), consistent with rectStaysRect() implying a non-zero scale. 610 * `SkImage::CompressionType` has been renamed to `SkTextureCompressionType` and moved to 611 `include/core/SkTextureCompressionType.h` 612 * `SkEncodedImageFormat.h` and `SkPngChunkReader.h` are now in include/codec 613 * `SkICC.h` is now in include/encode 614 * SkImage factory methods have been moved to the SkImages namespace. Many have been renamed to 615 be more succinct or self-consistent. Factory methods specific to the Ganesh GPU backend are 616 defined publicly in include/gpu/ganesh/SkImageGanesh.h. 617 * SkImage::MakeBackendTextureFromSkImage -> SkImages::GetBackendTextureFromImage 618 * SkImage::MakeCrossContextFromPixmap -> SkImages::CrossContextTextureFromPixmap 619 * SkImage::MakeFromAdoptedTexture -> SkImages::AdoptTextureFrom 620 * SkImage::MakeFromBitmap -> SkImages::RasterFromBitmap 621 * SkImage::MakeFromCompressedTexture -> SkImages::TextureFromCompressedTexture 622 * SkImage::MakeFromEncoded -> SkImages::DeferredFromEncodedData 623 * SkImage::MakeFromGenerator -> SkImages::DeferredFromGenerator 624 * SkImage::MakeFromPicture -> SkImages::DeferredFromPicture 625 * SkImage::MakeFromRaster -> SkImages::RasterFromPixmap 626 * SkImage::MakeFromTexture -> SkImages::BorrowTextureFrom 627 * SkImage::MakeFromYUVAPixmaps -> SkImages::TextureFromYUVAPixmaps 628 * SkImage::MakeFromYUVATextures -> SkImages::TextureFromYUVATextures 629 * SkImage::MakePromiseTexture -> SkImages::PromiseTextureFrom 630 * SkImage::MakePromiseYUVATexture -> SkImages::PromiseTextureFromYUVA 631 * SkImage::MakeRasterCopy -> SkImages::RasterFromPixmapCopy 632 * SkImage::MakeRasterData -> SkImages::RasterFromData 633 * SkImage::MakeRasterFromCompressed -> SkImages::RasterFromCompressedTextureData 634 * SkImage::MakeTextureFromCompressed -> SkImages::TextureFromCompressedTextureData 635 To help in the transition, there is some temporary bridge code (e.g. aliases) which will 636 eventually be removed. 637 638* * * 639 640Milestone 112 641------------- 642 * SkImage::CubicResampler has been removed. Clients should use SkCubicResampler from 643 include/core/SkSamplingOptions.h instead (the former was an alias for the latter). 644 * SkRuntimeColorFilterBuilder has been added. This is a helper class for setting up color filters, 645 analogous to SkRuntimeShaderBuilder. 646 * SkShaders::CoordClamp has been added. It clamps the coords passed used with another 647 shader to a rectangle. 648 * SkRandom is no longer part of the public API. 649 * SK_ARRAY_COUNT is no longer part of the public API. Clients should use std::size. 650 * SK_SCALAR_IS_FLOAT is not set anymore. SkScalar is always a float (and has been since 2017). 651 * sk_realloc_throw (an internal API) now frees up memory when 0 is passed in as the size. 652 This should have no user-facing impacts for clients which use the default allocator, but 653 requires custom allocators to also implement this change. 654 * The particles module has been deleted. 655 * SkJpegEncoder::Options includes a parameter for XMP metadata. 656 * SkJpegEncoder includes support for encoding SkYUVAPixmaps directly. 657 658* * * 659 660Milestone 111 661------------- 662 * SkToBool is no longer part of the public API. 663 * A float version of SkCanvas::saveLayerAlpha now exists as SkCanvas::saveLayerAlphaf. 664 * SkAbs32 and SkTAbs are no longer part of the public API. 665 * SkAlign2, SkAlign4, SkAlign8, SkIsAlign2, SkIsAlign4, SkIsAlign8, SkAlignPtr, SkIsAlignPtr, 666 and SkAlignTo are no longer part of the public API. 667 * GrContextOptions::fSkipGLErrorChecks no longer stops checking shader compilation and program 668 linking success. 669 * SkBackingFit is no longer part of the public API. 670 * SkBudgeted was moved from include/core/SkTypes.h to include/gpu/GpuTypes.h and moved into the 671 skgpu namespace. 672 * include/gpu/GrConfig.h has been removed; its contents were folded into other files. 673 * SkLeftShift is no longer part of the public API. 674 * SK_MaxS32 and related constants are no longer part of the public API. 675 * include/core/SkMath.h is no longer part of the public API. 676 677* * * 678 679Milestone 110 680------------- 681 * SkParsePath::ToSVGString now returns the string, rather than modifying a passed-in string. 682 * Removed previously deprecated SkImageFilters::Paint factory. Use SkImageFilters::Shader instead. 683 * SkMesh::Make and SkMesh::MakeIndexed now return a SkMesh and error message string. 684 * SkPaint::getFillPath has been replaced with skpathutils::FillPathWithPaint from 685 include/core/SkPathUtils.h. The functionality should be the same. 686 687* * * 688 689Milestone 109 690------------- 691 * SkMesh vertex and fragment main() signatures have changed. See docs on SkMeshSpecification. 692 * Added SkImage::RescaleMode::kLinear so that the async rescale/readback APIs can scale in a 693 single step no matter the total scale factor (faster but lower quality than kRepeatedLinear). 694 * SkMesh buffer factories added that make copies of CPU-backed buffers. 695 * A utility for minifying Runtime Effect code has been added to Skia. Add the gn argument 696 "skia_compile_modules = true" to your gn args, and a new utility called "sksl-minify" will be 697 compiled as part of your Skia build. Run the command: 698 `skia-minify output-file.sksl input-file.sksl` 699 to write a minified version of the runtime shader "input-file.sksl" into a file named 700 "output-file.sksl". By default, sksl-minify expects a shader, but you can also pass command 701 line options `--colorfilter` or `--blender` if your program is a color-filter or a blender. 702 A compile error will be printed to stdout if an error is found in the program. 703 * The order of SkShader local matrix concatenation has been reversed. See skbug.com/13749 704 * PromiseImages have been added to Graphite. This supports both volatile and non-volatile Promise Images. 705 See the comment for SkImage::MakeGraphitePromiseTexture for more details. 706 * Graphite has loosened the immutability requirements of SkImages - through a new SkSurface API and careful 707 synchronization, clients can now mutate the backend object backing an SkImage. The new API consists of 708 SkSurface::asImage and SkSurface::makeImageCopy. We have a document that covers the expected use cases and 709 the synchronization required for each one. 710 711* * * 712 713Milestone 108 714------------- 715 * SkShader::asAGradient() has been removed. 716 * SkMesh and SkMeshSpecification has separate sk_sp and bare ptr getters for ref counted types. 717 * Add support for specifying a custom ICC profile to SkJpegEncoder, SkPngEncoder, and 718 SkWebpEncoder. 719 720* * * 721 722Milestone 107 723------------- 724 * Exported SkColor4f::toBytes_RGBA() and SkColor4f::FromBytes_RGBA. 725 * SkWebpEncoder: Added support for animated WebP image encoding. 726 * SkRuntimeEffect shader effects were inadvertently allowing functions with the signature 727 `half4 main(float2 coords, half4 color)`. This was disallowed at Milestone 87, but the 728 restriction was inadvertently relaxed in later milestones. Going forward, we will only 729 accept a shader signature of `half4 main(float2 coords)`. 730 731* * * 732 733Milestone 106 734------------- 735 * sk_sp is marked with the [[clang::trivial_abi]] attribute where supported. 736 * SkMesh API: Allows a user to draw a vertex mesh with custom attributes and 737 varyings using SkSL. Mesh data (vertex and index) can be created on a 738 GrDirectContext to avoid re-uploading data per draw. Currently does not 739 work with SkPicture or any backend but GPU. 740 * Added SkColorFilters::Blend(const SkColor4f&, sk_sp<SkColorSpace>, SkBlendMode) to 741 complement the existing SkColorFilters::Blend(SkColor, SkBlendMode) factory. 742 * The experimental C API was removed. 743 * Added support for AVIF decoding using libavif. 744 745* * * 746 747Milestone 104 748------------- 749 * New functions SkBitmap::getColor4f and SkPixmap::getColor4f return float colors. 750 * SkRuntimeEffect takes and returns a const SkData. 751 * SkRasterHandleAllocator::MakeCanvas now takes optional SkSurfaceProps. 752 * SkImage::MakeFromPicture and SkImageGenerator::MakeFromPicture now take an optional 753 SkSurfaceProps to use when rasterizing the picture. 754 * SkRuntimeEffect::Uniform now stores the uniform name as a string_view, rather than a 755 SkString. Related methods SkRuntimeEffect::findUniform and SkRuntimeEffectBuilder::uniform 756 also take std::string_view instead of const char*. 757 * SkRuntimeEffect::Child now stores the child name as a string_view, rather than a SkString. 758 Related methods SkRuntimeEffect::findChild and SkRuntimeEffectBuilder::child also take 759 std::string_view instead of const char*. Also, SkImageFilters::RuntimeShader now takes the 760 child name(s) as std::string_view instead of const char*. 761 * skcms.h has been relocated to //modules/skcms/skcms.h (was //include/third_party/skcms/skcms.h) 762 * New functions SkCanvas::getBaseProps and SkCanvas::getTopProps; SkCanvas::getBaseProps is a 763 direct replacement for the (now deprecated) SkCanvas::getProps function, while getTopProps is 764 a variant that returns the SkSurfaceProps that are active in the current layer. 765 * New function SkEventTracer::newTracingSection(const char* name) enables splitting traces up 766 into different sections for a selection of backend tracing frameworks (Perfetto, SkDebugf). 767 768* * * 769 770Milestone 103 771------------- 772 * SkSamplingOptions now includes anisotropic filtering. Implemented on GPU only. 773 * SkBitmap::clear and SkBitmap::clearColor take in SkColor4fs 774 775* * * 776 777Milestone 102 778------------- 779 * Add glGetFloatv and glSamplerParameterf to GrGLInterface. 780 * GrGLCreateNativeInterface is removed. Use GrGLMakeNativeInterface. 781 * GrContextOptions::fSharpenMipmappedTextures is removed. MIP LOD is now always 782 biased on the GPU backend. The CPU backend implementation is modified to match 783 this behavior. 784 * Passing SkCanvas::kStrict_SrcRectConstraint disables mipmapping. The old behavior differed 785 between GPU and CPU. CPU always computed a new set of mipmap based on the subset. GPU restricted 786 the sampling coordinates to the subset in the base level but upper level pixels that map to 787 pixels outside the subset in the base level were still used. To get the previous CPU behavior 788 use SkImage::makeSubset() to make a subset image and draw that. The previous GPU behavior is 789 similar, though not exactly, equivalent to making a mipmapped image shader from the original 790 image and applying that to a rectangle. 791 * Fully disable experimental support for HW tessellation shaders. 792 GrContextOptions::fEnableExperimentalHardwareTessellation is ignored and behaves as if it is 793 false. The optimized path renderer no longer requires hardware tessellation at all, and 794 is automatically enabled when drawing to an SkSurface created with MSAA, or when 795 GrContextOptions::fInternalMultisampleCount is set to a non-zero value. 796 797* * * 798 799Milestone 101 800------------- 801 * Add maxSurfaceSampleCountForColorType(SkColorType ct) in GrContextThreadSafeProxy 802 * Enums SkAlphaType and SkColorType are broken out into their own header files in include/core/ 803 804* * * 805 806Milestone 100 807------------- 808 * Skia now requires C++17 and the corresponding standard library (or newer). 809 * Skia on iOS now requires iOS 11 to build; earlier versions of iOS do not support C++17. 810 * The skstd::string_view and skstd::optional Skia classes have been replaced with the C++17 native 811 std::string_view and std::optional. 812 * Added SkSurface::resolveMSAA api to force Skia to resolve MSAA draws. Useful for when 813 Skia wraps a client's texture as the resolve target. 814 * All of the `makeShader` functions associated with `SkRuntimeEffect` no longer take an 815 `isOpaque` parameter. These functions will now make a best effort to determine if your 816 shader always produces opaque output, and optimize accordingly. If you definitely want your 817 shader to produce opaque output, do so in the shader's SkSL code. This can be done by adjusting 818 any `return` statement in your shader with a swizzle: `return color.rgb1;`. 819 https://review.skia.org/506462 820 * SkRSXform is now exported to DLL/.so files. 821* * * 822 823Milestone 99 824------------ 825 * Added two new intrinsic functions to SkSL for use in runtime effects: 826 vec3 toLinearSrgb(vec3 color) 827 vec3 fromLinearSrgb(vec3 color) 828 These convert RGB color values between the working color space (the color space of the 829 destination surface) and a known, fixed color space. `toLinearSrgb` converts a color to the 830 sRGB color gamut, with a linear transfer function. `fromLinearSrgb` converts a color from that 831 same color space. These are helpful for effects that need to work in a specific color space, or 832 want to apply effects (like lighting) that work best in a linear color space. 833 Note that if the destination surface has no color space (color space is `nullptr`), these 834 intrinsics will do no conversion, and return the input color unchanged. 835 https://review.skia.org/481416 836 * Added a new variant of SkImageFilters::RuntimeShader that supports multiple child nodes. 837 https://review.skia.org/489536 838 * Add the ability to specify palette overrides in SkFontArguments. Implemented 839 for the FreeType-backed SkFontMgrs. 840 841* * * 842 843Milestone 98 844------------ 845 * The following functions and methods are not defined in SkSurface when SK_SUPPORT_GPU is 0: 846 MakeFromBackendTexture, MakeFromBackendRenderTarget, MakeRenderTarget, 847 getBackendTexture, getBackendRenderTarget, replaceBackendTexture. flush() with parameters 848 was removed as well. These were all no-ops anyway when just the CPU backend was compiled in 849 (noting that flush() and flushAndSubmit() are still no-ops on the CPU backend). 850 * GrBackendSemaphore only includes methods that match the GPU backend that Skia was compiled for. 851 For example, initVulkan and vkSemaphore are not defined unless the Vulkan backend is compiled 852 into Skia. 853 * Surfaces and images are now limited to just under 2GB of total size. Previously, larger images 854 could be created, but the CPU backend would fail to index them correctly. 855 * SkCanvas::drawVertices and SkCanvas::drawPatch variants that did not take SkBlendMode are 856 removed. 857 * SkImageFilters::RuntimeShader is a new public API that enables adding RuntimeShaderEffects into 858 image filter graph. 859 * SkImage::makeRawShader is a new public API that creates "raw" image shaders. makeRawShader 860 functions like SkImage::makeShader, but for images that contain non-color data. This includes 861 images encoding things like normals, material properties (eg roughness), heightmaps, or any 862 other purely mathematical data that happens to be stored in an image. These types of images are 863 useful with some programmable shaders (ie SkRuntimeEffect). 864 Raw image shaders work like regular image shaders (including filtering and tiling), with a few 865 major differences: 866 - No color space transformation is ever applied (the color space of the image is ignored). 867 - Images with an alpha type of kUnpremul are not automatically premultiplied. 868 - Bicubic filtering is not supported. If SkSamplingOptions::useCubic is true, these factories 869 will return nullptr. 870 * Removed SkCanvas::markCTM and SkCanvas::findMarkedCTM. These were created to be used with other 871 features that have since been deleted, so they served no purpose. 872 * Added limited JPEGXL support. 873 874* * * 875 876Milestone 97 877------------ 878 * Added basic support for vulkan DRM modifiers. All of these are treated as read only textures 879 internally (versus querying specific modifier support). Clients can either pass a flag to Vulkan 880 GrBackendFormat to say it uses modifiers or pass the VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT 881 to a GrBackendTexture via the GrVkImageInfo struct. 882 * The following functions and methods are not defined in SkImage when SK_SUPPORT_GPU is 0: 883 MakeTextureFromCompressed, MakeFromTexture, MakeFromCompressedTexture, 884 MakeCrossContextFromPixmap, MakeFromAdoptedTexture, MakeFromYUVATextures, 885 MakeFromYUVAPixmaps, MakePromiseTexture, MakePromiseYUVATexture, MakeBackendTextureFromSkImage, 886 flush, flushAndSubmit, getBackendTexture, makeTextureImage. 887 These were all no-ops anyway when just the CPU backend was compiled in. 888 889* * * 890 891Milestone 96 892------------ 893 * SkRuntimeEffect no longer clamps the RGB values of an effect's output to the range 0..A. 894 This makes it easier to use a hierarchy of SkSL shaders where intermediate values do not 895 represent colors but are, for example, non-color inputs to a lighting model. 896 http://review.skia.org/452558 897 898* * * 899 900Milestone 95 901------------ 902 * Minimum supported iOS raised from 8 to 11. Skia may build back to iOS 9 but versions older 903 than 11 are not tested. Community contributions to support versions 9 and 10 of iOS may be 904 considered, but they may not be complex as they cannot be tested. 905 906* * * 907 908Milestone 94 909------------ 910 * Metal backend has been changed to track command buffer resources manually 911 rather than using retained resources. 912 https://review.skia.org/432878 913 914 * Added virtual onResetClip() to SkCanvas for Android Framework, to emulate the soon-to-be-removed 915 expanding clip ops guarded by SK_SUPPORT_DEPRECATED_CLIPOPS. 916 https://review.skia.org/430897 917 918 * Removed SK_SUPPORT_DEPRECATED_CLIPOPS build flag. Clips can only be intersect and difference. 919 https://review.skia.org/436565 920 921 * There is a new syntax for invoking (sampling) child effects in SkSL. Previously, children 922 (shaders, colorFilters, blenders) were invoked using different overloads of `sample`. That 923 syntax is deprecated (but still supported). Now, the child behaves like an object, with a method 924 name `eval`. The arguments to these `eval` methods are the same as the arguments in the old 925 `sample` intrinsics. For example: 926 // Old syntax: 927 sample(shader, xy) 928 sample(colorFilter, color) 929 sample(blender, srcColor, dstColor) 930 // New syntax: 931 shader.eval(xy) 932 colorFilter.eval(color) 933 blender.eval(srcColor, dstColor) 934 https://review.skia.org/444735 935 936* * * 937 938Milestone 93 939------------ 940 * Removed SkPaint::getHash 941 https://review.skia.org/419336 942 943 * Removed SkShaders::Lerp. It was unused (and easy to replicate with SkRuntimeEffect). 944 https://review.skia.org/419796 945 946 * The default value of GrContextOptions::fReduceOpsTaskSplitting is now enabled. 947 https://review.skia.org/419836 948 949 * Removed SkMatrix44 950 951* * * 952 953Milestone 92 954------------ 955 * Hides SkPathEffect::computeFastBounds() from public API; external subclasses of SkPathEffect 956 must implement onComputeFastBounds() but can return false to signal it's not computable. 957 https://review.skia.org/406140 958 959 * Add SkM44::RectToRect constructor (SkM44's equivalent to SkMatrix::RectToRect) 960 https://review.skia.org/402957 961 962 * Metal support has been removed for versions of iOS older than 10.0 and MacOS older than 10.14. 963 https://review.skia.org/401816 964 965 * Removed custom attributes from SkVertices and the corresponding `varying` feature from 966 SkRuntimeEffect. 967 https://review.skia.org/398222 968 969 * Dropped support for mixed samples. Mixed samples is no longer relevant for Ganesh. DMSAA and the 970 new Ganesh architecture both rely on full MSAA, and any platform where mixed samples is 971 supported will ultimately not use the old architecture. 972 973 * SkRuntimeEffect::Make has been removed. It is replaced by MakeForShader and MakeForColorFilter. 974 These functions do stricter error checking on the SkSL, to ensure it is valid for a particular 975 stage of the Skia pipeline. 976 https://review.skia.org/402156 977 978* * * 979 980Milestone 91 981------------ 982 * The SkSL DSL API has been moved into public headers, although it is still under active 983 development and isn't quite ready for prime time yet. 984 https://review.skia.org/378496 985 986 * Skia's GPU backend no longer supports NVPR. Our more recent path renderers are more 987 performant and are not limited to nVidia hardware. 988 989 * SkRuntimeEffect now supports uniforms of type int, int2, int3, and int4. Per the OpenGL ES 990 Shading Language Version 1.00 specification, there are few guarantees about the representation 991 or range of integral types, and operations that assume integral representation (eg, bitwise), 992 are not supported. 993 https://review.skia.org/391856 994 995 * SkRuntimeEffect requires that 'shader' variables be declared as 'uniform'. The deprecated 996 syntax of 'in shader' is no longer supported. 997 https://review.skia.org/393081 998 999* * * 1000 1001Milestone 90 1002------------ 1003 * Renamed use of sk_cf_obj in external Metal types to sk_cfp. 1004 https://review.skia.org/372556 1005 1006 * GrDirectContext::ComputeImageSize() is removed. Use SkImage::textureSize() instead. 1007 https://review.skia.org/368621 1008 https://review.skia.org/369317 1009 https://review.skia.org/371958 1010 1011 * Remove SkImageFilter::MakeMatrixFilter as it was unused and replaced with 1012 SkImageFilters::MatrixTransform. 1013 https://review.skia.org/366318 1014 1015 * Refactored particle system to use a single code string containing both Effect and Particle code. 1016 Uniform APIs are now shared for all program entry points, and no longer prefixed with 'Effect' 1017 or 'Particle'. For example, instead of `SkParticleEffect::effectUniformInfo` and 1018 `SkParticleEffect::particleUniformInfo`, there is just `SkParticleEffect::uniformInfo`. 1019 1020 * Remove SkImageFilter::CropRect from the public API as it's no longer usable. All factories 1021 work with 'SkRect', 'SkIRect', or nullable pointers to 'Sk[I]Rect'. 1022 https://review.skia.org/361496 1023 1024 * Remove deprecated SkImageFilter factory functions and supporting types. All default-provided 1025 SkImageFilters are now only constructed via 'include/effects/SkImageFilters.h' 1026 https://review.skia.org/357285 1027 1028 * Added SkRuntimeEffect::makeImage() to capture the output of an SkRuntimeEffect in an SkImage. 1029 https://review.skia.org/357284 1030 1031 * Updated SkRuntimeEffect::Make() to take an Options struct. It also now returns a Results struct 1032 instead of a tuple. 1033 https://review.skia.org/363785 1034 https://review.skia.org/367060 1035 1036 * Changed SkRuntimeEffect::Varying to have lower-case member names, with no 'f' prefix. 1037 https://review.skia.org/365656 1038 1039 * Changed SkRuntimeEffect::Uniform to have lower-case member names, with no 'f' prefix. 1040 https://review.skia.org/365696 1041 1042 * Deprecate (and ignore) SkAndroidCodec::ExifOrientation 1043 https://review.skia.org/344763 1044 1045 * Fix several minor issues in lighting image filters: 1046 - The spotlight falloff exponent is no longer clamped to [1, 128]. SVG 1.1 requires the specular 1047 lighting effect's exponent (shininess) to be clamped; not the spotlight's falloff. Any such 1048 parameter clamping is the client's responsibility, which makes Skia's lighting effect easily 1049 adaptable to SVG 1.1 (clamp exponent) or SVG 2 (no clamp). 1050 - Fix spotlight incorrectly scaling light within the cone angle. 1051 - Move saturation of RGBA to after multiplying lighting intensity with the lighting color, which 1052 improves rendering when diffuse and specular constants are greater than 1. 1053 https://review.skia.org/355496 1054 1055 * SkDeferredDisplayListRecorder::makePromiseTexture has moved to SkImage::MakePromiseTexture. 1056 New code should use the new entry point – migration CLs will be coming soon. 1057 https://review.skia.org/373716 1058 1059* * * 1060 1061Milestone 89 1062------------ 1063 1064 * Removed SkYUVAIndex and SkYUVASizeInfo. These were no longer used in any 1065 public APIs. 1066 https://review.skia.org/352497 1067 1068 * Numerous changes to SkRuntimeEffect, aligning the capabilities and restrictions with 1069 The OpenGL ES Shading Language 1.00 (aka, the shading language of OpenGL ES2 and WebGL 1.0). 1070 All built-in functions from sections 8.1 through 8.6 implemented & tested on all backends. 1071 Removed types and features that require newer versions of GLSL: 1072 https://review.skia.org/346657 [Non-square matrices] 1073 https://review.skia.org/347046 [uint, short, ushort, byte, ubyte] 1074 https://review.skia.org/349056 [while and do-while loops] 1075 https://review.skia.org/350030 [Bitwise operators and integer remainder] 1076 1077 * Add SkShadowUtils::GetLocalBounds. Generates bounding box for shadows 1078 relative to path. 1079 https://review.skia.org/351922 1080 1081 * Removed SkPerlinNoiseShader::MakeImprovedNoise. 1082 https://review.skia.org/352057 1083 1084 * Removed deprecated version of MakeFromYUVATextures. Use the version 1085 that takes GrYUVABackendTextures instead. 1086 https://review.skia.org/345174 1087 1088 * SkAnimatedImage: Always respect exif orientation 1089 Replace SkPixmapPriv::ShouldSwapWidthHeight with 1090 SkEncodedOriginSwapsWidthHeight. 1091 https://review.skia.org/344762 1092 1093 * Add kDirectionalLight_ShadowFlag support. If enabled, light position represents 1094 a vector pointing towards the light, and light radius is blur radius at elevation 1. 1095 https://review.skia.org/321792 1096 1097 * Support GL_LUMINANCE8_ALPHA8 textures. These can be used with GrBackendTexture APIs 1098 on GrDirectContext and as planes of YUVA images via GrYUVABackendTextures. 1099 https://review.skia.org/344761 1100 1101 * Removed previously deprecated SkImage::MakeFromYUVATexturesCopyToExternal. 1102 https://review.skia.org/342077 1103 1104 * Add versions of GrDirectContext::createBackendTexture and updateBackendTexture 1105 that take a GrSurfaceOrigin. The previous versions are deprecated. 1106 https://review.skia.org/341005 1107 1108 * Remove support for deprecated kDontClipToLayer_SaveLayerFlag in SkCanvas::SaveLayerRec 1109 https://review.skia.org/339988 1110 1111 * Expose more info in SkCodec::FrameInfo 1112 https://review.skia.org/339857 1113 1114 * Added dither control to the SkImageFilters::Shader factory. 1115 https://review.skia.org/338156 1116 1117 * Add MTLBinaryArchive parameter to GrMtlBackendContext. This allows 1118 Skia to cache PipelineStates in the given archive for faster 1119 shader compiles on future runs. The client must handle loading and 1120 saving of the archive. 1121 https://review.skia.org/333758 1122 1123 * Deprecated enum SkYUVAInfo::PlanarConfig has been removed. 1124 https://review.skia.org/334161 1125 1126 * Deprecated SkImage factories have been removed from 1127 SkDeferredDisplayListRecorder. 1128 1129 * The following YUV image factories have been removed: 1130 SkImage::MakeFromYUVTexturesCopyWithExternalBackend 1131 SkImage::MakeFromNV12TexturesCopyWithExternalBackend 1132 Replacement pattern outlined below. 1133 1) Make image using MakeFromYUVATextures 1134 2) Make a SkSurface around result texture using SkSurface::MakeFromBackendTexture 1135 3) surface->getCanvas()->drawImage(image, 0, 0); 1136 4) surface->flushAndSubmit() 1137 5) Optional: SkImage::MakeFromBackendTexture() to use as SkImage. 1138 https://review.skia.org/334596 1139 1140 * Added a new interface for GrDirectContext creation in Metal, using 1141 a new struct called GrMtlBackendContext. The previous interface taking 1142 a MTLDevice and MTLCommandQueue is deprecated. 1143 https://review.skia.org/334426 1144 1145 * SkCanvas::flush has been deprecated. 1146 1147* * * 1148 1149Milestone 88 1150------------ 1151 1152 * SkYUVAInfo now has separate enums for division of channels among planes and 1153 the subsampling. The previous combined enum, PlanarConfig, is deprecated. 1154 https://review.skia.org/334102 1155 1156 * Simplified SkDeferredDisplayListRecorder promise image API. Removed "release" 1157 callback and renamed "done" callback to "release". The new "release" proc can 1158 be null. Added a new SkYUVAInfo-based factory for YUVA promise texture images 1159 and deprecated the old SkYUVAIndex-based one. 1160 https://review.skia.org/331836 1161 https://review.skia.org/333519 1162 1163 * Limit the types and intrinsics supported in SkRuntimeEffect to GLSL ES 1.00 1164 https://review.skia.org/332597 1165 1166 * Add AVIF support to SkHeifCodec. 1167 1168 * Add support for creating SkSurfaceCharacterizations directly for use by a 1169 GrVkSecondaryCBDrawContext. 1170 https://review.skia.org/331877 1171 1172 * Removed SkSurfaceProps::kLegacyFontHost_InitType, SkFontLCDConfig, and related code. 1173 The default pixel geometry for SkSurfaceProps is now kUnknown instead of kRGB_H. 1174 The removal was guarded by the SK_LEGACY_SURFACE_PROPS build flag which was later removed. 1175 https://review.skia.org/322490 1176 https://review.skia.org/329364 1177 1178 * Legacy 8-bit YUV interface removed from SkImageGenerator. Use more flexible SkYUVAPixmaps- 1179 based interface instead. 1180 https://review.skia.org/327917 1181 1182 * New variant of SkImage::MakeFromYUVATextures. Takes a new type GrYUVATextures 1183 which wraps an SkYUVAInfo and compatible set of GrBackendTextures. The provides 1184 a more complete and structured specification of the planar configuration. Previous 1185 version is deprecated. 1186 Already deprecated MakeFromYUVATexturesCopyToExternal added to replace other deprecated 1187 APIs. It's not recommended that clients use this and instead use the pattern described 1188 in the API comment. 1189 https://review.skia.org/317762 1190 https://review.skia.org/329956 1191 1192 * Add field to GrContextOptions to disable mipmap support even if the backend 1193 supports it. 1194 1195 * SkTPin() removed from public API. 1196 1197 * Add new SkImageFilters::Blend factory function, in place of the now deprecated 1198 SkImageFilters::Xfermode factory function. Behavior is identical, but name better matches 1199 conventions in SkShader and SkColorFilter. 1200 https://review.skia.org/324623 1201 1202 * SkImageFilters::Foo() factory functions now accept SkIRect, SkRect, and optional SkIRect* or 1203 SkRect*, instead of previously just the optional SkIRect*. Internally, the crop rects are stored 1204 as floats to allow for fractional crops to be defined in the local coordinate system (before 1205 transformation by the canvas matrix). 1206 https://review.skia.org/324622 1207 1208 * Add new SkImageFilters::Shader factory and deprecate SkImageFilters::Paint factory. All 1209 supported/valid Paint() filters can be represented more cleanly as a Shader image filter. 1210 https://review.skia.org/323680 1211 1212 * GrContext has been replaced by two separate classes: GrDirectContext which is 1213 the traditional notion of GrContext, and GrRecordingContext which is a context 1214 that is recording an SkDeferredDisplayList and therefore has reduced functionality. 1215 Unless you are using SkDeferredDisplayList, migrate directly to GrDirectContext in 1216 all cases. 1217 1218 * CPU sync bool added to SkSurface::flushAndSubmit() and GrContext::flushAndSubmit() 1219 1220 * Removed legacy variant of SkImage::MakeFromYUVAPixmaps. Use the version that 1221 takes SkYUVAPixmaps instead. It has a more structured description of the 1222 planar configuration. 1223 https://review.skia.org/322480 1224 1225 * Some SkImage YUV image factories have been removed. Replacement patterns 1226 outlined below. 1227 SkImage::MakeFromYUVATexturesCopy 1228 1) Make SkImage from YUVA planes using SkImage::MakeFromYUVATextures 1229 2) Use Skia to allocate a surface using SkSurface::MakeRenderTarget 1230 3) surface->getCanvas()->drawImage(image, 0, 0); 1231 4) surface->makeImageSnapShot() produces RGBA image. 1232 SkImage::MakeFromYUVATexturesCopyWithExternalBackend 1233 1) Make image using MakeFromYUVATextures 1234 2) Make a SkSurface around result texture using SkSurface::MakeFromBackendTexture 1235 3) surface->getCanvas()->drawImage(image, 0, 0); 1236 4) surface->flushAndSubmit() 1237 5) Optional: SkImage::MakeFromBackendTexture() to use as SkImage. 1238 SkImage::MakeFromNV12TexturesCopy 1239 Same as SkImage::MakeFromYUVATexturesCopy 1240 https://review.skia.org/321537 1241 1242 * GrBackendRenderTargets which are created with a stencilBits param, now require 1243 the stencilBits to be 0, 8, or 16. 1244 https://review.skia.org/321545 1245 1246* * * 1247 1248Milestone 87 1249------------ 1250 1251 * GrVkImageInfo now has a field for sample count. GrBackendRenderTarget constructor 1252 that took both a GrVkImageInfo and separate sample count is deprecated. Use the 1253 version without sample count instead. Similarly, GrD3DTextureResourceInfo now 1254 has a sample count field and GrBackendRenderTarget no longer takes a separate 1255 sample count for Direct3D. The sample count for GrBackendRenderTarget is now 1256 directly queried from MtlTexture rather than passed separately. The version that 1257 takes a separate sample count is deprecated and the parameter is ignored. 1258 https://review.skia.org/320262 1259 https://review.skia.org/320757 1260 https://review.skia.org/320956 1261 1262 * Added deprecation warning for Metal support on MacOS 10.13, iOS 8.3, and older. 1263 https://review.skia.org/320260 1264 1265 * GrVkImageInfo now has a field for sample count. GrBackendRenderTarget constructor 1266 that took both a GrVkImageInfo and separate sample count is deprecated. Use the 1267 version without sample count instead. 1268 1269 * Update SkClipOp::kMax_EnumValue to include only intersect and difference when 1270 SK_SUPPORT_DEPRECATED_CLIPOPS is not defined. 1271 https://review.skia.org/320064 1272 1273 * Add support for external allocator for Direct3D 12 backend. 1274 Defines base classes for an allocation associated with a backend texture and a 1275 a memory allocator to create such allocations. 1276 Adds memory allocator to backend context. 1277 https://review.skia.org/317243 1278 1279 * Add new optional parameter to GrContext::setBackend[Texture/RenderTarget]State which can 1280 be used to return the previous GrBackendSurfaceMutableState before the requested change. 1281 https://review.skia.org/318698 1282 1283 * New optimized clip stack for GPU backends. Enabled by default but old behavior based on 1284 SkClipStack can be restored by defining SK_DISABLE_NEW_GR_CLIP_STACK when building. It is not 1285 compatible with SK_SUPPORT_DEPRECATED_CLIPOPS and we are targeting the removal of support for 1286 the deprecated, expanding clip ops. 1287 https://review.skia.org/317209 1288 1289 * GPU backends now properly honor the SkFilterQuality when calling drawAtlas. 1290 https://review.skia.org/313081 1291 1292 * The signature of 'main' used with SkRuntimeEffect SkSL has changed. There is no longer an 1293 'inout half4 color' parameter, effects must return their color instead. 1294 Valid signatures are now 'half4 main()' or 'half4 main(float2 coord)'. 1295 https://review.skia.org/310756 1296 1297 * New YUVA planar specifications for SkCodec, SkImageGenerator, SkImage::MakeFromYUVAPixmaps. 1298 Chroma subsampling is specified in more structured way. SkCodec and SkImageGenerator 1299 don't assume 3 planes with 8bit planar values. Old APIs are deprecated. 1300 https://review.skia.org/309658 1301 https://review.skia.org/312886 1302 https://review.skia.org/314276 1303 https://review.skia.org/316837 1304 https://review.skia.org/317097 1305 1306 * Added VkImageUsageFlags to GrVkImageInfo struct. 1307 1308* * * 1309 1310Milestone 86 1311------------ 1312 1313 * Remove support for 'in' variables from SkRuntimeEffect. API now exclusively refers to inputs 1314 as 'uniforms'. 1315 https://review.skia.org/309050 1316 1317 * Add SkImageGeneratorNDK and SkEncodeImageWithNDK for using Android's NDK APIs to decode and 1318 encode. 1319 https://review.skia.org/308185 1320 https://review.skia.org/308800 1321 1322 * SkImage:remove DecodeToRaster, DecodeToTexture 1323 https://review.skia.org/306331 1324 1325 * Add GrContext api to update compressed backend textures. 1326 https://review.skia.org/302265 1327 1328 * Rename GrMipMapped to GrMipmapped for consistency with new APIs. 1329 Also rename GrBackendTexture::hasMipMaps() to GrBackendTexture::hasMipmaps() 1330 https://review.skia.org/304576 1331 https://review.skia.org/304598 1332 1333 * Add option for clients to own semaphores after wait calls. 1334 https://review.skia.org/301216 1335 1336 * Remove obsolete GrFlushFlags. 1337 https://review.skia.org/298818 1338 1339 * Adds default flush() calls to SkSurface, SkImage, and GrContext. These calls do 1340 a basic flush without a submit. If you haven't updated Skia in a couple releases 1341 and still have flush() calls in your code that you expect to do a flush and 1342 submit, you should update all those to the previously added flushAndSubmit() calls 1343 instead. 1344 https://review.skia.org/299141 1345 1346 * Enable BackendSemaphores for the Direct3D backend. 1347 https://review.skia.org/298752 1348 1349 * Added SkImage:asyncRescaleAndReadPixels and SkImage::asyncRescaleAndReadPixelsYUV420 1350 https://review.skia.org/299281 1351 1352 * Ganesh is moving towards replacing GrContext with the GrDirectContext/GrRecordingContext 1353 pair. GrDirectContexts have _direct_ access to the GPU and are very similar to the old 1354 GrContext. GrRecordingContexts are less powerful contexts that lack GPU access but provided 1355 context-like utilities during DDL recording. SkSurfaces and SkCanvas will now only return 1356 GrRecordingContexts. Clients requiring context features that need GPU access can then 1357 check (via GrRecordingContext::asDirectContext) if the available recording context is actually 1358 a direct context. 1359 1360 * Replace #defined values in SkString with equivalent constexprs. 1361 http://review.skia.org/306160 1362 1363* * * 1364 1365Milestone 85 1366------------ 1367 1368 * Added GrContext::oomed() which reports whether Skia has seen a GL_OUT_OF_MEMORY 1369 error from Open GL [ES] or VK_ERROR_OUT_OF_*_MEMORY from Vulkan. 1370 https://review.skia.org/298216 1371 1372 * Add option on SkSurface::flush to pass in a GrBackendSurfaceMutableState which 1373 we will set the gpu backend surface to be at the end of the flush. 1374 https://review.skia.org/295567 1375 1376 * Add GrContext function to set mutable state on a backend surface. Currently this 1377 is only used for setting vulkan VkImage layout and queue family. 1378 https://review.skia.org/293844 1379 1380 * SkSurface factores that take GrBackendTexture or GrBackendRenderTarget now always 1381 call the release proc (if provided) on failure. SkSurface::replaceBackendTexture 1382 also calls the release proc on failure. 1383 https://review.skia.org/293762 1384 1385 * SkSurface::asyncRescaleAndReadPixels and SkSurfaceasyncRescaleAndReadPixelsYUV420 1386 now require explicit GrContext submit to guarantee finite time before callback 1387 is invoked. 1388 https://review.skia.org/292840 1389 1390 * Add VkSharingMode field to GrVkImageInfo. 1391 https://review.skia.org/293559 1392 1393 * Move SkBitmapRegionDecoder into client_utils/android. 1394 1395 * SkCanvas.clear and SkCanvas.drawColor now accept SkColor4f in addition to SkColor. 1396 1397 * Remove SkSurface::MakeFromBackendTextureAsRenderTarget. 1398 This factory existed to work around issues with GL_TEXTURE_RECTANGLE that existed 1399 in Chrome's command buffer. Those issues have since been resolved. Use 1400 SkSurface::MakeFromBackendTexutre or SkSurface::MakeFromBackendRenderTarget instead. 1401 https://review.skia.org/292719 1402 1403 * Adds submittedProc callback to GrFlushInfo which will be called when the work 1404 from the flush call is submitted to the GPU. This is specifically useful for knowing 1405 when semahpores sent with the flush have been submitted and can be waiting on. 1406 https://review.skia.org/291078 1407 1408 * GrContext submit is now required to be called in order to send GPU work to the 1409 actual GPU. The flush calls simply produces 3D API specific objects that are ready 1410 to be submitted (e.g. command buffers). For the GL backend, the flush will still 1411 send commands to the driver. However, clients should still assume the must call 1412 submit which is where any glFlush that is need for sync objects will be called. There, 1413 are flushAndSubmit() functions of GrContext, SkSurface, and SkImage that will act 1414 like the previous flush() functions. This will flush the work and immediately call 1415 submit. 1416 https://review.skia.org/289033 1417 1418 * Remove deprecated version of flush calls on GrContext and SkSurface. 1419 https://review.skia.org/2290540 1420 1421 * SkCanvas::drawVertices and drawPatch now support mapping an SkShader without explicit 1422 texture coordinates. If they're not supplied, the local positions (vertex position or 1423 patch cubic positions) will be directly used to sample the SkShader. 1424 https://review.skia.org/290130 1425 1426* * * 1427 1428Milestone 84 1429------------ 1430 1431 * Add api on GrContext, updateBackendTexture that will upload new data to a 1432 GrBackendTexture. 1433 https://review.skia.org/288909 1434 1435 * Add GrContext getter to SkSurface. 1436 https://review.skia.org/289479 1437 1438 * Deprecate GrContext and SkSurface flush() call and replace ith with flushAndSubmit(). 1439 This only effects the default flush call that takes no parameters. 1440 https://review.skia.org/289478 1441 1442 * GrContext::createBackendTexture functions that initialize the texture no longer 1443 guarantee that all the data has been uploaded and the gpu is done with the texture. 1444 Instead the client can assume the upload work has been submitted to the gpu and they 1445 must wait for that work to finish before deleting the texture. This can be done via 1446 their own synchronization or by passing in a finish proc into the create calls which 1447 will be called when it is safe to delete the texture (at least in terms of work 1448 done during the create). 1449 https://review.skia.org/286517 1450 1451 * Remove unused SkMaskFilter helpers: compbine, compose 1452 Note: shadermaskfilter will likely be removed next (clipShader should serve) 1453 1454 * Add back SkCanvas::kPreserveLCDText_SaveLayerFlag to indicate that saveLayer() 1455 will preserve LCD-text. All text in the layer must be drawn on opaque background 1456 to ensure correct rendering. 1457 1458 * Add the new directory client_utils/ for code that is specific to a single client and 1459 should be considered separate from Skia proper. Move SkFrontBufferedStream into the 1460 subdir android/. 1461 1462 * SkBitmap and SkPixmap's erase() methods now treat their color parameters 1463 consistently with the rest of Skia, with all SkColors and any untagged 1464 SkColor4fs interpreted as sRGB, not as a color in the bitmap's color space. 1465 SkPixmap::erase(SkColor4f) now takes an SkColorSpace, so you can pass 1466 pixmap.colorSpace() if you want the old behavior. 1467 1468 * SkCamera.h and SkMatrix44.h are DEPRECATED. 1469 Use SkM44 if you want to have 3d transformations. 1470 1471 * Changed Dilate and Erode image filters to take SkScalar for radius instead of int. While 1472 the image filters themselves are defined in terms of discrete pixels, the radii provided by 1473 the user are mapped through the CTM so taking ints forced over discretization. After mapping 1474 through the CTM the radii are now rounded to pixels. 1475 https://review.skia.org/281731 1476 https://review.skia.org/282636 1477 1478 * Updated the contract of GrContext and SkSurface flush calls in regards to semaphores. Made it 1479 clear that the caller is responsible for deleting any initialized semaphores after the flush 1480 call regardless if we were able to submit them or not. Also, allows skia to only submit a 1481 subset of the requested semaphores if we failed to create some. 1482 https://review.skia.org/282265 1483 1484 1485 * SkCanvas::drawVertices will now always fill the triangles specified by the vertices. Previously, 1486 vertices with no colors and no (texture coordinates or shader) would be drawn in wireframe. 1487 https://review.skia.org/282043 1488 1489* * * 1490 1491Milestone 83 1492------------ 1493 1494 * Remove localmatrix option from SkShaders::[Blend, Lerp] 1495 1496 * Fill out Direct3D parameters for backend textures and backend rendertargets. 1497 1498 * SkImage::makeTextureImage() takes an optional SkBudgeted param 1499 1500 * Made non-GL builds of GPU backend more robust. 1501 https://review.skia.org/277456 1502 1503 * MoltenVK support removed. Use Metal backend instead. 1504 https://review.skia.org/277612 1505 1506* * * 1507 1508Milestone 82 1509------------ 1510 1511 * Removed drawBitmap and related functions from SkDevice; all public drawBitmap functions on 1512 SkCanvas automatically wrap the bitmap in an SkImage and call the equivalent drawImage function. 1513 Drawing mutable SkBitmaps will now incur a mandatory copy. Switch to using SkImage directly or 1514 mark the bitmap as immutable before drawing. 1515 1516 * Removed "volatile" flag from SkVertices. All SkVertices objects are assumed to be 1517 volatile (the previous default behavior). 1518 1519 * Removed exotic legacy bitmap functions from SkCanvas (drawBitmapLattic, drawBitmapNine); the 1520 exotic SkImage functions still exist. 1521 1522 * Make it possible to selectively turn on/off individual encoders/decoders, 1523 using skia_use_(libpng/libjpeg_turbo/libwebp)(decode/encode). 1524 1525 * Removed GrGpuResource, GrSurface, and GrTexture from public api. These were not 1526 meant to be public, and we now can move them into src. Also removed getTexture 1527 function from SkImage.h 1528 1529 * Removed Bones from SkVertices 1530 1531 * Added a field to GrContextOptions that controls whether GL errors are checked after 1532 GL calls that allocate textures, etc. It also controls checking for shader compile 1533 success, and program linking success. 1534 1535 * Made SkDeferredDisplayList.h officially part of the public API (i.e., moved it to 1536 include/core). Also added a ProgramIterator to SkDeferredDisplayList which allows 1537 clients to pre-compile some of the shaders the DDL requires. 1538 1539 * Added two new helper methods to SkSurfaceCharacterization: createBackendFormat and 1540 createFBO0. These make it easier for clients to create new surface characterizations that 1541 differ only a little from an existing surface characterization. 1542 1543 * Removed SkTMax and SkTMin. 1544 * Removed SkTClamp and SkClampMax. 1545 * Removed SkScalarClampMax and SkScalarPin. 1546 * Removed SkMax32 and SkMin32. 1547 * Removed SkMaxScalar and SkMinScalar. 1548 1549 * SkColorSetA now warns if the result is unused. 1550 1551 * An SkImageInfo with a null SkColorSpace passed to SkCodec::getPixels() and 1552 related calls is treated as a request to do no color correction at decode 1553 time. 1554 1555 * Add new APIs to add attributes to document structure node when 1556 creating a tagged PDF. 1557 1558 * Remove CGFontRef parameter from SkCreateTypefaceFromCTFont. 1559 Use CTFontManagerCreateFontDescriptorFromData instead of 1560 CGFontCreateWithDataProvider to create CTFonts to avoid memory use issues. 1561 1562 * Added SkCodec:: and SkAndroidCodec::getICCProfile for reporting the native 1563 ICC profile of an encoded image, even if it doesn't map to an SkColorSpace. 1564 1565 * SkSurface::ReplaceBackendTexture takes ContentChangeMode as a parameter, 1566 which allow callers to specify whether retain a copy of the current content. 1567 1568 * Enforce the existing documentation in SkCanvas::saveLayer that it ignores 1569 any mask filter on the restore SkPaint. The 'coverage' of a layer is 1570 ill-defined, and masking should be handled by pre-clipping or using the 1571 auxiliary clip mask image of the SaveLayerRec. 1572 1573* * * 1574 1575Milestone 81 1576------------ 1577 1578 * Added support for GL_NV_fence extension. 1579 1580 * Make SkImageInfo::validRowBytes require rowBytes to be pixel aligned. This 1581 makes SkBitmap match the behavior of raster SkSurfaces in rejecting 1582 non-aligned rowBytes. 1583 1584 * Added an SkImage::MakeRasterFromCompressed entry point. Also updated 1585 SkImage::MakeFromCompressed to decompress the compressed image data if 1586 the GPU doesn't support the specified compression type (i.e., macOS Metal 1587 doesn't support BC1_RGB8_UNORM so such compressed images will always be 1588 decompressed on that platform). 1589 1590 * Added support for BC1 RGBA compressed textures 1591 1592 * Added CachingHint to SkImage::makeRasterImage 1593 1594 * Added SkAnimatedImage::getCurrentFrame() 1595 1596 * Add support to create an SkSurface from an MTKView, with delayed acquisition of 1597 the MTLDrawable. 1598 Entry point: SkSurface::MakeFromMTKView 1599 1600 * Removed SkIRect::EmptyIRect(). Use SkIRect::MakeEmpty() instead. 1601 https://review.skia.org/262382/ 1602 1603 * Moved SkRuntimeEffect to public API. This is the new (experimental) interface to custom SkSL 1604 shaders and color filters. 1605 1606 * Added BC1 compressed format support. Metal and Vulkan seem to only support the BC 1607 formats on desktop machines. 1608 1609 * Added compressed format support for backend texture creation API. 1610 This adds the following new entry points: 1611 GrContext::compressedBackendFormat 1612 GrContext::createCompressedBackendTexture 1613 The latter method comes in variants that allow color-initialized and 1614 compressed texture data initialized. 1615 1616 * Added SkMatrix::MakeTrans(SkIVector) 1617 https://review.skia.org/259804 1618 1619* * * 1620 1621Milestone 80 1622------------ 1623 1624 * For Vulkan backend, we now require that the VkDevice, Queue, and Instance outlive 1625 either the destruction or abandoning of the GrContext. Additionally, all 1626 GrBackendTextures created via GrContext::createBackendTexture calls must be deleted 1627 before destroying or abandoning the GrContext. 1628 https://review.skia.org/257921 1629 1630 * Removed SkSize& SkSize::operator=(const SkISize&) 1631 https://review.skia.org/257880 1632 1633 * SkISize width() and height() now constexpr 1634 https://review.skia.org/257680 1635 1636 * Added SkMatrix::MakeTrans(SkVector) and SkRect::makeOffset(SkVector). 1637 https://review.skia.org/255782 1638 1639 * Added SkImageInfo::MakeA8(SkISize) and added optional color space parameter to 1640 SkImageInfo::MakeN32Premul(SkISize). 1641 1642 * Added dimensions() and getFrameCount() to SkAnimatedImage 1643 https://review.skia.org/253542 1644 1645 * Removed SkMatrix44 version of toXYZD50 from SkColorSpace. Switched to skcms types in 1646 transferFn, invTrasnferFn, and gamutTransformTo functions. 1647 https://review.skia.org/252596 1648 1649 * Removed rotation and YUV support from SkColorMatrix 1650 https://review.skia.org/252188 1651 1652 * Added kBT2020_SkYUVColorSpace. This is BT.2020's YCbCr conversion (non-constant-luminance). 1653 https://review.skia.org/252160 1654 1655 * Remove old async read pixels APIs 1656 https://review.skia.org/251198 1657 1658 * Expose SkBlendModeCoeff and SkBlendMode_AsCoeff for Porter-Duff blend modes. 1659 https://review.skia.org/252600 1660 1661* * * 1662 1663Milestone 79 1664------------ 1665 1666 * SkTextBlob::Iter to discover the glyph indices and typefaces in each run 1667 https://skia-review.googlesource.com/246296 1668 1669 * Added support for PQ and HLG transfer functions to SkColorSpace. 1670 https://skia-review.googlesource.com/c/skia/+/249000 1671 1672 * Added new api on GrContext ComputeImageSize. This replaces the hold static helper 1673 ComputeTextureSize. 1674 https://skia-review.googlesource.com/c/skia/+/247337 1675 1676 * New versions of SkSurface async-rescale-and read APIs that allow client to extend 1677 the lifetime of the result data. Old versions are deprecated. 1678 https://review.skia.org/245457 1679 1680 * Add SkColorInfo. It's dimensionless SkImageInfo. 1681 https://review.skia.org/245261 1682 1683 * Added SkPixmap-based createBackendTexture method to GrContext. This allows clients to create 1684 backend resources (initialized with texture data) that Skia/Ganesh doesn't know about/track. 1685 https://review.skia.org/244676 1686 1687 * Add explicit src and dst colorspace parameters to SkColorFilter::filterColor4f() 1688 https://review.skia.org/244882 1689 1690 * Remove Vulkan/Metal float32 RGBA texture support 1691 https://review.skia.org/244881 1692 1693 * Add SkSurface::MakeFromCAMetalLayer 1694 https://review.skia.org/242563 1695 1696 * Added kAlpha_F16_SkColorType, kRG_F16_SkColorType and kRGBA_16161616_SkColorType. 1697 This is intended to help support HDR YUV uses case (e.g., P010 and P016). As such, 1698 the addition is focused on allowing creation of SkPixmaps and SkImages and not 1699 SkSurfaces (i.e., who wants to render to render to these?) 1700 https://review.skia.org/241357 1701 1702 * Start to move nested SkPath types (e.g. Direction, Verb) up to root level in SkPathTypes.h 1703 https://review.skia.org/241079 1704 1705 * Remove isRectContour and ksNestedFillRects from public 1706 https://review.skia.org/241078 1707 1708 * Added kRG_88_SkColorType. This is intended to help support YUV uses case (e.g., NV12). 1709 As such, the addition is focused on allowing creation of SkPixmaps and SkImages and not 1710 SkSurfaces (i.e., who wants to render to RG?) 1711 https://review.skia.org/239930 1712 https://review.skia.org/235797 1713 1714 * Make the size of program/pipeline caches configurable via 1715 GrContextOptions::fRuntimeProgramCacheSize 1716 https://review.skia.org/239756 1717 1718 * Added kAlpha_16_SkColorType and kRG_1616_SkColorType. This is intended to help support HDR YUV 1719 uses case (e.g., P010 and P016). As such, the addition is focused on allowing creation of 1720 SkPixmaps and SkImages and not SkSurfaces (i.e., who wants to render to render to these?) 1721 https://review.skia.org/239930 1722 1723 * Add GrContext::precompileShader to allow up-front compilation of previously-cached shaders. 1724 https://review.skia.org/239438 1725 1726* * * 1727 1728Milestone 78 1729------------ 1730 1731 * SkDrawLooper is no longer supported in SkPaint or SkCanvas. 1732 https://review.skia.org/230579 1733 https://review.skia.org/231736 1734 1735 * SkPath::Iter::next() now ignores its consumDegenerates bools. Those will so 1736 go away entirely 1737 https://review.skia.org/235104 1738 1739 * SkImage: new factories: DecodeToRaster, DecodeToTexture 1740 https://review.skia.org/234476 1741 1742 * SkImageFilter API refactor started: 1743 - Provide new factory API in include/effects/SkImageFilters 1744 - Consolidated enum types to use SkTileMode and SkColorChannel 1745 - Hide filter implementation classes 1746 - Hide previously public functions on SkImageFilter that were intended for 1747 internal use only 1748 https://review.skia.org/230198 1749 https://review.skia.org/230876 1750 https://review.skia.org/231256 1751 1752 * SkColorFilters::HSLAMatrix - new matrix color filter operating in HSLA 1753 space. 1754 https://review.skia.org/231736 1755 1756 * Modify GrBackendFormat getters to not return internal pointers. Use an enum 1757 class for GL formats. 1758 https://review.skia.org/233160 1759 1760 * Expose GrContext::dump() when SK_ENABLE_DUMP_GPU is defined. 1761 https://review.skia.org/233557 1762 1763 * Vulkan backend now supports YCbCr sampler for I420 Vulkan images that are 1764 not backed by external images. 1765 https://review.skia.org/233776 1766 1767 * Add SkCodec::SelectionPolicy for distinguishing between decoding a still 1768 image or an image sequence for a container format that has both (e.g. HEIF). 1769 https://review.skia.org/232839 1770 1771 * SkImage::makeTextureImage and SkImage::MakeCrossContextFromPixmap no longer 1772 take an SkColorSpace parameter. It was unused. 1773 https://review.skia.org/234579 1774 https://review.skia.org/234912 1775 1776 * SkImage::reinterpretColorSpace - to reinterpret image contents in a new 1777 color space. 1778 https://review.skia.org/234328 1779 1780 * Removed SkImage::MakeCrossContextFromEncoded. 1781 https://review.skia.org/234912 1782 1783 * Add Metal support for GrFence, GrSemaphore, and GrBackendSemaphore 1784 https://review.skia.org/233416 1785 1786 * SkMallocPixelRef: remove MakeDirect and MakeWithProc from API. 1787 https://review.skia.org/234660 1788 1789 * Remove 4-parameter variant of SkRect::join() and intersect(), and 1790 noemptycheck variants of intersect(). 1791 https://review.skia.org/235832 1792 https://review.skia.org/237142 1793 1794 * Remove unused sk_sp comparison operators. 1795 https://review.skia.org/236942 1796 1797 * Add SkColor4f variant to experimental_DrawEdgeAAQuad for SkiaRenderer. 1798 https://review.skia.org/237492 1799 1800 * Deprecated maxCount resource cache limit for Ganesh. 1801 This hasn't been relevant for a long time. 1802 1803 * Changed GrContextOptions' fDisallowGLSLBinaryCaching to fShaderCacheStrategy, 1804 and allow caching SkSL. 1805 https://review.skia.org/238856 1806 1807 * Use GL_QCOM_TILED_RENDERING to explicitly discard stencil 1808 1809 * Added RELEASE_NOTES.txt file 1810 https://review.skia.org/229760 1811 1812 * Implemented internal support for OpenGL tessellation. 1813