Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2dc8271
Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (#6151)
skia-flutter-autoroll Sep 4, 2018
b0b8daa
Unregister onFrameAvailable callbacks when a TextureEntry is released…
nichtverstehen Sep 4, 2018
f89a386
Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (#6152)
skia-flutter-autoroll Sep 4, 2018
137389a
Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (#6…
skia-flutter-autoroll Sep 4, 2018
593ed59
Revert "Use Skia normalize again after Skia precision fix. (#6121)" (…
GaryQian Sep 4, 2018
aaf98fb
Use double multiplication by a scale instead of 3 divides for speed. …
GaryQian Sep 4, 2018
c173655
Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (#6155)
skia-flutter-autoroll Sep 4, 2018
b32ceaf
Add some more logs for diagnosing screenshot failures (#6156)
jason-simmons Sep 4, 2018
30af2f2
Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (#6159)
skia-flutter-autoroll Sep 5, 2018
6ad3183
Fix windows build. (#6162)
chinmaygarde Sep 5, 2018
9643a50
Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (#6164)
skia-flutter-autoroll Sep 5, 2018
19a3bc8
Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (#6165)
skia-flutter-autoroll Sep 5, 2018
5063a8a
Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (#6166)
skia-flutter-autoroll Sep 5, 2018
6d0fbc7
Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (#6167)
skia-flutter-autoroll Sep 5, 2018
b22badf
Dart SDK roll for 2018/09/04 (#6161)
bkonyi Sep 5, 2018
6af60d7
Remove obsolete discovery mechanism from FlutterView (#6157)
jason-simmons Sep 5, 2018
564d214
Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (#6…
skia-flutter-autoroll Sep 5, 2018
3a7d0b5
Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (#6169)
goderbauer Sep 5, 2018
0981731
Enable transparent FlutterViews (#6163)
mklim Sep 5, 2018
9f0ad8b
Fixes negative end selection offset. (#6171)
slightfoot Sep 5, 2018
e6d9b34
Remove the old location of the ICU data asset (#6170)
jason-simmons Sep 5, 2018
a0f30b3
Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (#6…
skia-flutter-autoroll Sep 5, 2018
f6ad3e0
Roll Tonic (#6177)
jason-simmons Sep 5, 2018
108e0a6
Add transparency helpers to FlutterView.java (#6172)
Sep 5, 2018
572753f
Roll src/third_party/skia 343553a1fe9e..ffbcc3fadfa1 (6 commits) (#6178)
skia-flutter-autoroll Sep 6, 2018
ade0f22
Remove unused file picture_serializer. (#6179)
chinmaygarde Sep 6, 2018
1768bed
Roll src/third_party/skia ffbcc3fadfa1..71f8475a0dba (3 commits) (#6181)
skia-flutter-autoroll Sep 6, 2018
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
8 changes: 4 additions & 4 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ vars = {
'fuchsia_git': 'https://fuchsia.googlesource.com',
'github_git': 'https://github.com',
'skia_git': 'https://skia.googlesource.com',
'skia_revision': '24e58341fbcd904fdf81d86e5a7703e254d63e35',
'skia_revision': '71f8475a0dbacc5d63fef094100835bad7b1e74c',

# When updating the Dart revision, ensure that all entries that are
# dependencies of Dart are also updated to match the entries in the
# Dart SDK's DEPS file for that revision of Dart. The DEPS file for
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '760a9690c22ec3f3d163173737f9949f97e6e02a',
'dart_revision': '2b995b2654ba162c48cdd187ce0b2f1d24c6838f',

'dart_args_tag': '1.4.4',
'dart_async_tag': '2.0.8',
Expand Down Expand Up @@ -115,7 +115,7 @@ allowed_hosts = [
]

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '35959f6255c341eee550884ed69afd6b2891bd53',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '7aadfaf196f9cd8a299f9ad78fab63362800466d',

# Fuchsia compatibility
#
Expand All @@ -124,7 +124,7 @@ deps = {
# and not have to specific specific hashes.

'src/third_party/tonic':
Var('fuchsia_git') + '/tonic' + '@' + '90c9c81f49461d9f4d414845a6eeba1c0df35bb4',
Var('fuchsia_git') + '/tonic' + '@' + 'd91fa62844f8531a3701450f6192298d0e873246',

'src/third_party/benchmark':
Var('fuchsia_git') + '/third_party/benchmark' + '@' + '296537bc48d380adf21567c5d736ab79f5363d22',
Expand Down
2 changes: 0 additions & 2 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,6 @@ FILE: ../../../flutter/shell/common/animator.cc
FILE: ../../../flutter/shell/common/animator.h
FILE: ../../../flutter/shell/common/engine.cc
FILE: ../../../flutter/shell/common/engine.h
FILE: ../../../flutter/shell/common/picture_serializer.cc
FILE: ../../../flutter/shell/common/picture_serializer.h
FILE: ../../../flutter/shell/common/platform_view.cc
FILE: ../../../flutter/shell/common/platform_view.h
FILE: ../../../flutter/shell/common/rasterizer.cc
Expand Down
7 changes: 1 addition & 6 deletions ci/licenses_golden/licenses_skia
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: af91da401385350e1fd99d6d8f3947a4
Signature: 2d0f3b3ff2a5279313bfee7ef0cef7c5

UNUSED LICENSES:

Expand Down Expand Up @@ -959,8 +959,6 @@ FILE: ../../../third_party/skia/src/core/SkColorSpace.cpp
FILE: ../../../third_party/skia/src/core/SkColorSpacePriv.h
FILE: ../../../third_party/skia/src/core/SkColorSpaceXform.cpp
FILE: ../../../third_party/skia/src/core/SkColorSpaceXformPriv.h
FILE: ../../../third_party/skia/src/core/SkColorSpace_XYZ.cpp
FILE: ../../../third_party/skia/src/core/SkColorSpace_XYZ.h
FILE: ../../../third_party/skia/src/core/SkCpu.cpp
FILE: ../../../third_party/skia/src/core/SkCpu.h
FILE: ../../../third_party/skia/src/core/SkDeduper.h
Expand Down Expand Up @@ -1495,9 +1493,6 @@ FILE: ../../../third_party/skia/src/gpu/effects/GrLumaColorFilterEffect.h
FILE: ../../../third_party/skia/src/gpu/effects/GrMagnifierEffect.cpp
FILE: ../../../third_party/skia/src/gpu/effects/GrMagnifierEffect.fp
FILE: ../../../third_party/skia/src/gpu/effects/GrMagnifierEffect.h
FILE: ../../../third_party/skia/src/gpu/effects/GrOverdrawFragmentProcessor.cpp
FILE: ../../../third_party/skia/src/gpu/effects/GrOverdrawFragmentProcessor.fp
FILE: ../../../third_party/skia/src/gpu/effects/GrOverdrawFragmentProcessor.h
FILE: ../../../third_party/skia/src/gpu/effects/GrPremulInputFragmentProcessor.cpp
FILE: ../../../third_party/skia/src/gpu/effects/GrPremulInputFragmentProcessor.fp
FILE: ../../../third_party/skia/src/gpu/effects/GrPremulInputFragmentProcessor.h
Expand Down
3 changes: 2 additions & 1 deletion ci/licenses_golden/licenses_third_party
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Signature: 149340ef002a59fe0840631d6cfd1773
Signature: 5ff2cabdf3ef0c70254ec22bc9e767c6

UNUSED LICENSES:

Expand Down Expand Up @@ -5461,6 +5461,7 @@ FILE: ../../../third_party/dart/runtime/vm/compiler/backend/code_statistics.cc
FILE: ../../../third_party/dart/runtime/vm/compiler/backend/code_statistics.h
FILE: ../../../third_party/dart/runtime/vm/compiler/compiler_pass.cc
FILE: ../../../third_party/dart/runtime/vm/compiler/compiler_pass.h
FILE: ../../../third_party/dart/runtime/vm/compiler/compiler_state.h
FILE: ../../../third_party/dart/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
FILE: ../../../third_party/dart/runtime/vm/compiler/frontend/base_flow_graph_builder.h
FILE: ../../../third_party/dart/runtime/vm/compiler/frontend/bytecode_reader.cc
Expand Down
15 changes: 12 additions & 3 deletions flow/matrix_decomposition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ static inline SkVector3 SkVector3Cross(const SkVector3& a, const SkVector3& b) {
MatrixDecomposition::MatrixDecomposition(const SkMatrix& matrix)
: MatrixDecomposition(SkMatrix44{matrix}) {}

// Use custom normalize to avoid skia precision loss/normalize() privatization.
static inline void SkVector3Normalize(SkVector3& v) {
double mag = sqrt(v.fX * v.fX + v.fY * v.fY + v.fZ * v.fZ);
double scale = 1.0 / mag;
v.fX *= scale;
v.fY *= scale;
v.fZ *= scale;
}

MatrixDecomposition::MatrixDecomposition(SkMatrix44 matrix) : valid_(false) {
if (matrix.get(3, 3) == 0) {
return;
Expand Down Expand Up @@ -83,14 +92,14 @@ MatrixDecomposition::MatrixDecomposition(SkMatrix44 matrix) : valid_(false) {

scale_.fX = row[0].length();

row[0].normalize();
SkVector3Normalize(row[0]);

shear_.fX = row[0].dot(row[1]);
row[1] = SkVector3Combine(row[1], 1.0, row[0], -shear_.fX);

scale_.fY = row[1].length();

row[1].normalize();
SkVector3Normalize(row[1]);

shear_.fX /= scale_.fY;

Expand All @@ -101,7 +110,7 @@ MatrixDecomposition::MatrixDecomposition(SkMatrix44 matrix) : valid_(false) {

scale_.fZ = row[2].length();

row[2].normalize();
SkVector3Normalize(row[2]);

shear_.fY /= scale_.fZ;
shear_.fZ /= scale_.fZ;
Expand Down
3 changes: 1 addition & 2 deletions flow/matrix_decomposition_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ TEST(MatrixDecomposition, Combination) {
}

TEST(MatrixDecomposition, ScaleFloatError) {
// Strange behavior under 0.000245 due to underflow issues.
for (float scale = 0.000245f; scale < 2.0f; scale += 0.000001f) {
for (float scale = 0.0001f; scale < 2.0f; scale += 0.000001f) {
SkMatrix44 matrix = SkMatrix44::I();
matrix.setScale(scale, scale, 1.0f);

Expand Down
2 changes: 0 additions & 2 deletions shell/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ source_set("common") {
"io_manager.h",
"isolate_configuration.cc",
"isolate_configuration.h",
"picture_serializer.cc",
"picture_serializer.h",
"platform_view.cc",
"platform_view.h",
"rasterizer.cc",
Expand Down
16 changes: 0 additions & 16 deletions shell/common/picture_serializer.cc

This file was deleted.

18 changes: 0 additions & 18 deletions shell/common/picture_serializer.h

This file was deleted.

18 changes: 13 additions & 5 deletions shell/common/rasterizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include "third_party/skia/include/core/SkSurfaceCharacterization.h"
#include "third_party/skia/include/utils/SkBase64.h"

#ifdef ERROR
#undef ERROR
#endif

namespace shell {

Rasterizer::Rasterizer(blink::TaskRunners task_runners)
Expand Down Expand Up @@ -114,7 +118,7 @@ bool Rasterizer::DrawToSurface(flow::LayerTree& layer_tree) {
surface_->GetContext(), canvas, surface_->GetRootTransformation(), true);

if (canvas) {
canvas->clear(SK_ColorBLACK);
canvas->clear(SK_ColorTRANSPARENT);
}

if (compositor_frame && compositor_frame->Raster(layer_tree, false)) {
Expand Down Expand Up @@ -173,6 +177,7 @@ static sk_sp<SkData> ScreenshotLayerTreeAsImage(
auto snapshot_surface =
CreateSnapshotSurface(surface_context, tree->frame_size());
if (snapshot_surface == nullptr) {
FML_LOG(ERROR) << "Screenshot: unable to create snapshot surface";
return nullptr;
}

Expand All @@ -186,23 +191,25 @@ static sk_sp<SkData> ScreenshotLayerTreeAsImage(

auto frame = compositor_context.AcquireFrame(
surface_context, canvas, root_surface_transformation, false);
canvas->clear(SK_ColorBLACK);
canvas->clear(SK_ColorTRANSPARENT);
frame->Raster(*tree, true);
canvas->flush();

// Prepare an image from the surface, this image may potentially be on th GPU.
auto potentially_gpu_snapshot = snapshot_surface->makeImageSnapshot();
if (!potentially_gpu_snapshot) {
FML_LOG(ERROR) << "Screenshot: unable to make image screenshot";
return nullptr;
}

// Copy the GPU image snapshot into CPU memory.
auto cpu_snapshot = potentially_gpu_snapshot->makeRasterImage();
if (!cpu_snapshot) {
FML_LOG(ERROR) << "Screenshot: unable to make raster image";
return nullptr;
}

// If the caller want the pixels to be compressed, there is a Skia utilitiy to
// If the caller want the pixels to be compressed, there is a Skia utility to
// compress to PNG. Use that.
if (compressed) {
return cpu_snapshot->encodeToData();
Expand All @@ -211,6 +218,7 @@ static sk_sp<SkData> ScreenshotLayerTreeAsImage(
// Copy it into a bitmap and return the same.
SkPixmap pixmap;
if (!cpu_snapshot->peekPixels(&pixmap)) {
FML_LOG(ERROR) << "Screenshot: unable to obtain bitmap pixels";
return nullptr;
}

Expand All @@ -222,7 +230,7 @@ Rasterizer::Screenshot Rasterizer::ScreenshotLastLayerTree(
bool base64_encode) {
auto layer_tree = GetLastLayerTree();
if (layer_tree == nullptr) {
FML_DLOG(INFO) << "Last layer tree was null when screenshotting.";
FML_LOG(ERROR) << "Last layer tree was null when screenshotting.";
return {};
}

Expand All @@ -246,7 +254,7 @@ Rasterizer::Screenshot Rasterizer::ScreenshotLastLayerTree(
}

if (data == nullptr) {
FML_DLOG(INFO) << "Sceenshot data was null.";
FML_LOG(ERROR) << "Screenshot data was null.";
return {};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public boolean sendKeyEvent(KeyEvent event) {
int character = event.getUnicodeChar();
if (character != 0) {
int selStart = Math.max(0, Selection.getSelectionStart(mEditable));
int selEnd = Selection.getSelectionEnd(mEditable);
int selEnd = Math.max(0, Selection.getSelectionEnd(mEditable));
if (selEnd != selStart)
mEditable.delete(selStart, selEnd);
mEditable.insert(selStart, String.valueOf((char) character));
Expand Down
10 changes: 1 addition & 9 deletions shell/platform/android/io/flutter/view/FlutterMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,7 @@ private static void initResources(Context applicationContext) {

sResourceExtractor = new ResourceExtractor(context);

// Search for the icudtl.dat file at the old and new locations.
// TODO(jsimmons): remove the old location when all tools have been updated.
Set<String> sharedAssets = listAssets(applicationContext, SHARED_ASSET_DIR);
String icuAssetPath;
if (sharedAssets.contains(SHARED_ASSET_ICU_DATA)) {
icuAssetPath = SHARED_ASSET_DIR + File.separator + SHARED_ASSET_ICU_DATA;
} else {
icuAssetPath = SHARED_ASSET_ICU_DATA;
}
String icuAssetPath = SHARED_ASSET_DIR + File.separator + SHARED_ASSET_ICU_DATA;
sResourceExtractor.addResource(icuAssetPath);
sIcuDataPath = PathUtils.getDataDirectory(applicationContext) + File.separator + icuAssetPath;

Expand Down
Loading