Skip to content

Commit 21c4cae

Browse files
swift-kimJSUYA
authored andcommitted
[Tizen] Revert "Make the context current before accessing GL in MakeSkiaGpuImage" (#363)
This reverts commit c7894a6.
1 parent 92afd58 commit 21c4cae

File tree

4 files changed

+7
-31
lines changed

4 files changed

+7
-31
lines changed

shell/common/BUILD.gn

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,5 @@ if (enable_unittests) {
350350
sources += [ "shell_io_manager_unittests.cc" ]
351351
deps += [ "//flutter/third_party/swiftshader" ]
352352
}
353-
354-
if (shell_enable_gl) {
355-
deps += [
356-
"//flutter/third_party/swiftshader",
357-
"//third_party/angle:libEGL_static",
358-
"//third_party/angle:libGLESv2_static",
359-
]
360-
}
361353
}
362354
}

shell/common/fixtures/shell_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,6 @@ void scene_with_red_box() {
336336
PlatformDispatcher.instance.scheduleFrame();
337337
}
338338

339-
@pragma('vm:external-name', 'NativeOnBeforeToImageSync')
340-
external void onBeforeToImageSync();
341-
342339

343340
@pragma('vm:entry-point')
344341
Future<void> toImageSync() async {
@@ -347,7 +344,6 @@ Future<void> toImageSync() async {
347344
canvas.drawPaint(Paint()..color = const Color(0xFFAAAAAA));
348345
final Picture picture = recorder.endRecording();
349346

350-
onBeforeToImageSync();
351347
final Image image = picture.toImageSync(20, 25);
352348
void expect(Object? a, Object? b) {
353349
if (a != b) {

shell/common/rasterizer.cc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -346,27 +346,24 @@ std::unique_ptr<Rasterizer::GpuImageResult> Rasterizer::MakeSkiaGpuImage(
346346
TRACE_EVENT0("flutter", "Rasterizer::MakeGpuImage");
347347
FML_DCHECK(display_list);
348348

349+
// TODO(dnfield): the Linux embedding is in a rough state right now and
350+
// I can't seem to get the GPU path working on it.
351+
// https://github.com/flutter/flutter/issues/108835
352+
#if FML_OS_LINUX
353+
return MakeBitmapImage(display_list, image_info);
354+
#endif
355+
349356
std::unique_ptr<SnapshotDelegate::GpuImageResult> result;
350357
delegate_.GetIsGpuDisabledSyncSwitch()->Execute(
351358
fml::SyncSwitch::Handlers()
352359
.SetIfTrue([&result, &image_info, &display_list] {
353-
// TODO(dnfield): This isn't safe if display_list contains any GPU
354-
// resources like an SkImage_gpu.
355360
result = MakeBitmapImage(display_list, image_info);
356361
})
357362
.SetIfFalse([&result, &image_info, &display_list,
358363
surface = surface_.get(),
359364
gpu_image_behavior = gpu_image_behavior_] {
360365
if (!surface ||
361366
gpu_image_behavior == MakeGpuImageBehavior::kBitmap) {
362-
// TODO(dnfield): This isn't safe if display_list contains any GPU
363-
// resources like an SkImage_gpu.
364-
result = MakeBitmapImage(display_list, image_info);
365-
return;
366-
}
367-
368-
auto context_switch = surface->MakeRenderContextCurrent();
369-
if (!context_switch->GetResult()) {
370367
result = MakeBitmapImage(display_list, image_info);
371368
return;
372369
}

shell/common/shell_unittests.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
#include <utility>
1616
#include <vector>
1717

18-
#if SHELL_ENABLE_GL
19-
#include <EGL/egl.h>
20-
#endif // SHELL_ENABLE_GL
21-
2218
#include "assets/directory_asset_bundle.h"
2319
#include "common/graphics/persistent_cache.h"
2420
#include "flutter/flow/layers/backdrop_filter_layer.h"
@@ -4039,11 +4035,6 @@ TEST_F(ShellTest, PictureToImageSync) {
40394035
}),
40404036
});
40414037

4042-
AddNativeCallback("NativeOnBeforeToImageSync",
4043-
CREATE_NATIVE_ENTRY([&](auto args) {
4044-
// nop
4045-
}));
4046-
40474038
fml::CountDownLatch latch(2);
40484039
AddNativeCallback("NotifyNative", CREATE_NATIVE_ENTRY([&](auto args) {
40494040
// Teardown and set up rasterizer again.

0 commit comments

Comments
 (0)