Skip to content

Commit be086b2

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

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
@@ -336,13 +336,5 @@ if (enable_unittests) {
336336
sources += [ "shell_io_manager_unittests.cc" ]
337337
deps += [ "//third_party/swiftshader" ]
338338
}
339-
340-
if (shell_enable_gl) {
341-
deps += [
342-
"//third_party/angle:libEGL_static",
343-
"//third_party/angle:libGLESv2_static",
344-
"//third_party/swiftshader",
345-
]
346-
}
347339
}
348340
}

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
@@ -304,27 +304,24 @@ std::unique_ptr<Rasterizer::GpuImageResult> Rasterizer::MakeSkiaGpuImage(
304304
TRACE_EVENT0("flutter", "Rasterizer::MakeGpuImage");
305305
FML_DCHECK(display_list);
306306

307+
// TODO(dnfield): the Linux embedding is in a rough state right now and
308+
// I can't seem to get the GPU path working on it.
309+
// https://github.com/flutter/flutter/issues/108835
310+
#if FML_OS_LINUX
311+
return MakeBitmapImage(display_list, image_info);
312+
#endif
313+
307314
std::unique_ptr<SnapshotDelegate::GpuImageResult> result;
308315
delegate_.GetIsGpuDisabledSyncSwitch()->Execute(
309316
fml::SyncSwitch::Handlers()
310317
.SetIfTrue([&result, &image_info, &display_list] {
311-
// TODO(dnfield): This isn't safe if display_list contains any GPU
312-
// resources like an SkImage_gpu.
313318
result = MakeBitmapImage(display_list, image_info);
314319
})
315320
.SetIfFalse([&result, &image_info, &display_list,
316321
surface = surface_.get(),
317322
gpu_image_behavior = gpu_image_behavior_] {
318323
if (!surface ||
319324
gpu_image_behavior == MakeGpuImageBehavior::kBitmap) {
320-
// TODO(dnfield): This isn't safe if display_list contains any GPU
321-
// resources like an SkImage_gpu.
322-
result = MakeBitmapImage(display_list, image_info);
323-
return;
324-
}
325-
326-
auto context_switch = surface->MakeRenderContextCurrent();
327-
if (!context_switch->GetResult()) {
328325
result = MakeBitmapImage(display_list, image_info);
329326
return;
330327
}

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"
@@ -3956,11 +3952,6 @@ TEST_F(ShellTest, PictureToImageSync) {
39563952
}),
39573953
});
39583954

3959-
AddNativeCallback("NativeOnBeforeToImageSync",
3960-
CREATE_NATIVE_ENTRY([&](auto args) {
3961-
// nop
3962-
}));
3963-
39643955
fml::CountDownLatch latch(2);
39653956
AddNativeCallback("NotifyNative", CREATE_NATIVE_ENTRY([&](auto args) {
39663957
// Teardown and set up rasterizer again.

0 commit comments

Comments
 (0)