Flutter Linux Embedder
fl_egl_image_test.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "gtest/gtest.h"
6 
8 #include "flutter/shell/platform/linux/testing/mock_epoxy.h"
9 
10 TEST(FlEGLImageTest, Test) {
11  ::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
12 
13  EXPECT_CALL(epoxy, eglCreateImageKHR(testing::_, testing::_, testing::_,
14  testing::_, testing::_))
15  .Times(1);
16  EXPECT_CALL(epoxy, eglDestroyImageKHR(testing::_, testing::_)).Times(1);
17 
18  GLuint texture_id = 99;
19  g_autoptr(FlEGLImage) image = fl_egl_image_new(texture_id);
20  EXPECT_NE(fl_egl_image_get_image(image), EGL_NO_IMAGE_KHR);
21 }
g_autoptr(FlEngine) engine
FlEGLImage * fl_egl_image_new(GLuint texture)
Definition: fl_egl_image.cc:59
EGLImage fl_egl_image_get_image(FlEGLImage *image)
Definition: fl_egl_image.cc:68
TEST(FlEGLImageTest, Test)
int64_t texture_id