Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8f3e451
Expand CSS gradient + filter:blur support across framework, ports, docs
shai-almog May 16, 2026
9c7faef
CI fixes + hellocodenameone screenshot tests for new gradient/filter …
shai-almog May 16, 2026
1d8161a
CI: pass surefire.failIfNoSpecifiedTests in designer workflow
shai-almog May 16, 2026
172cb62
Strip non-ASCII characters from new source files
shai-almog May 16, 2026
7be5658
Fix SpotBugs violations from the gradient/blur additions
shai-almog May 16, 2026
f281d86
Fix PMD violations in GradientDescriptor
shai-almog May 16, 2026
0a6f3ca
Refactor: Gradient hierarchy + uniform surefire + Android hang fix
shai-almog May 16, 2026
001f5a5
Drop unused Gradient-subclass imports in CodenameOneImplementation
shai-almog May 16, 2026
465d9f1
Fix CI failures: AsyncGraphics.fillGradient, simctl, native-iOS sim d…
shai-almog May 16, 2026
12cc3ce
Add JS-port reference screenshots for DrawGradientStops + GaussianBlur
shai-almog May 16, 2026
b622748
CSS compiler: route conic-gradient and repeating-*-gradient through t…
shai-almog May 16, 2026
a0b4b31
Fix repeating-* gradient rendering + CSS compiler cache invalidation
shai-almog May 16, 2026
58fc371
Split designer install from android/ios port build
shai-almog May 16, 2026
7ae68ea
Split combined declaration to satisfy PMD OneDeclarationPerLine
shai-almog May 16, 2026
884b029
Fix software repeating-gradient sampling + smoother demo CSS
shai-almog May 16, 2026
b0d180b
Bake new screenshot goldens for css-gradients + gradient-stops/gaussi…
shai-almog May 16, 2026
83a2a52
Android gradient AA + dither; trim skill css.md historical bits
shai-almog May 17, 2026
dda071b
CSS filter: parse non-blur functions into a 4x5 color matrix
shai-almog May 17, 2026
b2c174d
Dev guide: replace stale gradient images with new overview screenshots
shai-almog May 17, 2026
eda2604
Gradient: copyright, weak-ref raster cache, runtime CSS parser
shai-almog May 17, 2026
535467d
iOS Metal: GPU multi-stop gradients + separable Gaussian blur
shai-almog May 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/designer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
mvn -B -pl designer -am -DunitTests=true -Dcodename1.platform=javase \
-Plocal-dev-javase -Dmaven.javadoc.skip=true -Dmaven.antrun.skip=true \
-Dcn1.binaries="${CN1_BINARIES}" \
-Dtest=SimpleXmlParserTest -DfailIfNoTests=false test
-Dtest=SimpleXmlParserTest -Dsurefire.failIfNoSpecifiedTests=false test
- name: Verify designer CLI CSS compilation
run: |
Expand Down
41 changes: 41 additions & 0 deletions CodenameOne/src/com/codename1/impl/CodenameOneImplementation.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
import com.codename1.ui.geom.Rectangle;
import com.codename1.ui.geom.Shape;
import com.codename1.ui.layouts.BorderLayout;
import com.codename1.ui.Gradient;
import com.codename1.ui.plaf.Style;
import com.codename1.ui.util.ImageIO;
import com.codename1.util.AsyncResource;
Expand Down Expand Up @@ -3378,6 +3379,29 @@ private void fillLinearGradientImpl(Object graphics, int startColor, int endColo
setColor(graphics, oldColor);
}

/// Fills the rectangle (x, y, width, height) with the given multi-stop
/// gradient. Default implementation reuses a weakly-cached rasterization
/// from the Gradient (see `Gradient#getCachedRaster`) - so a gradient
/// painted into the same-sized rectangle on subsequent frames pays only
/// for the texture upload, not per-pixel re-sampling. Ports with hardware
/// shader support should override and draw directly through the shader.
public void fillGradient(Object graphics, Gradient gradient, int x, int y, int width, int height) {
if (gradient == null || width <= 0 || height <= 0) {
return;
}
com.codename1.ui.Image img = gradient.getCachedRaster(width, height);
if (img == null) {
return;
}
drawImage(graphics, img.getImage(), x, y);
}

/// In-place region blur for CSS backdrop-filter:blur(). Default returns false
/// signalling no in-place support - caller falls back to snapshot+blur.
public boolean blurRegion(Object graphics, int x, int y, int width, int height, float radius) {
return false;
}

private boolean checkIntersection(Object g, int y0, int x1, int x2, int y1, int y2, int[] intersections, int intersectionsCount) {
if (y0 > y1 && y0 < y2 || y0 > y2 && y0 < y1) {
if (y1 == y2) {
Expand Down Expand Up @@ -9279,6 +9303,11 @@ public void paintComponentBackground(Object nativeGraphics, int x, int y, int wi
case Style.BACKGROUND_GRADIENT_LINEAR_HORIZONTAL:
case Style.BACKGROUND_GRADIENT_LINEAR_VERTICAL:
case Style.BACKGROUND_GRADIENT_RADIAL:
case Style.BACKGROUND_GRADIENT_LINEAR:
case Style.BACKGROUND_GRADIENT_RADIAL_FULL:
case Style.BACKGROUND_GRADIENT_CONIC:
case Style.BACKGROUND_GRADIENT_REPEATING_LINEAR:
case Style.BACKGROUND_GRADIENT_REPEATING_RADIAL:
drawGradientBackground(s, nativeGraphics, x, y, width, height);
return;
default:
Expand Down Expand Up @@ -9312,6 +9341,18 @@ private void drawGradientBackground(Style s, Object nativeGraphics, int x, int y
x, y, width, height, s.getBackgroundGradientRelativeX(), s.getBackgroundGradientRelativeY(),
s.getBackgroundGradientRelativeSize());
return;
case Style.BACKGROUND_GRADIENT_LINEAR:
case Style.BACKGROUND_GRADIENT_RADIAL_FULL:
case Style.BACKGROUND_GRADIENT_CONIC:
case Style.BACKGROUND_GRADIENT_REPEATING_LINEAR:
case Style.BACKGROUND_GRADIENT_REPEATING_RADIAL: {
Gradient g = s.getGradient();
if (g != null) {
fillGradient(nativeGraphics, g, x, y, width, height);
return;
}
break;
}
default:
// Style.BACKGROUND_NONE
if (s.getBgTransparency() != 0) {
Expand Down
Loading