Skip to content

Commit 84b21c0

Browse files
committed
[Tizen] Revert "Make the context current before accessing GL in MakeSkiaGpuImage" (#363)
This reverts commit c7894a6.
1 parent 3411ed9 commit 84b21c0

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
@@ -333,13 +333,5 @@ if (enable_unittests) {
333333
sources += [ "shell_io_manager_unittests.cc" ]
334334
deps += [ "//third_party/swiftshader" ]
335335
}
336-
337-
if (shell_enable_gl) {
338-
deps += [
339-
"//third_party/angle:libEGL_static",
340-
"//third_party/angle:libGLESv2_static",
341-
"//third_party/swiftshader",
342-
]
343-
}
344336
}
345337
}

shell/common/fixtures/shell_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,6 @@ void scene_with_red_box() {
354354
PlatformDispatcher.instance.scheduleFrame();
355355
}
356356

357-
@pragma('vm:external-name', 'NativeOnBeforeToImageSync')
358-
external void onBeforeToImageSync();
359-
360357

361358
@pragma('vm:entry-point')
362359
Future<void> toImageSync() async {
@@ -365,7 +362,6 @@ Future<void> toImageSync() async {
365362
canvas.drawPaint(Paint()..color = const Color(0xFFAAAAAA));
366363
final Picture picture = recorder.endRecording();
367364

368-
onBeforeToImageSync();
369365
final Image image = picture.toImageSync(20, 25);
370366
void expect(Object? a, Object? b) {
371367
if (a != b) {

shell/common/rasterizer.cc

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

317+
// TODO(dnfield): the Linux embedding is in a rough state right now and
318+
// I can't seem to get the GPU path working on it.
319+
// https://github.com/flutter/flutter/issues/108835
320+
#if FML_OS_LINUX
321+
return MakeBitmapImage(display_list, image_info);
322+
#endif
323+
317324
std::unique_ptr<SnapshotDelegate::GpuImageResult> result;
318325
delegate_.GetIsGpuDisabledSyncSwitch()->Execute(
319326
fml::SyncSwitch::Handlers()
320327
.SetIfTrue([&result, &image_info, &display_list] {
321-
// TODO(dnfield): This isn't safe if display_list contains any GPU
322-
// resources like an SkImage_gpu.
323328
result = MakeBitmapImage(display_list, image_info);
324329
})
325330
.SetIfFalse([&result, &image_info, &display_list,
326331
surface = surface_.get(),
327332
gpu_image_behavior = gpu_image_behavior_] {
328333
if (!surface ||
329334
gpu_image_behavior == MakeGpuImageBehavior::kBitmap) {
330-
// TODO(dnfield): This isn't safe if display_list contains any GPU
331-
// resources like an SkImage_gpu.
332-
result = MakeBitmapImage(display_list, image_info);
333-
return;
334-
}
335-
336-
auto context_switch = surface->MakeRenderContextCurrent();
337-
if (!context_switch->GetResult()) {
338335
result = MakeBitmapImage(display_list, image_info);
339336
return;
340337
}

shell/common/shell_unittests.cc

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

17-
#if SHELL_ENABLE_GL
18-
#include <EGL/egl.h>
19-
#endif // SHELL_ENABLE_GL
20-
2117
#include "assets/directory_asset_bundle.h"
2218
#include "common/graphics/persistent_cache.h"
2319
#include "flutter/flow/layers/backdrop_filter_layer.h"
@@ -4118,11 +4114,6 @@ TEST_F(ShellTest, PictureToImageSync) {
41184114
}),
41194115
});
41204116

4121-
AddNativeCallback("NativeOnBeforeToImageSync",
4122-
CREATE_NATIVE_ENTRY([&](auto args) {
4123-
// nop
4124-
}));
4125-
41264117
fml::CountDownLatch latch(2);
41274118
AddNativeCallback("NotifyNative", CREATE_NATIVE_ENTRY([&](auto args) {
41284119
// Teardown and set up rasterizer again.

0 commit comments

Comments
 (0)