| Flutter Linux Embedder |

Functions
fl_framebuffer_test.cc File Reference
`#include "gtest/gtest.h"`
`#include "flutter/shell/platform/linux/fl_framebuffer.h"`
`#include "flutter/shell/platform/linux/testing/mock_epoxy.h"`

Go to the source code of this file.

## Functions
| TEST (FlFramebufferTest, HasDepthStencil)
| TEST (FlFramebufferTest, ResourcesRemoved)

## Function Documentation

## ◆ TEST() [1/2]

TEST | ( | FlFramebufferTest | ,
|  | HasDepthStencil |
| ) |  |

Definition at line 10 of file fl_framebuffer_test.cc.

10 {
11 ::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
12
13 g_autoptr(FlFramebuffer) framebuffer = fl_framebuffer_new(GL_RGB, 100, 100);
14
15 GLint depth_type = GL_NONE;
16 glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
17 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
18 &depth_type);
19 EXPECT_NE(depth_type, GL_NONE);
20
21 GLint stencil_type = GL_NONE;
22 glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
23 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE,
24 &stencil_type);
25 EXPECT_NE(stencil_type, GL_NONE);
26 }
fl_framebuffer_new
FlFramebuffer * fl_framebuffer_new(GLint format, size_t width, size_t height)
Definition: fl_framebuffer.cc:46

References fl_framebuffer_new().

## ◆ TEST() [2/2]

TEST | ( | FlFramebufferTest | ,
|  | ResourcesRemoved |
| ) |  |

Definition at line 28 of file fl_framebuffer_test.cc.

28 {
29 ::testing::NiceMock<flutter::testing::MockEpoxy> epoxy;
30
31 EXPECT_CALL(epoxy, glGenFramebuffers);
32 EXPECT_CALL(epoxy, glGenTextures);
33 EXPECT_CALL(epoxy, glGenRenderbuffers);
34 FlFramebuffer* framebuffer = fl_framebuffer_new(GL_RGB, 100, 100);
35
36 EXPECT_CALL(epoxy, glDeleteFramebuffers);
37 EXPECT_CALL(epoxy, glDeleteTextures);
38 EXPECT_CALL(epoxy, glDeleteRenderbuffers);
39 g_object_unref(framebuffer);
40 }

References fl_framebuffer_new().