Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented May 7, 2020

Skip painting clipped out pictures.

When a picture is clipped out there's nothing to render. Creating the empty <flt-canvas> and <canvas> tags is wasteful. It is also wasteful to traverse the paint commands just to find out that none of them need to be drawn. This optimization stops the process at the layer level because the layer tree knows that the picture is clipped by the ancestor layers, so we never hit the canvas logic.

Update: according to local A/B testing this speeds up the clipped_out_pictures drawFrameDuration 14% (the devicelab numbers will be available when the change rolls into the framework)

@yjbanov yjbanov requested a review from ferhatb May 7, 2020 18:41
@auto-assign auto-assign bot requested a review from iskakaushik May 7, 2020 18:43
import 'package:test/test.dart';

import 'matchers.dart';
import '../../matchers.dart';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this test so it matches what it's testing, so had to update relative imports.

@yjbanov yjbanov force-pushed the skip-paint-clipped-pictures branch from 2ee59a5 to 890f4d5 Compare May 8, 2020 16:57
@yjbanov
Copy link
Contributor Author

yjbanov commented May 8, 2020

Landing on red "Mac Web Engine". That one is a known flake.

@yjbanov yjbanov merged commit 68bf137 into flutter:master May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 9, 2020
GaryQian pushed a commit to flutter/flutter that referenced this pull request May 11, 2020
* 9ea2db5 Add FlMessageCodec, FlBinaryCodec, FlStringCodec (flutter/engine#18186)

* f422757 Roll src/fuchsia/sdk/linux from MhpFP... to c1q_S... (flutter/engine#18222)

* 2ab918c Roll src/third_party/skia a14084ba1b41..8f6c3ed7c7be (1 commits) (flutter/engine#18223)

* 40167b6 Make robolectric tests run against SDK 29 by default (flutter/engine#17996)

* e5b0db6 Roll src/third_party/skia 8f6c3ed7c7be..b55372444d1b (4 commits) (flutter/engine#18224)

* ed08c3e Roll src/fuchsia/sdk/mac from 4MCVP... to T5tT0... (flutter/engine#18228)

* 6767517 Roll src/third_party/skia b55372444d1b..ac09f7cd7a28 (2 commits) (flutter/engine#18229)

* 983de2c Remove pipeline in favor of layer tree holder (flutter/engine#17688)

* a1218dd Roll src/third_party/skia ac09f7cd7a28..c683912173bb (2 commits) (flutter/engine#18230)

* 68bf137 skip painting clipped out pictures (flutter/engine#18204)

* 7035255 make compiler worker count configurable (flutter/engine#17616)

* c8ff03c Publish validation layer deps as part of the fuchsia artifacts (flutter/engine#18214)

* 576f0e1 Roll src/third_party/skia c683912173bb..7359165e660c (1 commits) (flutter/engine#18234)

* 1b3b4ec skip font loading tests for safari (flutter/engine#18232)

* 9319d7c Roll src/third_party/skia 7359165e660c..6913d1bb1d7a (1 commits) (flutter/engine#18237)

* 1b56f35 Roll src/third_party/dart 617bc54b715d..2a14a62112e6 (30 commits) (flutter/engine#18239)

* ff6942f Add fontFeatures and decorationThickness to textstyle (flutter/engine#18235)

* 4418ce8 Revert "Remove pipeline in favor of layer tree holder (#17688)" (flutter/engine#18242)

* 9d8daf2 Roll src/third_party/skia 6913d1bb1d7a..bf1904fd4898 (3 commits) (flutter/engine#18243)

* Updated bin/internal/fuchsia-linux.version

* Updated bin/internal/fuchsia-mac.version
wandyers pushed a commit to wandyers/engine that referenced this pull request May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants