Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/README.md

Issue 1896893004: Hook up style invalidation for CSS Paint API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@css-paint-register
Patch Set: rebase. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # CSS Paint API 1 # CSS Paint API
2 2
3 This directory contains the implementation of the CSS Paint API. 3 This directory contains the implementation of the CSS Paint API.
4 4
5 See [CSS Paint API](https://drafts.css-houdini.org/css-paint-api/) for the web e xposed APIs this 5 See [CSS Paint API](https://drafts.css-houdini.org/css-paint-api/) for the web e xposed APIs this
6 implements. 6 implements.
7 7
8 ## Implementation 8 ## Implementation
9 9
10 ### [CSSPaintDefinition](CSSPaintDefinition.h) 10 ### [CSSPaintDefinition](CSSPaintDefinition.h)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ### Generating a [PaintGeneratedImage](../../platform/graphics/PaintGeneratedIma ge.h) 42 ### Generating a [PaintGeneratedImage](../../platform/graphics/PaintGeneratedIma ge.h)
43 43
44 `PaintGeneratedImage` is a `Image` which just paints a single `SkPicture`. 44 `PaintGeneratedImage` is a `Image` which just paints a single `SkPicture`.
45 45
46 A `CSSPaintValue` can generate an image from the method `CSSPaintImageGenerator# paint`. This method 46 A `CSSPaintValue` can generate an image from the method `CSSPaintImageGenerator# paint`. This method
47 calls through to `CSSPaintDefinition#paint` which actually invokes the javascrip t paint method. 47 calls through to `CSSPaintDefinition#paint` which actually invokes the javascrip t paint method.
48 This method returns the `PaintGeneratedImage`. 48 This method returns the `PaintGeneratedImage`.
49 49
50 The `SkPicture` is produced from a `RecordingImageBufferSurface`. 50 The `SkPicture` is produced from a `RecordingImageBufferSurface`.
51 51
52 ### Style Invalidation
53
54 The `CSSPaintDefinition` keeps a list of both native and custom properties it wi ll invalidate on.
55 During style invalidation `ComputedStyle` checks if it has any `CSSPaintValue`s, and if any of their
56 properties have changed; if so it will invalidate paint for that `ComputedStyle` .
57
58 If the `CSSPaintValue` doesn't have a corresponding `CSSPaintDefinition` yet, it doesn't invalidate
59 paint.
60
52 ## Testing 61 ## Testing
53 62
54 Tests live [here](../../../LayoutTests/csspaint/). 63 Tests live [here](../../../LayoutTests/csspaint/).
55 64
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698