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