More site cleanup
- Updated the site's copy of release notes - Removed Flutter/Fuchsia information - it was mostly out of date and incorrect (we've had a Flutter autoroller for years). - Removed "how to apply a patch" - it still referred to Reitveld, and Gerrit provides plenty of guidance on this from the web UI itself. - Fixed some broken link formatting - The embedded 3D cube demo worked, but the linked copy on jsfiddle had a call to an (unnecessary) deleted API. Fixed that. - One of the particle examples linked to the wrong effect on particles.skia.org - Converted a static 'code + png' example (text drop shadow) to a fiddle-embed, which is prettier and more functional. Change-Id: I530dd9fe19288d969fef68feb2c9002c8378e0df Reviewed-on: https://skia-review.googlesource.com/c/skia/+/491818 Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Heather Miller <hcm@google.com> Commit-Queue: Heather Miller <hcm@google.com>
This commit is contained in:
parent
c613e0d752
commit
426f7b5ad6
@ -35,7 +35,7 @@ linkTitle: "The Skia Directory"
|
||||
- [Perf](https://perf.skia.org/) Performance testing.
|
||||
- [Mon](https://mon.skia.org/) Grafana dashboard (requires login).
|
||||
- [Alerts](https://alerts.skia.org/) Monitor testing and bot status.
|
||||
- [BugChomper] (https://bugchomper.skia.org/) Prioritize bugs quickly.
|
||||
- [BugChomper](https://bugchomper.skia.org/) Prioritize bugs quickly.
|
||||
- [Code Review](https://skia-review.googlesource.com/)
|
||||
|
||||
* Mailing Lists
|
||||
|
@ -1,74 +0,0 @@
|
||||
---
|
||||
title: 'Applying patches'
|
||||
linkTitle: 'Applying patches'
|
||||
---
|
||||
|
||||
If you are a Skia committer and have been asked to commit an
|
||||
externally-submitted patch, this is how to do it. (This technique is useful in
|
||||
other situations too, like if you just want to try out somebody else's patch
|
||||
locally.)
|
||||
|
||||
Notes:
|
||||
|
||||
- For the examples below, we will assume that this is the change you want to
|
||||
patch into your local checkout: https://codereview.appspot.com/6201055/
|
||||
- These instructions should work on Mac or Linux; Windows is trickier, because
|
||||
there is no standard Windows "patch" tool.
|
||||
|
||||
See also [Contributing Code for The Chromium Projects]
|
||||
(http://dev.chromium.org/developers/contributing-code#TOC-Instructions-for-Reviewer:-Checking-in-the-patch-for-a-non-committer).
|
||||
|
||||
If you use `git cl`, then you should be able to use the shortcut:
|
||||
|
||||
```
|
||||
git cl patch 6201055
|
||||
```
|
||||
|
||||
If you use `gcl`, or the above doesn't work, the following should always work.
|
||||
|
||||
1. Prepare your local workspace to accept the patch.
|
||||
|
||||
- cd into the root directory (usually `trunk/`) of the workspace where you
|
||||
want to apply the patch.
|
||||
- Make sure that the workspace is up-to-date and clean (or "updated and clean
|
||||
enough" for your purposes). If the codereview patch was against an old
|
||||
revision of the repo, you may need to sync your local workspace to that
|
||||
same revision.
|
||||
|
||||
2. Download the raw patch set.
|
||||
|
||||
- Open the codereview web page and look for the "Download raw patch set" link
|
||||
near the upper right-hand corner. Right-click on that link and copy it to
|
||||
the clipboard. (In my case, the link is
|
||||
https://codereview.appspot.com/download/issue6201055_1.diff )
|
||||
- If you are on Linux or Mac and have "curl" or "wget" installed, you can
|
||||
download the patch from the command line:
|
||||
|
||||
```
|
||||
curl https://codereview.appspot.com/download/issue6201055_1.diff
|
||||
--output patch.txt
|
||||
# or...
|
||||
wget https://codereview.appspot.com/download/issue6201055_1.diff
|
||||
--output-document=patch.txt
|
||||
```
|
||||
|
||||
- Otherwise, figure out some other way to download this file and save it as
|
||||
`patch.txt`
|
||||
|
||||
3. Apply this patch to your local checkout.
|
||||
|
||||
- You should still be in the root directory of the workspace where you want
|
||||
to apply the patch.
|
||||
|
||||
```
|
||||
patch -p1 <patch.txt
|
||||
```
|
||||
|
||||
- Then you can run `diff` and visually check the local changes.
|
||||
|
||||
4. Complications: If the patch fails to apply, the following may be happening:
|
||||
|
||||
- Wrong revision. Maybe your local workspace is not up to date? Or maybe the
|
||||
patch was made against an old revision of the repository, and cannot be
|
||||
applied to the latest revision? (In that case, revert any changes and sync
|
||||
your workspace to an older revision, then re-apply the patch.)
|
@ -1,37 +0,0 @@
|
||||
---
|
||||
title: 'Skia in Flutter & Fuchsia'
|
||||
linkTitle: 'Skia in Flutter & Fuchsia'
|
||||
---
|
||||
|
||||
Skia is used by both [Flutter](https://flutter.io/) and
|
||||
[Fuchsia](https://fuchsia.googlesource.com/docs/+/main/README.md).
|
||||
|
||||
Fuchsia has a [roller](https://autoroll.skia.org/) that will continuously roll
|
||||
latest Skia into that project. Fuchsia uses an XML
|
||||
[manifest](https://fuchsia.googlesource.com/manifest/+/refs/heads/main) to
|
||||
specify the Skia revision (as well as other third party libraries).
|
||||
|
||||
Flutter does not (yet) have a roller, so developers must manually perform rolls.
|
||||
Flutter uses [DEPS](https://github.com/flutter/engine/blob/master/DEPS) to
|
||||
specify third party dependencies.
|
||||
|
||||
Although each project is (almost always) building at a different revision of
|
||||
Skia, Fuchsia itself always builds the latest revision of Flutter as one of its
|
||||
components. Thus, the versions of Skia being used by Flutter and Fuchsia must be
|
||||
"source compatible" -- Flutter must be capable of compiling against either
|
||||
revision without any change to Flutter itself.
|
||||
|
||||
## Making API Changes
|
||||
|
||||
If you need to make a breaking API change, the basic approach is:
|
||||
|
||||
- Add new code to Skia, leaving the old code in place.
|
||||
- Deprecate the old code path so that it must be enabled with a flag such as
|
||||
'SK_SUPPORT_LEGACY_XXX'.
|
||||
- Add that same flag to
|
||||
[flutter_defines.gni](https://skia.googlesource.com/skia/+/main/gn/flutter_defines.gni)
|
||||
in Skia.
|
||||
- Both Flutter and Fuchsia build Skia with a GN argument that enables all the
|
||||
defines listed in that file.
|
||||
- Land the Skia change, and test the new API in both Flutter and Fuchsia.
|
||||
- Remove the flag and code when the legacy code path is no longer in use.
|
@ -71,7 +71,7 @@ Skia's [Lottie animation](https://skia.org/docs/user/modules/skottie) support.
|
||||
<figure>
|
||||
<canvas id=camera3d width=400 height=400></canvas>
|
||||
<figcaption>
|
||||
<a href="https://jsfiddle.skia.org/canvaskit/b0b90e29f25f41af15249831d9a5cb5a3b8126ca2c2f0b9ad0e9193d1bcf95e9"
|
||||
<a href="https://jsfiddle.skia.org/canvaskit/55e66e892a5ae98175cc0b086fbac2100a4642105bb76bd938ed75ccce5af432"
|
||||
target=_blank rel=noopener>
|
||||
3D Cube JSFiddle</a>
|
||||
</figcaption>
|
||||
|
@ -56,7 +56,7 @@ custom language, SkSL.
|
||||
<figure>
|
||||
<canvas id=curves width=400 height=400></canvas>
|
||||
<figcaption>
|
||||
<a href="https://particles.skia.org/?nameOrHash=@spiral"
|
||||
<a href="https://particles.skia.org/?nameOrHash=@swirl"
|
||||
target=_blank rel=noopener>Curves</a>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
@ -10,6 +10,100 @@ This page includes a list of high level updates for each milestone release.
|
||||
|
||||
* * *
|
||||
|
||||
Milestone 98
|
||||
------------
|
||||
* The following functions and methods are not defined in SkSurface when SK_SUPPORT_GPU is 0:
|
||||
MakeFromBackendTexture, MakeFromBackendRenderTarget, MakeRenderTarget,
|
||||
getBackendTexture, getBackendRenderTarget, replaceBackendTexture. flush() with parameters
|
||||
was removed as well. These were all no-ops anyway when just the CPU backend was compiled in
|
||||
(noting that flush() and flushAndSubmit() are still no-ops on the CPU backend).
|
||||
* GrBackendSemaphore only includes methods that match the GPU backend that Skia was compiled for.
|
||||
For example, initVulkan and vkSemaphore are not defined unless the Vulkan backend is compiled
|
||||
into Skia.
|
||||
* Surfaces and images are now limited to just under 2GB of total size. Previously, larger images
|
||||
could be created, but the CPU backend would fail to index them correctly.
|
||||
* SkCanvas::drawVertices and SkCanvas::drawPatch variants that did not take SkBlendMode are
|
||||
removed.
|
||||
* SkImageFilters::RuntimeShader is a new public API that enables adding RuntimeShaderEffects into
|
||||
image filter graph.
|
||||
* SkImage::makeRawShader is a new public API that creates "raw" image shaders. makeRawShader
|
||||
functions like SkImage::makeShader, but for images that contain non-color data. This includes
|
||||
images encoding things like normals, material properties (eg roughness), heightmaps, or any
|
||||
other purely mathematical data that happens to be stored in an image. These types of images are
|
||||
useful with some programmable shaders (ie SkRuntimeEffect).
|
||||
Raw image shaders work like regular image shaders (including filtering and tiling), with a few
|
||||
major differences:
|
||||
- No color space transformation is ever applied (the color space of the image is ignored).
|
||||
- Images with an alpha type of kUnpremul are not automatically premultiplied.
|
||||
- Bicubic filtering is not supported. If SkSamplingOptions::useCubic is true, these factories
|
||||
will return nullptr.
|
||||
* Removed SkCanvas::markCTM and SkCanvas::findMarkedCTM. These were created to be used with other
|
||||
features that have since been deleted, so they served no purpose.
|
||||
|
||||
* * *
|
||||
|
||||
Milestone 97
|
||||
------------
|
||||
* Added basic support for vulkan DRM modifiers. All of these are treated as read only textures
|
||||
internally (versus querying specific modifier support). Clients can either pass a flag to Vulkan
|
||||
GrBackendFormat to say it uses modifiers or pass the VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
|
||||
to a GrBackendTexture via the GrVkImageInfo struct.
|
||||
* The following functions and methods are not defined in SkImage when SK_SUPPORT_GPU is 0:
|
||||
MakeTextureFromCompressed, MakeFromTexture, MakeFromCompressedTexture,
|
||||
MakeCrossContextFromPixmap, MakeFromAdoptedTexture, MakeFromYUVATextures,
|
||||
MakeFromYUVAPixmaps, MakePromiseTexture, MakePromiseYUVATexture, MakeBackendTextureFromSkImage,
|
||||
flush, flushAndSubmit, getBackendTexture, makeTextureImage.
|
||||
These were all no-ops anyway when just the CPU backend was compiled in.
|
||||
|
||||
* * *
|
||||
|
||||
Milestone 96
|
||||
------------
|
||||
* SkRuntimeEffect no longer clamps the RGB values of an effect's output to the range 0..A.
|
||||
This makes it easier to use a hierarchy of SkSL shaders where intermediate values do not
|
||||
represent colors but are, for example, non-color inputs to a lighting model.
|
||||
http://review.skia.org/452558
|
||||
|
||||
* * *
|
||||
|
||||
Milestone 95
|
||||
------------
|
||||
* Minimum supported iOS raised from 8 to 11. Skia may build back to iOS 9 but versions older
|
||||
than 11 are not tested. Community contributions to support versions 9 and 10 of iOS may be
|
||||
considered, but they may not be complex as they cannot be tested.
|
||||
|
||||
* * *
|
||||
|
||||
Milestone 94
|
||||
------------
|
||||
* Metal backend has been changed to track command buffer resources manually
|
||||
rather than using retained resources.
|
||||
https://review.skia.org/432878
|
||||
|
||||
* Added virtual onResetClip() to SkCanvas for Android Framework, to emulate the soon-to-be-removed
|
||||
expanding clip ops guarded by SK_SUPPORT_DEPRECATED_CLIPOPS.
|
||||
https://review.skia.org/430897
|
||||
|
||||
* Removed SK_SUPPORT_DEPRECATED_CLIPOPS build flag. Clips can only be intersect and difference.
|
||||
https://review.skia.org/436565
|
||||
|
||||
* There is a new syntax for invoking (sampling) child effects in SkSL. Previously, children
|
||||
(shaders, colorFilters, blenders) were invoked using different overloads of `sample`. That
|
||||
syntax is deprecated (but still supported). Now, the child behaves like an object, with a method
|
||||
name `eval`. The arguments to these `eval` methods are the same as the arguments in the old
|
||||
`sample` intrinsics. For example:
|
||||
// Old syntax:
|
||||
sample(shader, xy)
|
||||
sample(colorFilter, color)
|
||||
sample(blender, srcColor, dstColor)
|
||||
// New syntax:
|
||||
shader.eval(xy)
|
||||
colorFilter.eval(color)
|
||||
blender.eval(srcColor, dstColor)
|
||||
https://review.skia.org/444735
|
||||
|
||||
* * *
|
||||
|
||||
Milestone 93
|
||||
------------
|
||||
* Removed SkPaint::getHash
|
||||
|
@ -97,29 +97,4 @@ to draw those glyphs.
|
||||
|
||||
## How do I add drop shadow on text?
|
||||
|
||||
<!--?prettify lang=cc?-->
|
||||
|
||||
void draw(SkCanvas* canvas) {
|
||||
const SkScalar sigma = 1.65f;
|
||||
const SkScalar xDrop = 2.0f;
|
||||
const SkScalar yDrop = 2.0f;
|
||||
const SkScalar x = 8.0f;
|
||||
const SkScalar y = 52.0f;
|
||||
const SkScalar textSize = 48.0f;
|
||||
const uint8_t blurAlpha = 127;
|
||||
auto blob = SkTextBlob::MakeFromString("Skia", SkFont(nullptr, textSize));
|
||||
SkPaint paint;
|
||||
paint.setAntiAlias(true);
|
||||
SkPaint blur(paint);
|
||||
blur.setAlpha(blurAlpha);
|
||||
blur.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, sigma, 0));
|
||||
canvas->drawColor(SK_ColorWHITE);
|
||||
canvas->drawTextBlob(blob.get(), x + xDrop, y + yDrop, blur);
|
||||
canvas->drawTextBlob(blob.get(), x, y, paint);
|
||||
}
|
||||
|
||||
<a href='https://fiddle.skia.org/c/@text_shadow'><img src='https://fiddle.skia.org/i/@text_shadow_raster.png'></a>
|
||||
|
||||
---
|
||||
|
||||
<div style="margin-bottom:99%"></div>
|
||||
<fiddle-embed name='1ff4da09e515087f7011c7caec2e98ae'></fiddle-embed>
|
||||
|
Loading…
Reference in New Issue
Block a user