Skip to content

Commit 76ca3f7

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

File tree

3 files changed

+7
-19
lines changed

3 files changed

+7
-19
lines changed

shell/common/fixtures/shell_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,6 @@ void scene_with_red_box() {
343343
PlatformDispatcher.instance.scheduleFrame();
344344
}
345345

346-
@pragma('vm:external-name', 'NativeOnBeforeToImageSync')
347-
external void onBeforeToImageSync();
348-
349346

350347
@pragma('vm:entry-point')
351348
Future<void> toImageSync() async {
@@ -354,7 +351,6 @@ Future<void> toImageSync() async {
354351
canvas.drawPaint(Paint()..color = const Color(0xFFAAAAAA));
355352
final Picture picture = recorder.endRecording();
356353

357-
onBeforeToImageSync();
358354
final Image image = picture.toImageSync(20, 25);
359355
expect(image.width, 20);
360356
expect(image.height, 25);

shell/common/rasterizer.cc

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

359+
// TODO(dnfield): the Linux embedding is in a rough state right now and
360+
// I can't seem to get the GPU path working on it.
361+
// https://github.com/flutter/flutter/issues/108835
362+
#if FML_OS_LINUX
363+
return MakeBitmapImage(display_list, image_info);
364+
#endif
365+
359366
std::unique_ptr<SnapshotDelegate::GpuImageResult> result;
360367
delegate_.GetIsGpuDisabledSyncSwitch()->Execute(
361368
fml::SyncSwitch::Handlers()
362369
.SetIfTrue([&result, &image_info, &display_list] {
363-
// TODO(dnfield): This isn't safe if display_list contains any GPU
364-
// resources like an SkImage_gpu.
365370
result = MakeBitmapImage(display_list, image_info);
366371
})
367372
.SetIfFalse([&result, &image_info, &display_list,
368373
surface = surface_.get(),
369374
gpu_image_behavior = gpu_image_behavior_] {
370375
if (!surface ||
371376
gpu_image_behavior == MakeGpuImageBehavior::kBitmap) {
372-
// TODO(dnfield): This isn't safe if display_list contains any GPU
373-
// resources like an SkImage_gpu.
374-
result = MakeBitmapImage(display_list, image_info);
375-
return;
376-
}
377-
378-
auto context_switch = surface->MakeRenderContextCurrent();
379-
if (!context_switch->GetResult()) {
380377
result = MakeBitmapImage(display_list, image_info);
381378
return;
382379
}

shell/common/shell_unittests.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4074,11 +4074,6 @@ TEST_F(ShellTest, PictureToImageSync) {
40744074
}),
40754075
});
40764076

4077-
AddNativeCallback("NativeOnBeforeToImageSync",
4078-
CREATE_NATIVE_ENTRY([&](auto args) {
4079-
// nop
4080-
}));
4081-
40824077
fml::CountDownLatch latch(2);
40834078
AddNativeCallback("NotifyNative", CREATE_NATIVE_ENTRY([&](auto args) {
40844079
// Teardown and set up rasterizer again.

0 commit comments

Comments
 (0)