Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering leveldependency: skiaSkia team may need to help usSkia team may need to help usengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 1.20Found to occur in 1.20Found to occur in 1.20frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
body: Transform.rotate(
angle: 0,
child: ClipRect(
clipper: Reveal(),
child: Center(
child: Container(
color: Colors.red,
height: 100,
width: 100,
),
),
),
),
);
}
}
class Reveal extends CustomClipper<Rect> {
@override
Rect getClip(Size size) {
return Rect.fromLTWH(0, size.height, size.width, -size.height);
}
@override
bool shouldReclip(CustomClipper<Rect> oldClipper) {
return true;
}
}
import 'dart:math';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
body: Transform.rotate(
angle: pi /12,
child: ClipRect(
clipper: Reveal(),
child: Center(
child: Container(
color: Colors.red,
height: 100,
width: 100,
),
),
),
),
);
}
}
class Reveal extends CustomClipper<Rect> {
@override
Rect getClip(Size size) {
return Rect.fromLTWH(0, size.height, size.width, -size.height);
}
@override
bool shouldReclip(CustomClipper<Rect> oldClipper) {
return true;
}
}
Logs
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17134.950], locale en-US)
• Flutter version 1.7.8+hotfix.4 at C:\flutter
• Framework revision 20e59316b8 (4 weeks ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\lovel\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.4)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
Thank you
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levelUI glitches reported at the engine/skia or impeller rendering leveldependency: skiaSkia team may need to help usSkia team may need to help usengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 1.20Found to occur in 1.20Found to occur in 1.20frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version


Activity
jason-simmons commentedon Aug 20, 2019
This renders in
--enable-software-renderingmode, but nothing is shown with the OpenGL ES backend on Androidchinmaygarde commentedon Aug 26, 2019
Tracked in triage.
brianosman commentedon Aug 28, 2019
We've tracked down the issue, which is related to how we handle inverted (unsorted) rectangles in paths, particularly for clipping. For now, you can fix this by changing your getClip function to be:
Rect getClip(Size size) { return Rect.fromLTWH(0, 0, size.width, size.height); }Tinhorn commentedon Aug 28, 2019
Thank you so much for the hard work. Really appreciate.
Flutter is awesome because of you guys
chinmaygarde commentedon Oct 21, 2019
@brianosman Is a fix that doesn't require the workaround under consideration?
pedromassangocode commentedon Sep 10, 2020
I was able to reproduce this issue on latest stable channel. Running the last piece of code on the OP does show nothing.
flutter doctor -v
In SkCanvas::clipRect, sort incoming rects
brianosman commentedon Sep 15, 2020
We have fixed this in Skia: https://skia.googlesource.com/skia/+/560ae27890385ecd2d2dbd2e504a7054e5b17b32, it should be rolling into Flutter eventually.
danagbemava-nc commentedon Nov 8, 2022
I cannot reproduce this on the latest version of stable as such I'll be closing this as fixed.
If anyone still runs into this issue, kindly file a new issue and provide the necessary information.
Thank you
screenshots
flutter doctor -v
github-actions commentedon Nov 22, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.